Skip to content

Commit

Permalink
enable all complex data type
Browse files Browse the repository at this point in the history
  • Loading branch information
binwei committed Aug 20, 2024
1 parent 5f036a5 commit 978f7fe
Showing 1 changed file with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,28 +127,28 @@ object VeloxBackendSettings extends BackendSettingsApi {
case ParquetReadFormat =>
val typeValidator: PartialFunction[StructField, String] = {
// Parquet scan of nested array with struct/array as element type is unsupported in Velox.
case StructField(_, arrayType: ArrayType, _, _)
if arrayType.elementType.isInstanceOf[StructType] =>
"StructType as element in ArrayType"
case StructField(_, arrayType: ArrayType, _, _)
if arrayType.elementType.isInstanceOf[ArrayType] =>
"ArrayType as element in ArrayType"
// case StructField(_, arrayType: ArrayType, _, _)
// if arrayType.elementType.isInstanceOf[StructType] =>
// "StructType as element in ArrayType"
// case StructField(_, arrayType: ArrayType, _, _)
// if arrayType.elementType.isInstanceOf[ArrayType] =>
// "ArrayType as element in ArrayType"
// Parquet scan of nested map with struct as key type,
// or array type as value type is not supported in Velox.
case StructField(_, mapType: MapType, _, _) if mapType.keyType.isInstanceOf[StructType] =>
"StructType as Key in MapType"
case StructField(_, mapType: MapType, _, _)
if mapType.valueType.isInstanceOf[ArrayType] =>
"ArrayType as Value in MapType"
// case StructField(_, mapType: MapType, _, _) if mapType.keyType.isInstanceOf[StructType] =>
// "StructType as Key in MapType"
// case StructField(_, mapType: MapType, _, _)
// if mapType.valueType.isInstanceOf[ArrayType] =>
// "ArrayType as Value in MapType"
case StructField(_, TimestampType, _, _)
if GlutenConfig.getConf.forceParquetTimestampTypeScanFallbackEnabled =>
"TimestampType"
}
if (!GlutenConfig.getConf.forceComplexTypeScanFallbackEnabled) {
validateTypes(typeValidator)
} else {
validateTypes(parquetTypeValidatorWithComplexTypeFallback)
}
// if (!GlutenConfig.getConf.forceComplexTypeScanFallbackEnabled) {
validateTypes(typeValidator)
// } else {
// validateTypes(parquetTypeValidatorWithComplexTypeFallback)
// }
case DwrfReadFormat => ValidationResult.succeeded
case OrcReadFormat =>
if (!GlutenConfig.getConf.veloxOrcScanEnabled) {
Expand Down

0 comments on commit 978f7fe

Please sign in to comment.