[ https://issues.apache.org/jira/browse/CALCITE-992?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15038386#comment-15038386 ]
Julian Hyde commented on CALCITE-992: ------------------------------------- [~maryannxue], The functionality I mentioned in our call this morning was EnumerableRelImplementor.stash. It allows you to pass in an object at implement time (i.e. when you are converting a RelNode tree to java code) and to be able to get that object at execute time (i.e. after that java code has been compiled using janino and is being run). See CALCITE-506. I don't know whether it solves the problem we have here, but I thought I'd mention it. The life cycle is slightly different. It's as if we need to stash an object (the sequence object) at parse/validate time and retrieve that object at implement or run time. But without putting the object into the RexNode tree. What we'd put into the RexNode tree is a RexDynamicParam with a unique name, and we'd have a map somewhere outside the RexNode tree from that name to the object value. > Validate and resolve sequence reference as a Table object > --------------------------------------------------------- > > Key: CALCITE-992 > URL: https://issues.apache.org/jira/browse/CALCITE-992 > Project: Calcite > Issue Type: Sub-task > Reporter: Maryann Xue > Assignee: Maryann Xue > Fix For: 1.6.0 > > Attachments: CALCITE-992.suggested.diff > > > Currently the validator does not validate if the sequence exists or if the > corresponding table is of the required type, etc. Also, in NEXT_VALUE and > CURRENT_VALUE function, we need the sequence Table object instead of the > sequence name string. -- This message was sent by Atlassian JIRA (v6.3.4#6332)