Csaba Ringhofer created IMPALA-12020:
----------------------------------------
Summary: Push down range predicates from timestamps through
year/month functions
Key: IMPALA-12020
URL: https://issues.apache.org/jira/browse/IMPALA-12020
Project: IMPALA
Issue Type: Improvement
Components: Frontend
Reporter: Csaba Ringhofer
IMPALA-10064 added support for pushing down range predicates for timestamp
columns to a date column with the date part of the timestamp, e.g.:
where cast(timestamp_col as date) = date_col and timestamp_col < "2023-03-23
15:00:00"
The planner infers predicate date_col<="2023-03-23".
Another common way to add partitioning based on a timestamp is to use
year/month/day functions, but the range predicates are not pushed down in that
case, e.g. in:
where year(timestamp_col)=year_col and timestamp_col < "2023-03-23"
The planner currently doesn't infer predicate year_col <= 2023
Generally the planner could recognize that the prefix of the timestamp (or
date) is covered by different columns and that these columns together can be
used in a range predicate,e.g:
where year(ts_col)=year_ col and month(ts_col)=month_col and ts_col<
"2023-03-23"
the following predicate could be constructed:
concat(year_col, "-", month_col, "01") <= "2023-03-23"
--
This message was sent by Atlassian Jira
(v8.20.10#820010)