[ https://issues.apache.org/jira/browse/FLINK-25499?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Flink Jira Bot updated FLINK-25499: ----------------------------------- Labels: ambiguous stale-major window_start (was: ambiguous window_start) I am the [Flink Jira Bot|https://github.com/apache/flink-jira-bot/] and I help the community manage its development. I see this issues has been marked as Major but is unassigned and neither itself nor its Sub-Tasks have been updated for 60 days. I have gone ahead and added a "stale-major" to the issue". If this ticket is a Major, please either assign yourself or give an update. Afterwards, please remove the label or in 7 days the issue will be deprioritized. > Column 'window_start' is ambiguous > ---------------------------------- > > Key: FLINK-25499 > URL: https://issues.apache.org/jira/browse/FLINK-25499 > Project: Flink > Issue Type: Bug > Components: Table SQL / API > Affects Versions: 1.14.2 > Environment: Flink 1.14.0 > Reporter: Shandy > Priority: Major > Labels: ambiguous, stale-major, window_start > > *For docs: [Window > Aggregation|https://nightlies.apache.org/flink/flink-docs-release-1.14/docs/dev/table/sql/queries/window-agg/#cascading-window-aggregation]* > *use sql-client create view such as:* > ================================================= > CREATE TEMPORARY VIEW IF NOT EXISTS telemetry_r_yangchen_standard_t > AS > ( > SELECT a.window_start,a.window_end,a.window_time as > rowTime,last_value(a.tenantId) as tenantId > FROM TABLE(TUMBLE(TABLE telemetry_r_yangchen_normal, > DESCRIPTOR(receiveTimeTS), INTERVAL '10' MINUTES)) as a > group by a.window_start, a.window_end,a.window_time > ); > SELECT b.window_start, b.window_end,b.window_time as rowTime,sum(b.tenantId) > as tenantId > FROM TABLE(TUMBLE(TABLE telemetry_r_yangchen_standard_t, > DESCRIPTOR(rowTime), INTERVAL '60' MINUTES)) as b > group by b.window_start, b.window_end,b.window_time; > ================================================= > *above select occurs error message:* > {color:#ff0000}*[ERROR] Could not execute SQL statement. Reason: > org.apache.calcite.sql.validate.SqlValidatorException: Column 'window_start' > is ambiguous > *{color} > *if modify create sql like this :* > ============================================ > CREATE TEMPORARY VIEW IF NOT EXISTS telemetry_r_yangchen_standard_t > AS > ( > SELECT {color:#de350b}-a.windw_start,-{color}a.window_end,a.window_time > as rowTime,last_value(a.tenantId) as tenantId > FROM TABLE(TUMBLE(TABLE telemetry_r_yangchen_normal, > DESCRIPTOR(receiveTimeTS), INTERVAL '10' MINUTES)) as a > group by a.window_start, a.window_end,a.window_time > ); > *or* > CREATE TEMPORARY VIEW IF NOT EXISTS telemetry_r_yangchen_standard_t > AS > ( > SELECT {color:#de350b}cast(a.window_start as timestamp) as > windowStart,cast(a.window_end as timestamp) as windowEnd,{color}a.window_time > as rowTime,last_value(a.tenantId) as tenantId > FROM TABLE(TUMBLE(TABLE telemetry_r_yangchen_normal, > DESCRIPTOR(receiveTimeTS), INTERVAL '10' MINUTES)) as a > group by a.window_start, a.window_end,a.window_time > ); > ============================================ > *then, above select-sql can be executed ok!* -- This message was sent by Atlassian Jira (v8.20.1#820001)