视图上的流:从流中选择时列行为的变更

Attention

This behavior change is in the 2025_01 bundle.

For the current status of the bundle, refer to Bundle History.

启用此行为更改捆绑包后,对从视图中读取的流的查询行为如下:

Before the change:

在具有显式列列表的视图上创建流时,该视图上的流包含该视图的 SELECT 语句中显示的列,而不是列列表中的列。

In the following example, stream stream1 would contain columns columnA and columnB.

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:

在具有显式列列表的视图上创建流时,流包含的列与视图完全相同。

In the following example, stream stream1 would contain columns columnC and columnD.

CREATE TABLE table1(columnA INT, columnB INT);

CREATE VIEW view1(columnC, columnD)
AS
  SELECT * FROM table1;

CREATE STREAM stream1 ON VIEW view1;

参考:1834