MasseGuillaume commented on PR #3295: URL: https://github.com/apache/calcite/pull/3295#issuecomment-1638210127
@gabrywu I'm stuck on the runtime implementation. in JIRA: https://issues.apache.org/jira/browse/CALCITE-5701?focusedCommentId=17741811&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-17741811 > You should not be using SqlFunctions.item. The javadoc says "Implements item on an object whose type is not known until runtime". But you know the type is STRUCT(k1 VARCHAR, K2 INTEGER). You know that "k1" is item zero of the Object[]. You should translate "item" call to a field access. And then none of your changes to ItemImplementor will be necessary. I'm not too sure where that `translate "item" call to a field access` should happen. Maybe during the validation. (eg. `performUnconditionalRewrites`). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
