spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From liancheng <...@git.apache.org>
Subject [GitHub] spark pull request: [SPARK-7068][SQL] Remove PrimitiveType
Date Thu, 23 Apr 2015 05:20:30 GMT
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Mime
View raw message