Skip to content

Commit fe1b23f

Browse files
committed
add multiply children check
Signed-off-by: xinyual <xinyual@amazon.com>
1 parent fa2ec9e commit fe1b23f

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

core/src/main/java/org/opensearch/sql/calcite/CalciteRelNodeVisitor.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,9 @@ public RelNode visitAppendPipe(AppendPipe node, CalcitePlanContext context) {
248248
while (childNode.getChild() != null
249249
&& !childNode.getChild().isEmpty()
250250
&& !(childNode.getChild().getFirst() instanceof Values)) {
251+
if (childNode.getChild().size() > 1) {
252+
throw new RuntimeException("AppendPipe doesn't support multiply children subquery.");
253+
}
251254
childNode = (UnresolvedPlan) childNode.getChild().getFirst();
252255
}
253256
childNode.attach(node.getChild().getFirst());

0 commit comments

Comments
 (0)