Streams on views: Changes to column behavior when selecting from a stream (Pending)¶
Attention
This behavior change is in the 2025_01 bundle.
For the current status of the bundle, refer to Bundle History.
When this behavior change bundle is enabled, queries on streams that read from views behave as follows:
- Before the change:
When you create a stream on a view with an explicit column list, streams on that view contain the columns that appear in the view’s SELECT statement, rather than those in the column list.
In the following example, stream
stream1
would contain columnscolumnA
andcolumnB
.CREATE TABLE table1(columnA INT, columnB INT); CREATE VIEW view1(columnC, columnD) AS SELECT * FROM table1; CREATE STREAM stream1 ON VIEW view1;
- After the change:
When you create a stream on a view with an explicit column list, the stream contains exactly the same columns as the view.
In the following example, stream
stream1
would contain columnscolumnC
andcolumnD
.CREATE TABLE table1(columnA INT, columnB INT); CREATE VIEW view1(columnC, columnD) AS SELECT * FROM table1; CREATE STREAM stream1 ON VIEW view1;
Ref: 1834