Skip to content

Commit 1c27c59

Browse files
committed
Fix building of get array item
1 parent 3b0318f commit 1c27c59

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sql/catalyst/src/main/java/org/apache/spark/sql/connector/util/V2ExpressionSQLBuilder.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ public String build(Expression expr) {
8585
} else if (expr instanceof SortOrder sortOrder) {
8686
return visitSortOrder(
8787
build(sortOrder.expression()), sortOrder.direction(), sortOrder.nullOrdering());
88+
} else if (expr instanceof GetArrayItem getArrayItem) {
89+
return visitGetArrayItem(getArrayItem);
8890
} else if (expr instanceof GeneralScalarExpression e) {
8991
String name = e.name();
9092
return switch (name) {
@@ -128,7 +130,6 @@ yield visitBinaryArithmetic(
128130
case "LTRIM" -> visitTrim("LEADING", expressionsToStringArray(e.children()));
129131
case "RTRIM" -> visitTrim("TRAILING", expressionsToStringArray(e.children()));
130132
case "OVERLAY" -> visitOverlay(expressionsToStringArray(e.children()));
131-
case "GET_ARRAY_ITEM" -> visitGetArrayItem(expressionsToStringArray(e.children()));
132133
// TODO supports other expressions
133134
default -> visitUnexpectedExpr(expr);
134135
};

0 commit comments

Comments
 (0)