Description
currently, we have RowToColumnConverter for all data types except AnsiIntervalType
// code placeholder val core = dataType match { case BinaryType => BinaryConverter case BooleanType => BooleanConverter case ByteType => ByteConverter case ShortType => ShortConverter case IntegerType | DateType => IntConverter case FloatType => FloatConverter case LongType | TimestampType => LongConverter case DoubleType => DoubleConverter case StringType => StringConverter case CalendarIntervalType => CalendarConverter case at: ArrayType => ArrayConverter(getConverterForType(at.elementType, at.containsNull)) case st: StructType => new StructConverter(st.fields.map( (f) => getConverterForType(f.dataType, f.nullable))) case dt: DecimalType => new DecimalConverter(dt) case mt: MapType => MapConverter(getConverterForType(mt.keyType, nullable = false), getConverterForType(mt.valueType, mt.valueContainsNull)) case unknown => throw QueryExecutionErrors.unsupportedDataTypeError(unknown.toString) } if (nullable) { dataType match { case CalendarIntervalType => new StructNullableTypeConverter(core) case st: StructType => new StructNullableTypeConverter(core) case _ => new BasicNullableTypeConverter(core) } } else { core }