You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "Steve Carlin (Jira)" <ji...@apache.org> on 2026/07/10 23:22:00 UTC

[jira] [Resolved] (IMPALA-15125) Calcite Planner: Filter/Values merge failing after upgrade to Calcite 1.42

     [ https://issues.apache.org/jira/browse/IMPALA-15125?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Steve Carlin resolved IMPALA-15125.
-----------------------------------
    Resolution: Fixed

> Calcite Planner: Filter/Values merge failing after upgrade to Calcite 1.42
> --------------------------------------------------------------------------
>
>                 Key: IMPALA-15125
>                 URL: https://issues.apache.org/jira/browse/IMPALA-15125
>             Project: IMPALA
>          Issue Type: Sub-task
>            Reporter: Steve Carlin
>            Priority: Major
>
> The following query is failing to simplify a Filters-Value reduction:
>   select id, int_col,
>       row_number() over (order by string_col desc) as rownum
>   from functional.alltypesagg UNION ALL select 1, 2, 3) v 
> where rownum <= 20 db: default
> The following RelNodes are not being reduced:
>     LogicalFilter(condition=[<=(CAST($2):BIGINT, 20)]), id = 58
>       LogicalValues(tuples=[[\{ 1, 2, 3 }]]), id = 4
> Digging into the code a little bit:
> The filter condition in 1.41 contains the constant.  In 1.42, the filter expression initially contains the RexInputRef.  It does get reduced, but the reduction is to a RexCall, "CAST(true):boolean". That's as far as I got debugging, not sure why that isn't reducing.  Also, Calcite is not calling our reducer/simplifier, it is hardcoded into their rule.
> Because it's a filter on top of a Values, this will have minimal performance impact, since Values RelNodes will never be big, but this still should be fixed.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org