You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The question is how to express same column name in a single relation. As @xiangjinwu points out, PG do not support it. #1283 (comment)
Now we are using a new way, always specify column name when create join MV (or your input has same column name). #1291. But the problem is, it makes user's efforts to express a All column CROSS JOIN.
After offline discuss with @xiangjinwu , I think a better way is: We do not allow same column name in a MV. However, it is user's responsibility to do not allow same column name in output:
create materialized view mv1 asselectA.v1, B.v1from A, B whereA.v1=B.v1// fail
create materialized view mv1 asselect*from A, B whereA.v1=B.v1// fail
create materialized view mv1 asselectA.v1from A, B whereA.v1=B.v1// success
create materialized view mv1 asselectA.v1, B.v1as v10 from A, B whereA.v1=B.v1// success
The text was updated successfully, but these errors were encountered:
BowenXiao1999
changed the title
RFC: Always specify column name when create MV Join?
RFC: create Join MV should not allow same column name?
Mar 28, 2022
BowenXiao1999
changed the title
RFC: create Join MV should not allow same column name?
RFC: create Join MV should not allow same column name
Mar 28, 2022
Could we unify the naming behavior with batch join?
The tricky part is: Batch join allows this. Because database do not need to memorize batch query results, so it do not need to worry about how to store two column with same name. But create MV is not allowed.. MV will be persistent and query later
Previously in java, we are expressing a MV like this:
https://github.com/singularity-data/risingwave/blob/347589e03f854c995ccbfcd74c6f349214991421/e2e_test/streaming/join.slt#L4-L23
That is, we do not need to specify column name when create streaming join (select * from t1 INNER JOIN t2 ON t1.v1=t2.v1). And we use a very hack way to express same column name columns (
v10
,v20
etc). Of courser users won't know this when use, so we must change it in a way.The question is how to express same column name in a single relation. As @xiangjinwu points out, PG do not support it. #1283 (comment)
Now we are using a new way, always specify column name when create join MV (or your input has same column name). #1291. But the problem is, it makes user's efforts to express a All column CROSS JOIN.
After offline discuss with @xiangjinwu , I think a better way is: We do not allow same column name in a MV. However, it is user's responsibility to do not allow same column name in output:
The text was updated successfully, but these errors were encountered: