-
Notifications
You must be signed in to change notification settings - Fork 210
Closed
Description
auron/spark-extension/src/main/scala/org/apache/spark/sql/auron/NativeConverters.scala
Lines 105 to 121 in 8ab5b5a
| def scalarTypeSupported(dataType: DataType): Boolean = { | |
| dataType match { | |
| case NullType | BooleanType | ByteType | ShortType | IntegerType | LongType | FloatType | | |
| DoubleType | StringType | DateType | TimestampType => | |
| true | |
| case t: DecimalType if DecimalType.is64BitDecimalType(t) => true | |
| case _: DecimalType => | |
| // auron only supports 64-bit decimal | |
| false | |
| case at: ArrayType => scalarTypeSupported(at.elementType) | |
| case m: MapType => | |
| scalarTypeSupported(m.keyType) && scalarTypeSupported(m.valueType) | |
| case s: StructType => | |
| s.fields.forall(e => scalarTypeSupported(e.dataType)) | |
| case _ => false | |
| } | |
| } |
The function name says it checks whether the scalar type is supported, but it actually also handles complex types(Map, Array, Struct), the name is misleading.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels