[
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 auto-deprioritized-major auto-deprioritized-minor
window_start (was: ambiguous auto-deprioritized-major stale-minor window_start)
Priority: Not a Priority (was: Minor)
This issue was labeled "stale-minor" 7 days ago and has not received any
updates so it is being deprioritized. If this ticket is actually Minor, please
raise the priority and ask a committer to assign you the issue or revive the
public discussion.
> 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: Not a Priority
> Labels: ambiguous, auto-deprioritized-major,
> auto-deprioritized-minor, 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.10#820010)