Skip to content

Commit

Permalink
fix outputPartitioning
Browse files Browse the repository at this point in the history
  • Loading branch information
jose-torres committed Mar 5, 2018
1 parent d4481e7 commit f637476
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@ case class DataSourceV2ScanExec(
case r: SupportsScanColumnarBatch if r.enableBatchRead() && batchReaderFactories.size == 1 =>
SinglePartition

case _ if readerFactories.size == 1 => SinglePartition
case r: SupportsScanColumnarBatch if !r.enableBatchRead() && readerFactories.size == 1 =>
SinglePartition

case r if !r.isInstanceOf[SupportsScanColumnarBatch] && readerFactories.size == 1 =>
SinglePartition

case s: SupportsReportPartitioning =>
new DataSourcePartitioning(
Expand Down Expand Up @@ -81,7 +85,7 @@ case class DataSourceV2ScanExec(
.asInstanceOf[RDD[InternalRow]]

case r: SupportsScanColumnarBatch if r.enableBatchRead() =>
new DataSourceRDD(sparkContext, readerFactories).asInstanceOf[RDD[InternalRow]]
new DataSourceRDD(sparkContext, batchReaderFactories).asInstanceOf[RDD[InternalRow]]

case _ =>
new DataSourceRDD(sparkContext, readerFactories).asInstanceOf[RDD[InternalRow]]
Expand Down

0 comments on commit f637476

Please sign in to comment.