0

I have 2 different aggregation queries running in BATCH mode in flink

Query 1 : SELECT TUMBLE_END(trunc_time, INTERVAL '10' MINUTE) trunc_time, organization_id, cluster_safe_name, max(peak_cpu) AS peak_cpu, avg(average_cpu) AS average_cpu FROM cmeLoadData GROUP BY TUMBLE(trunc_time, INTERVAL '10' MINUTE), organization_id, cluster_safe_name

Query 2 : SELECT TUMBLE_END(trunc_time, INTERVAL '10' MINUTE) trunc_time, organization_id, cluster_safe_name, max(peak_cpu) AS peak_cpu, avg(average_cpu) AS average_cpu FROM cpuUsageData GROUP BY TUMBLE(trunc_time, INTERVAL '10' MINUTE), organization_id, cluster_safe_name

When I am trying to combine the queries like follows : SELECT TUMBLE_END(trunc_time, INTERVAL '10' MINUTE) trunc_time, organization_id, cluster_safe_name, max(peak_cpu) AS peak_cpu, avg(average_cpu) AS average_cpu FROM cmeLoadData GROUP BY TUMBLE(trunc_time, INTERVAL '10' MINUTE), organization_id, cluster_safe_name UNION ALL SELECT TUMBLE_END(trunc_time, INTERVAL '10' MINUTE) trunc_time, organization_id, cluster_safe_name, max(peak_cpu) AS peak_cpu, avg(average_cpu) AS average_cpu FROM cpuUsageData GROUP BY TUMBLE(trunc_time, INTERVAL '10' MINUTE), organization_id, cluster_safe_name

I get an error

Unsupported call: $TUMBLE(TIMESTAMP(3) NOT NULL, INTERVAL SECOND(3) NOT NULL) 
If you think this function should be supported, you can create an issue and start a discussion for it.
org.apache.flink.table.planner.codegen.CodeGenException: Unsupported call: $TUMBLE(TIMESTAMP(3) NOT NULL, INTERVAL SECOND(3) NOT NULL) 
If you think this function should be supported, you can create an issue and start a discussion for it.

Edit : I am using streamTableEnvirnoment to execute the query as follows => streamTableEnvirnoment.sqlQuery(query) and connected to database using JDBC Catalog

Kush Rohra
  • 15
  • 5

0 Answers0