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

    https://github.com/apache/spark/pull/12047#discussion_r58746557
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetRelation.scala
 ---
    @@ -347,32 +358,24 @@ private[sql] class DefaultSource
           val attemptId = new TaskAttemptID(new TaskID(new JobID(), 
TaskType.MAP, 0), 0)
           val hadoopAttemptContext = new 
TaskAttemptContextImpl(broadcastedConf.value.value, attemptId)
     
    -      val parquetReader = try {
    -        if (!enableVectorizedParquetReader) sys.error("Vectorized reader 
turned off.")
    +      val parquetReader = if (enableVectorizedParquetReader) {
             val vectorizedReader = new VectorizedParquetRecordReader()
             vectorizedReader.initialize(split, hadoopAttemptContext)
             logDebug(s"Appending $partitionSchema ${file.partitionValues}")
             vectorizedReader.initBatch(partitionSchema, file.partitionValues)
    -        // Whole stage codegen (PhysicalRDD) is able to deal with batches 
directly
             // TODO: fix column appending
    -        if (enableWholestageCodegen) {
    -          logDebug(s"Enabling batch returning")
    -          vectorizedReader.enableReturningBatches()
    -        }
             vectorizedReader
    -      } catch {
    -        case NonFatal(e) =>
    -          logDebug(s"Falling back to parquet-mr: $e", e)
    -          val reader = pushed match {
    -            case Some(filter) =>
    -              new ParquetRecordReader[InternalRow](
    -                new CatalystReadSupport,
    -                FilterCompat.get(filter, null))
    -            case _ =>
    -              new ParquetRecordReader[InternalRow](new CatalystReadSupport)
    -          }
    -          reader.initialize(split, hadoopAttemptContext)
    -          reader
    +      } else {
    --- End diff --
    
    I think we lost the log messages that tell us that we are falling back on a 
different parquet reader.
    
    I love that we are getting rid of the try/catch!


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