Github user saucam commented on a diff in the pull request: https://github.com/apache/spark/pull/4469#discussion_r24315891 --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/types/dataTypes.scala --- @@ -362,7 +362,7 @@ case object BooleanType extends NativeType with PrimitiveType { * @group dataType */ @DeveloperApi -case object TimestampType extends NativeType { +case object TimestampType extends NativeType with PrimitiveType { --- End diff -- this is done, in case table is partitioned on a timestamp type column, parquet iterator returns a GenericRow due to this in ParquetTypes.scala : def isPrimitiveType(ctype: DataType): Boolean = classOf[PrimitiveType] isAssignableFrom ctype.getClass and in ParquetConverter.scala we have : protected[parquet] def createRootConverter( parquetSchema: MessageType, attributes: Seq[Attribute]): CatalystConverter = { // For non-nested types we use the optimized Row converter if (attributes.forall(a => ParquetTypesConverter.isPrimitiveType(a.dataType))) { new CatalystPrimitiveRowConverter(attributes.toArray) } else { new CatalystGroupConverter(attributes.toArray) } } which fails here later : new Iterator[Row] { def hasNext = iter.hasNext def next() = { val row = iter.next()._2.asInstanceOf[SpecificMutableRow] throwing a class cast exception that GenericRow cannot be cast to SpecificMutableRow Am I missing something here ?
--- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org