mihaibudiu commented on code in PR #5428:
URL: https://github.com/apache/calcite/pull/5428#discussion_r4623378388
##########
piglet/src/main/java/org/apache/calcite/piglet/Handler.java:
##########
@@ -400,4 +400,16 @@ private ImmutableList<RexNode> toRex(Iterable<Ast.Node>
operands) {
private void register(String name) {
map.put(name, builder.peek());
}
+
+ /** Returns the relational expression registered under a given name.
+ *
+ * @throws IllegalArgumentException if no relational expression has that name
+ */
+ private RelNode get(String name) {
+ final RelNode relNode = map.get(name);
+ if (relNode == null) {
+ throw new IllegalArgumentException("unknown relation '" + name + "'");
Review Comment:
Is this the right exception?
Or maybe after validation this is expected to never happen?
--
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]