-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[feat](nereids) support create view in nereids #32743
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
|
run buildall |
TPC-H: Total hot run time: 37763 ms |
|
run buildall |
TPC-H: Total hot run time: 38292 ms |
|
run buildall |
TPC-H: Total hot run time: 38149 ms |
TPC-DS: Total hot run time: 182077 ms |
ClickBench: Total hot run time: 29.87 s |
|
Load test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G' |
|
run buildall |
|
run buildall |
TPC-H: Total hot run time: 38538 ms |
TPC-DS: Total hot run time: 182456 ms |
|
Load test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G' |
|
run buildall |
TPC-H: Total hot run time: 38503 ms |
TPC-DS: Total hot run time: 180922 ms |
ClickBench: Total hot run time: 30.65 s |
|
Load test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G' |
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
…42206) This is brought by #32743 set enable_unicode_name_support = true; If run create view sql should fail beausel_shipdate column name contains invalid char '(' and ')', but now success this pr fix this and throw exception `ERROR 1105 (HY000): errCode = 2, detailMessage = Incorrect column name '(日期)'. Column regex is '^[_a-zA-Z@0-9\s/][.a-zA-Z0-9_+-/?@#$%^&*"\s,:]{0,255}$'` CREATE VIEW view1 AS SELECT "零售公司", l_shipdate as '(日期)', l_receiptdate as k2 FROM lineitem; and if run create view sql as following, should success: CREATE VIEW view2 AS SELECT "零售公司", l_shipdate as '日期', l_receiptdate as k2 FROM lineitem; and the schema of view2 should be mysql> desc view2; +-------------+-------------+------+-------+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------------+-------------+------+-------+---------+-------+ | __literal_0 | varchar(16) | No | false | NULL | | | 日期 | date | No | false | NULL | | | k2 | date | No | false | NULL | | +-------------+-------------+------+-------+---------+-------+ 3 rows in set (0.01 sec)
…pache#42206) This is brought by apache#32743 set enable_unicode_name_support = true; If run create view sql should fail beausel_shipdate column name contains invalid char '(' and ')', but now success this pr fix this and throw exception `ERROR 1105 (HY000): errCode = 2, detailMessage = Incorrect column name '(日期)'. Column regex is '^[_a-zA-Z@0-9\s/][.a-zA-Z0-9_+-/?@#$%^&*"\s,:]{0,255}$'` CREATE VIEW view1 AS SELECT "零售公司", l_shipdate as '(日期)', l_receiptdate as k2 FROM lineitem; and if run create view sql as following, should success: CREATE VIEW view2 AS SELECT "零售公司", l_shipdate as '日期', l_receiptdate as k2 FROM lineitem; and the schema of view2 should be mysql> desc view2; +-------------+-------------+------+-------+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------------+-------------+------+-------+---------+-------+ | __literal_0 | varchar(16) | No | false | NULL | | | 日期 | date | No | false | NULL | | | k2 | date | No | false | NULL | | +-------------+-------------+------+-------+---------+-------+ 3 rows in set (0.01 sec)
…pache#42206) This is brought by apache#32743 set enable_unicode_name_support = true; If run create view sql should fail beausel_shipdate column name contains invalid char '(' and ')', but now success this pr fix this and throw exception `ERROR 1105 (HY000): errCode = 2, detailMessage = Incorrect column name '(日期)'. Column regex is '^[_a-zA-Z@0-9\s/][.a-zA-Z0-9_+-/?@#$%^&*"\s,:]{0,255}$'` CREATE VIEW view1 AS SELECT "零售公司", l_shipdate as '(日期)', l_receiptdate as k2 FROM lineitem; and if run create view sql as following, should success: CREATE VIEW view2 AS SELECT "零售公司", l_shipdate as '日期', l_receiptdate as k2 FROM lineitem; and the schema of view2 should be mysql> desc view2; +-------------+-------------+------+-------+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------------+-------------+------+-------+---------+-------+ | __literal_0 | varchar(16) | No | false | NULL | | | 日期 | date | No | false | NULL | | | k2 | date | No | false | NULL | | +-------------+-------------+------+-------+---------+-------+ 3 rows in set (0.01 sec)
Related PR: #32743 Problem Summary: problem before this pr: 1. null type problem the type of NULL is null_type, this will lead to error when select this view through jdbc catalog. ```sql mysql> CREATE VIEW test_null COMMENT '测试null类型' AS SELECT NULL AS `col1`; Query OK, 0 rows affected (0.02 sec) mysql> desc test_null; +-------+-----------+------+-------+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------+-----------+------+-------+---------+-------+ | col1 | null_type | Yes | false | NULL | | +-------+-----------+------+-------+---------+-------+ 1 row in set (0.00 sec) ``` after this pr, the type is changed to tinyint. mysql> CREATE VIEW test_null2 COMMENT '测试null类型' AS SELECT NULL AS `col1`; Query OK, 0 rows affected (0.03 sec) ```sql mysql> desc test_null2; +-------+---------+------+-------+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------+---------+------+-------+---------+-------+ | col1 | tinyint | Yes | false | NULL | | +-------+---------+------+-------+---------+-------+ 1 row in set (0.01 sec) ``` 2. nullable problem Modify the internal elements of nested types returned by JDBC to always be null, in order to maintain consistency with Doris' internal implementation ### Release note
Related PR: #32743 Problem Summary: problem before this pr: 1. null type problem the type of NULL is null_type, this will lead to error when select this view through jdbc catalog. ```sql mysql> CREATE VIEW test_null COMMENT '测试null类型' AS SELECT NULL AS `col1`; Query OK, 0 rows affected (0.02 sec) mysql> desc test_null; +-------+-----------+------+-------+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------+-----------+------+-------+---------+-------+ | col1 | null_type | Yes | false | NULL | | +-------+-----------+------+-------+---------+-------+ 1 row in set (0.00 sec) ``` after this pr, the type is changed to tinyint. mysql> CREATE VIEW test_null2 COMMENT '测试null类型' AS SELECT NULL AS `col1`; Query OK, 0 rows affected (0.03 sec) ```sql mysql> desc test_null2; +-------+---------+------+-------+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------+---------+------+-------+---------+-------+ | col1 | tinyint | Yes | false | NULL | | +-------+---------+------+-------+---------+-------+ 1 row in set (0.01 sec) ``` 2. nullable problem Modify the internal elements of nested types returned by JDBC to always be null, in order to maintain consistency with Doris' internal implementation ### Release note
Related PR: #32743 Problem Summary: problem before this pr: 1. null type problem the type of NULL is null_type, this will lead to error when select this view through jdbc catalog. ```sql mysql> CREATE VIEW test_null COMMENT '测试null类型' AS SELECT NULL AS `col1`; Query OK, 0 rows affected (0.02 sec) mysql> desc test_null; +-------+-----------+------+-------+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------+-----------+------+-------+---------+-------+ | col1 | null_type | Yes | false | NULL | | +-------+-----------+------+-------+---------+-------+ 1 row in set (0.00 sec) ``` after this pr, the type is changed to tinyint. mysql> CREATE VIEW test_null2 COMMENT '测试null类型' AS SELECT NULL AS `col1`; Query OK, 0 rows affected (0.03 sec) ```sql mysql> desc test_null2; +-------+---------+------+-------+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------+---------+------+-------+---------+-------+ | col1 | tinyint | Yes | false | NULL | | +-------+---------+------+-------+---------+-------+ 1 row in set (0.01 sec) ``` 2. nullable problem Modify the internal elements of nested types returned by JDBC to always be null, in order to maintain consistency with Doris' internal implementation ### Release note
Related PR: apache#32743 Problem Summary: problem before this pr: 1. null type problem the type of NULL is null_type, this will lead to error when select this view through jdbc catalog. ```sql mysql> CREATE VIEW test_null COMMENT '测试null类型' AS SELECT NULL AS `col1`; Query OK, 0 rows affected (0.02 sec) mysql> desc test_null; +-------+-----------+------+-------+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------+-----------+------+-------+---------+-------+ | col1 | null_type | Yes | false | NULL | | +-------+-----------+------+-------+---------+-------+ 1 row in set (0.00 sec) ``` after this pr, the type is changed to tinyint. mysql> CREATE VIEW test_null2 COMMENT '测试null类型' AS SELECT NULL AS `col1`; Query OK, 0 rows affected (0.03 sec) ```sql mysql> desc test_null2; +-------+---------+------+-------+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------+---------+------+-------+---------+-------+ | col1 | tinyint | Yes | false | NULL | | +-------+---------+------+-------+---------+-------+ 1 row in set (0.01 sec) ``` 2. nullable problem Modify the internal elements of nested types returned by JDBC to always be null, in order to maintain consistency with Doris' internal implementation ### Release note
This pr supports create view stmt in nereids planner. For example: