Uh oh!
There was an error while loading. Please reload this page.
[Feat](nereids) support generated column - #35284
Conversation
doris-robot
commented
May 23, 2024
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
feiniaofeiafei
commented
May 23, 2024
run buildall |
doris-robot
commented
May 23, 2024
TPC-H: Total hot run time: 42137 ms |
doris-robot
commented
May 23, 2024
TPC-DS: Total hot run time: 169485 ms |
doris-robot
commented
May 23, 2024
ClickBench: Total hot run time: 31.16 s |
feiniaofeiafei
commented
May 23, 2024
run p0 |
morrySnow
commented
May 24, 2024
Add a description explaining the functionality scope of generated columns, and include simple usage examples. Additionally, update the Doris documentation in https://github.com/apache/doris-website to include a description of this functionality. |
feiniaofeiafei
commented
May 27, 2024
run buildall |
1 similar comment
feiniaofeiafei
commented
May 27, 2024
run buildall |
doris-robot
commented
May 27, 2024
TPC-H: Total hot run time: 41819 ms |
doris-robot
commented
May 27, 2024
TPC-DS: Total hot run time: 168894 ms |
doris-robot
commented
May 27, 2024
ClickBench: Total hot run time: 30.43 s |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
f6ee3ad to
19c5b58Comparefeiniaofeiafei
commented
May 31, 2024
run buildall |
doris-robot
commented
May 31, 2024
TPC-H: Total hot run time: 41123 ms |
doris-robot
commented
May 31, 2024
TPC-DS: Total hot run time: 170158 ms |
doris-robot
commented
May 31, 2024
ClickBench: Total hot run time: 31.56 s |
feiniaofeiafei
commented
May 31, 2024
run buildall |
1 similar comment
feiniaofeiafei
commented
May 31, 2024
run buildall |
77d7686 to
b1a52bcComparefeiniaofeiafei
commented
May 31, 2024
run buildall |
doris-robot
commented
May 31, 2024
TPC-H: Total hot run time: 39818 ms |
feiniaofeiafei
commented
Jun 2, 2024
run buildall |
doris-robot
commented
Jun 2, 2024
TPC-H: Total hot run time: 41289 ms |
feiniaofeiafei
commented
Jun 2, 2024
run buildall |
feiniaofeiafei
commented
Jun 3, 2024
run external |
feiniaofeiafei
commented
Jun 3, 2024
run buildall |
doris-robot
commented
Jun 3, 2024
TPC-H: Total hot run time: 40610 ms |
8cc317a to
f636264Comparefeiniaofeiafei
commented
Jun 24, 2024
run buildall |
doris-robot
commented
Jun 24, 2024
TPC-H: Total hot run time: 40659 ms |
doris-robot
commented
Jun 24, 2024
TPC-DS: Total hot run time: 174053 ms |
doris-robot
commented
Jun 24, 2024
ClickBench: Total hot run time: 31.15 s |
This pr has added support for generated columns. Values of a generated
column are computed from an expression included in the column
definition. Here is an example:
mysql> CREATE TABLE products (
product_id INT,
price DECIMAL(10,2),
quantity INT,
total_value DECIMAL(10,2) GENERATED ALWAYS AS (price * quantity)
) DISTRIBUTED BY HASH(product_id) PROPERTIES ("replication_num" = "1");
mysql> insert into products values(1, 10.00, 10, default);
mysql> insert into products(product_id, price, quantity) values(1, 20.00, 10);
mysql> select * from products;
+------------+-------+----------+-------------+
| product_id | price | quantity | total_value |
+------------+-------+----------+-------------+
| 1 | 10.00 | 10 | 100.00 |
| 1 | 20.00 | 10 | 200.00 |
+------------+-------+----------+-------------+
related docs in apache/doris-website#715
---------
Co-authored-by: feiniaofeiafei <moailing@selectdb.com>…ssionToExpr (#36824) introduced by #35284 Fix generated column, static variables should not be used in ExpressionToExpr. There is only one static variable slotRefMap in the ExpressionToExpr class globally. It may be used by multiple threads at the same time and assigned repeatedly, which is problematic. The same reason applies to the modification of class slotRefRewriteRule. No regression case added because this problem does not occur every time. --------- Co-authored-by: feiniaofeiafei <moailing@selectdb.com>
…ssionToExpr (#36824) introduced by #35284 Fix generated column, static variables should not be used in ExpressionToExpr. There is only one static variable slotRefMap in the ExpressionToExpr class globally. It may be used by multiple threads at the same time and assigned repeatedly, which is problematic. The same reason applies to the modification of class slotRefRewriteRule. No regression case added because this problem does not occur every time. --------- Co-authored-by: feiniaofeiafei <moailing@selectdb.com>
related code in apache/doris#35284 --------- Co-authored-by: feiniaofeiafei <moailing@selectdb.com>
### What problem does this PR solve? Related PR: #35284 Problem Summary: Generate column need add cast(casting slot to its own type) in stream load, because when loading data(stream load and other load), the slots reading from files are string type. So we need to cast it to its own type to avoid error.
### What problem does this PR solve? Related PR: #35284 Problem Summary: Generate column need add cast(casting slot to its own type) in stream load, because when loading data(stream load and other load), the slots reading from files are string type. So we need to cast it to its own type to avoid error.
…he#49167) ### What problem does this PR solve? Related PR: apache#35284 Problem Summary: Generate column need add cast(casting slot to its own type) in stream load, because when loading data(stream load and other load), the slots reading from files are string type. So we need to cast it to its own type to avoid error.
…he#49167) ### What problem does this PR solve? Related PR: apache#35284 Problem Summary: Generate column need add cast(casting slot to its own type) in stream load, because when loading data(stream load and other load), the slots reading from files are string type. So we need to cast it to its own type to avoid error.
This pr has added support for generated columns. Values of a generated
column are computed from an expression included in the column
definition. Here is an example:
mysql> CREATE TABLE products (
product_id INT,
price DECIMAL(10,2),
quantity INT,
total_value DECIMAL(10,2) GENERATED ALWAYS AS (price * quantity)
) DISTRIBUTED BY HASH(product_id) PROPERTIES ("replication_num" = "1");
mysql> insert into products values(1, 10.00, 10, default);
mysql> insert into products(product_id, price, quantity) values(1, 20.00, 10);
mysql> select * from products;
+------------+-------+----------+-------------+
| product_id | price | quantity | total_value |
+------------+-------+----------+-------------+
| 1 | 10.00 | 10 | 100.00 |
| 1 | 20.00 | 10 | 200.00 |
+------------+-------+----------+-------------+
related docs in apache/doris-website#715
---------
Co-authored-by: feiniaofeiafei <moailing@selectdb.com>…ssionToExpr (apache#36824) introduced by apache#35284 Fix generated column, static variables should not be used in ExpressionToExpr. There is only one static variable slotRefMap in the ExpressionToExpr class globally. It may be used by multiple threads at the same time and assigned repeatedly, which is problematic. The same reason applies to the modification of class slotRefRewriteRule. No regression case added because this problem does not occur every time. --------- Co-authored-by: feiniaofeiafei <moailing@selectdb.com>
This pr has added support for generated columns. Values of a generated column are computed from an expression included in the column definition. Here is an example:
related docs in apache/doris-website#715