maropu edited a comment on issue #23635: [SPARK-26709][SQL] OptimizeMetadataOnlyQuery does not handle empty records correctly URL: https://github.com/apache/spark/pull/23635#issuecomment-457141942 How about enabling this opt. only if #files > 1 in `PartitionedRelation`? ``` object PartitionedRelation extends PredicateHelper { def unapply(plan: LogicalPlan): Option[(AttributeSet, LogicalPlan)] = { plan match { case l @ LogicalRelation(fsRelation: HadoopFsRelation, _, _, _) if fsRelation.partitionSchema.nonEmpty && fsRelation.location.inputFiles.length > 1 => val partAttrs = AttributeSet(getPartitionAttrs(fsRelation.partitionSchema.map(_.name), l)) Some((partAttrs, l)) ... ```
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
