-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[fix](nereids) fix create view use null literal #49881
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
[fix](nereids) fix create view use null literal #49881
Conversation
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
09fd48b to
e04340b
Compare
|
run buildall |
|
run performance |
TPC-H: Total hot run time: 35033 ms |
TPC-DS: Total hot run time: 193450 ms |
ClickBench: Total hot run time: 31.45 s |
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
e04340b to
e044939
Compare
|
run buildall |
TPC-H: Total hot run time: 34053 ms |
TPC-DS: Total hot run time: 194315 ms |
ClickBench: Total hot run time: 31.39 s |
|
run buildall |
TPC-H: Total hot run time: 33847 ms |
TPC-DS: Total hot run time: 192182 ms |
ClickBench: Total hot run time: 29.17 s |
6e174d4 to
aa5f827
Compare
|
run buildall |
TPC-H: Total hot run time: 33896 ms |
TPC-DS: Total hot run time: 187244 ms |
ClickBench: Total hot run time: 29.36 s |
174e92c to
f406a93
Compare
|
run buildall |
TPC-H: Total hot run time: 33867 ms |
TPC-DS: Total hot run time: 192742 ms |
ClickBench: Total hot run time: 28.67 s |
|
run cloud_p0 |
|
run external |
|
PR approved by at least one committer and no changes requested. |
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
What problem does this PR solve?
Issue Number: close #xxx
Related PR: #32743
Problem Summary:
problem before this pr:
the type of NULL is null_type, this will lead to error when select this view through jdbc catalog.
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)
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
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)