Github user rxin commented on a diff in the pull request:
https://github.com/apache/spark/pull/12102#discussion_r58289519
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/joins/HashedRelation.scala
---
@@ -422,25 +384,36 @@ private[joins] final class LongArrayRelation(
private var offsets: Array[Int],
private var sizes: Array[Int],
private var bytes: Array[Byte]
- ) extends UniqueHashedRelation with LongHashedRelation with
Externalizable {
+ ) extends LongHashedRelation with Externalizable {
// Needed for serialization (it is public to make Java serialization
work)
def this() = this(0, 0L, null, null, null)
- override def getValue(key: InternalRow): InternalRow = {
- getValue(key.getLong(0))
+ override def allUnique: Boolean = true
+
+ override def copy(): LongArrayRelation = {
+ new LongArrayRelation(numFields, start, offsets, sizes, bytes)
}
override def getMemorySize: Long = {
offsets.length * 4 + sizes.length * 4 + bytes.length
}
+ override def get(key: Long): Iterator[InternalRow] = {
+ val row = getValue(key)
+ if (row != null) {
+ Seq(row).toIterator
--- End diff --
this is just Iterator(row)
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]