[ 
https://issues.apache.org/jira/browse/CALCITE-7338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18045950#comment-18045950
 ] 

Yash Mayya commented on CALCITE-7338:
-------------------------------------

[~jensen] I'm not sure what you mean? I don't think hints are ever being 
attached to logical windows in any scenario at all - if you look at the 
[LogicalWindow|https://github.com/apache/calcite/blob/b12a9cefb67eefdd3b24ca2ac5893afeb021b80f/core/src/main/java/org/apache/calcite/rel/logical/LogicalWindow.java#L66]
 class, the only creation paths that are being called at all are the ones where 
the hints being passed are an empty list. So there's no "repro" required since 
hints with windows seem to be completely broken / unsupported.

> Window hints are not propagated to window rel nodes
> ---------------------------------------------------
>
>                 Key: CALCITE-7338
>                 URL: https://issues.apache.org/jira/browse/CALCITE-7338
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>            Reporter: Yash Mayya
>            Priority: Major
>
> Window hints don't currently seem to be propagated to the window rel nodes. 
> We're using hints in Apache Pinot's multi-stage query engine (which is built 
> on top of Calcite), and while hints on joins, aggregates, table scans etc. 
> work as expected, we've found that hints on windows are not propagating at 
> all. IIUC, most other logical nodes are created in the SqlToRelConverter 
> phase and hints are propagated to the appropriate rel node based on the hint 
> strategy table 
> [here|https://github.com/apache/calcite/blob/34989b0ed7793cedf713c2f159de6247a730458c/core/src/main/java/org/apache/calcite/sql2rel/SqlToRelConverter.java#L823-L842].
>  However, logical window nodes are created after the SqlToRelConverter phase, 
> by the 
> [ProjectToWindowRule|https://github.com/apache/calcite/blob/f19e854c39e5a43aea2323e455229bd8dfc6dcdb/core/src/main/java/org/apache/calcite/rel/rules/ProjectToWindowRule.java#L75]
>  planner rule - and it doesn’t look like there’s any logic there to preserve 
> or propagate hints.



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

Reply via email to