Skip to content
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

Result of synchronized materialized view with upper column names of the base table is wrong #31504

Closed
LiShuMing opened this issue Sep 20, 2023 · 0 comments · Fixed by #31505
Closed
Labels
type/bug Something isn't working

Comments

@LiShuMing
Copy link
Contributor

Steps to reproduce the behavior (Required)

CREATE TABLE `lineitem` (\n  `L_ORDERKEY` int(11) NOT NULL COMMENT "",\n  `L_PARTKEY` int(11) NOT NULL COMMENT "",\n  `L_SUPPKEY` int(11) NOT NULL COMMENT "",\n  `L_LINENUMBER` int(11) NOT NULL COMMENT "",\n  `L_QUANTITY` decimal64(15, 2) NOT NULL COMMENT "",\n  `L_EXTENDEDPRICE` decimal64(15, 2) NOT NULL COMMENT "",\n  `L_DISCOUNT` decimal64(15, 2) NOT NULL COMMENT "",\n  `L_TAX` decimal64(15, 2) NOT NULL COMMENT "",\n  `L_RETURNFLAG` char(1) NOT NULL COMMENT "",\n  `L_LINESTATUS` char(1) NOT NULL COMMENT "",\n  `L_SHIPDATE` date NOT NULL COMMENT "",\n  `L_COMMITDATE` date NOT NULL COMMENT "",\n  `L_RECEIPTDATE` date NOT NULL COMMENT "",\n  `L_SHIPINSTRUCT` char(25) NOT NULL COMMENT "",\n  `L_SHIPMODE` char(10) NOT NULL COMMENT "",\n  `L_COMMENT` varchar(44) NOT NULL COMMENT ""\n) ENGINE=OLAP \nDUPLICATE KEY(`L_ORDERKEY`)\nCOMMENT "OLAP"\nDISTRIBUTED BY HASH(`L_ORDERKEY`) BUCKETS 10 \nPROPERTIES (\n"replication_num" = "1",\n"in_memory" = "false",\n"enable_persistent_index" = "false",\n"replicated_storage" = "true",\n"compression" = "LZ4"\n);
create MATERIALIZED view my_test_mv2 as select L_LINESTATUS, sum(L_DISCOUNT), sum(L_TAX) from lineitem group by L_LINESTATUS

Expected behavior (Required)

l_linestatus column should not be null.

Real behavior (Required)

MySQL root@127.0.0.1:tpch>  select * from my_test_mv2 [_SYNC_MV_];
+--------------+-------------------+--------------+
| l_linestatus | mv_sum_l_discount | mv_sum_l_tax |
+--------------+-------------------+--------------+
|              | 29874.13          | 23941.37     |
|              | 29846.69          | 23890.56     |
|              | 29766.88          | 23798.42     |
|              | 29904.26          | 23942.12     |
|              | 30161.73          | 24107.16     |
|              | 29985.59          | 23984.34     |
|              | 30025.25          | 24082.90     |
|              | 30199.27          | 24146.46     |
|              | 30065.54          | 24054.70     |
|              | 30227.99          | 24181.64     |
+--------------+-------------------+--------------+
10 rows in set

StarRocks version (Required)

  • You can get the StarRocks version by executing SQL select current_version()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant