I am getting the below error.
ClassCastException: class org.apache.parquet.column.statistics.LongStatistics cannot be cast to class org.apache.parquet.column.statistics.IntStatistics (org.apache.parquet.column.statistics.LongStatistics and org.apache.parquet.column.statistics.IntStatistics are in unnamed module of loader 'app')
The query I run is the below
with bad_weather_due_to_tropical_cyclone_warning_signals as (
SELECT *
FROM "l1"."hko"."hko_tropical_cyclone_warning_signals_history"
where signal = 10
), bad_weather_due_to_rainstorm as (
SELECT *
FROM "l1"."hko"."hko_rainstorm_warning_history"
where colour = 'B'
), all_days_with_bad_weather as (
select as_of_date_tz08, start_time, end_time from bad_weather_due_to_tropical_cyclone_warning_signals
UNION ALL
select as_of_date_tz08, start_time, end_time from bad_weather_due_to_rainstorm
), cte as (
SELECT as_of_date_tz08, start_time, end_time
from all_days_with_bad_weather
)
select * from cte where start_time > current_time()
I confirm that when I leave out the last WHERE clause, the query works fine.
SO I am pretty sure it is because the ** start_time > current_time() ** which caused the problem.
Atthaced is the query profile.
455ea182-fea7-4792-bbf3-bbe971688f0c.zip (24.3 KB)