Github user liancheng commented on a diff in the pull request:

    https://github.com/apache/spark/pull/5646#discussion_r28937072
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/parquet/ParquetTypes.scala ---
    @@ -48,8 +48,10 @@ private[parquet] case class ParquetTypeInfo(
       length: Option[Int] = None)
     
     private[parquet] object ParquetTypesConverter extends Logging {
    -  def isPrimitiveType(ctype: DataType): Boolean =
    -    classOf[PrimitiveType] isAssignableFrom ctype.getClass
    +  def isPrimitiveType(ctype: DataType): Boolean = ctype match {
    +    case _: NumericType | BooleanType | StringType | BinaryType => true
    --- End diff --
    
    We need to put all types other than `MapType`, `ArrayType`, and 
`StructType` here. Parquet uses this function to create record converters 
[here] [1].
    
    [1]: 
https://github.com/apache/spark/blob/03e85b4a11899f37424cd6e1f8d71f1d704c90bb/sql/core/src/main/scala/org/apache/spark/sql/parquet/ParquetConverter.scala#L161-L165


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to