Zouxxyy opened a new pull request, #9908:
URL: https://github.com/apache/incubator-gluten/pull/9908
## What changes were proposed in this pull request?
Fix fallback sql
```
SELECT map_from_arrays(sequence(1, 5),sequence(1, 5)), string_column from t
```
```
java.lang.UnsupportedOperationException: Not supported on UnsafeArrayData.
at
org.apache.spark.sql.catalyst.expressions.UnsafeArrayData.array(UnsafeArrayData.java:103)
at
org.apache.gluten.substrait.expression.MapLiteralNode.updateLiteralBuilder(MapLiteralNode.java:34)
at
org.apache.gluten.substrait.expression.MapLiteralNode.updateLiteralBuilder(MapLiteralNode.java:27)
at
org.apache.gluten.substrait.expression.LiteralNodeWithValue.getLiteral(LiteralNodeWithValue.java:39)
at
org.apache.gluten.substrait.expression.LiteralNode.toProtobuf(LiteralNode.java:41)
at
org.apache.gluten.substrait.rel.ProjectRelNode.toProtobuf(ProjectRelNode.java:72)
at
org.apache.gluten.substrait.plan.PlanNode.toProtobuf(PlanNode.java:74)
```
In this PR:
- use `Object get(int ordinal, DataType dataType);` to obtain the value
instead of `ArrayData.array()`, so that for UnsafeArrayData or Unsafe map, it
can internally automatically parse out safe value
- Add `parseFromTypeNode` in `ConverterUtils` to parse TypeNode to Spark Data
- In order to obtain TypeNode's nullable, add `nullable()` in interface
TypeNode
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]