Github user rdblue commented on a diff in the pull request:
https://github.com/apache/spark/pull/22009#discussion_r208636636
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/DataSourceRDD.scala
---
@@ -51,18 +58,19 @@ class DataSourceRDD[T: ClassTag](
valuePrepared
}
- override def next(): T = {
+ override def next(): Any = {
if (!hasNext) {
throw new java.util.NoSuchElementException("End of stream")
}
valuePrepared = false
reader.get()
}
}
- new InterruptibleIterator(context, iter)
+ // TODO: get rid of this type hack.
+ new InterruptibleIterator(context,
iter.asInstanceOf[Iterator[InternalRow]])
--- End diff --
Where is the issue to fix this hack?
This seems like something that should never have happened. We can simply
have an additional trait on a `RDD[InternalRow]` to fetch the underlying
iterator of `ColumnarBatch`. The codegen path should check for that and use it.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]