You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2022/11/29 15:47:21 UTC

[GitHub] [calcite] dssysolyatin commented on a diff in pull request #2890: [CALCITE-5259] Add getParameterRowType method to Planner interface

dssysolyatin commented on code in PR #2890:
URL: https://github.com/apache/calcite/pull/2890#discussion_r1034930593


##########
core/src/main/java/org/apache/calcite/prepare/PlannerImpl.java:
##########
@@ -237,6 +237,15 @@ private void ready() {
     return Pair.of(validatedNode, type);
   }
 
+  @Override public RelDataType getParameterRowType() {
+    if (state.ordinal() < State.STATE_4_VALIDATED.ordinal()) {
+      throw new RuntimeException("Need to call #validate() first");
+    }

Review Comment:
   @jbalint 
   `ensure` works differently. `ensure` checks if planner can move to next state. if ensure is used and user calls getParameterRowType from STATE_5_CONVERTED state, the `getParameterRowType` will throw exception
   



-- 
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: commits-unsubscribe@calcite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org