chenhao-db commented on code in PR #49263:
URL: https://github.com/apache/spark/pull/49263#discussion_r1895169091


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/parquet/SparkShreddingUtils.scala:
##########
@@ -188,6 +570,32 @@ case object SparkShreddingUtils {
       scalarSchema, objectSchema, arraySchema)
   }
 
+  // Convert a scalar variant schema into a Spark scalar type.
+  def scalarSchemaToSparkType(scalar: VariantSchema.ScalarType): DataType = 
scalar match {
+    case _: VariantSchema.StringType => StringType

Review Comment:
   I think we can just keep it as it is because:
   1. Essentially, this function only needs to process the `VariantSchema` 
returned by `buildVariantSchema`, which we have control of and will know it has 
changed.
   2. I cannot think of an easy way list all supported types. Decimal types can 
have many precision-scale combinations.



-- 
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]

Reply via email to