Release Notes
CREATE VIEW statement to create a view. A view is a virtual table that is generated based on a SELECT statement. It is useful in scenarios such as type conversion, column conversion, virtual columns, and long code splitting.CREATE VIEW view name ASSELECT clause
CREATE VIEW MyView ASSELECT s1.time_, s1.client_ip, s1.uri, s1.protocol_version, s2.status_code, s2.date_FROM KafkaSource1 AS s1, KafkaSource2 AS s2WHERE s1.time_ = s2.time_ AND s1.client_ip = s2.client_ip;
CREATE VIEW statement together with the type conversion function CAST() (see Type Conversion Functions) to define a virtual table and use it as the data source.status_code column, whose data type is BIGINT, to the data type VARCHAR:CREATE VIEW KafkaSource2 ASSELECT`time_`,`client_ip`,`method`,CAST(`status_code` AS VARCHAR) AS status_code,FROM KafkaSource1;
CAST() conversions, for example, from BIGINT to INTEGER or BIGINT to TINYINT, may lead to loss of precision.TO_TIMESTAMP and DATE_FORMAT functions in Date and Time Functions.피드백