viirya commented on code in PR #211:
URL:
https://github.com/apache/arrow-datafusion-comet/pull/211#discussion_r1536562273
##########
spark/src/main/scala/org/apache/spark/sql/comet/CometBroadcastExchangeExec.scala:
##########
@@ -257,9 +257,28 @@ class CometBatchRDD(
}
override def compute(split: Partition, context: TaskContext):
Iterator[ColumnarBatch] = {
- val partition = split.asInstanceOf[CometBatchPartition]
+ new Iterator[ColumnarBatch] {
+ val partition = split.asInstanceOf[CometBatchPartition]
+ val batchesIter =
partition.value.value.map(CometExec.decodeBatches(_)).toIterator
+ var iter: Iterator[ColumnarBatch] = null
+
+ override def hasNext: Boolean = {
+ if (iter != null) {
+ if (iter.hasNext) {
+ return true
+ }
+ }
+ if (batchesIter.hasNext) {
+ iter = batchesIter.next()
+ return iter.hasNext
+ }
+ false
+ }
- partition.value.value.flatMap(CometExec.decodeBatches(_)).toIterator
Review Comment:
Yea
##########
spark/src/main/scala/org/apache/spark/sql/comet/operators.scala:
##########
@@ -644,10 +681,11 @@ case class CometSortMergeJoinExec(
override def equals(obj: Any): Boolean = {
obj match {
- case other: CometSortMergeJoinExec =>
+ case other: CometBroadcastHashJoinExec =>
this.leftKeys == other.leftKeys &&
this.rightKeys == other.rightKeys &&
this.condition == other.condition &&
+ this.buildSide == other.buildSide &&
Review Comment:
yes
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]