Github user marmbrus commented on a diff in the pull request:
https://github.com/apache/spark/pull/6165#discussion_r30837623
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/columnar/InMemoryColumnarTableScan.scala
---
@@ -314,7 +314,7 @@ private[sql] case class InMemoryColumnarTableScan(
columnAccessors(i).extractTo(nextRow, i)
i += 1
}
- nextRow
+ if (attributes.isEmpty) Row.empty else nextRow
--- End diff --
We need at least one column so that we know how many rows to produce, but
we should not include it in the output otherwise we will not match the schema
we are claiming to have. It would be better to just remember the number of
rows in a partition and use that instead. This is just a quick fix so we don't
return the wrong answer.
---
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]