LuciferYang commented on code in PR #56430:
URL: https://github.com/apache/spark/pull/56430#discussion_r3676010095
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/columnar/GenerateColumnAccessor.scala:
##########
@@ -26,9 +26,20 @@ import org.apache.spark.sql.types._
import org.apache.spark.unsafe.types.CalendarInterval
/**
- * An Iterator to walk through the InternalRows from a CachedBatch
+ * Walks through the InternalRows from a CachedBatch.
+ *
+ * Intentionally NOT a `scala.collection.Iterator`: the subclass of this type
is
+ * produced by runtime codegen, and the JDK compiler (the alternative codegen
+ * backend) cannot compile a subclass of a Scala collection trait - its rich
+ * generic method hierarchy (e.g. `minBy`) produces raw-vs-generic override
+ * clashes that javac rejects (Janino does not). Declaring only the three
methods
+ * the generated class implements keeps the javac-visible ancestry rooted at
+ * `Object`. Callers adapt instances to `Iterator[InternalRow]` (see
+ * InMemoryRelation).
*/
-abstract class ColumnarIterator extends Iterator[InternalRow] {
+abstract class ColumnarIterator {
+ def hasNext: Boolean
+ def next(): InternalRow
Review Comment:
Let me plan this out.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]