Skip to content

Commit 8cb30eb

Browse files
committed
feat: add read array support
1 parent ee18241 commit 8cb30eb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

spark/src/main/scala/org/apache/comet/serde/QueryPlanSerde.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ object QueryPlanSerde extends Logging with ShimQueryPlanSerde with CometExprShim
6969
case s: StructType if allowComplex =>
7070
s.fields.map(_.dataType).forall(supportedDataType(_, allowComplex))
7171
case a: ArrayType if allowComplex =>
72-
supportedDataType(a.elementType)
72+
supportedDataType(a.elementType, allowComplex)
7373
case dt =>
7474
emitWarning(s"unsupported Spark data type: $dt")
7575
false
@@ -2767,7 +2767,8 @@ object QueryPlanSerde extends Logging with ShimQueryPlanSerde with CometExprShim
27672767
fields.map(f => f.name).distinct.length == fields.length
27682768
case ArrayType(ArrayType(_, _), _) => false // TODO: nested array is not supported
27692769
case ArrayType(MapType(_, _, _), _) => false // TODO: map array element is not supported
2770-
case ArrayType(_, _) => false // TODO: array type is not supported
2770+
case ArrayType(elementType, _) =>
2771+
supportedDataType(elementType)
27712772
case MapType(MapType(_, _, _), _, _) => false // TODO: nested map is not supported
27722773
case MapType(_, MapType(_, _, _), _) => false
27732774
case MapType(StructType(_), _, _) => false // TODO: struct map key/value is not supported

0 commit comments

Comments
 (0)