Github user rxin commented on a diff in the pull request:
https://github.com/apache/spark/pull/10604#discussion_r49812025
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/ExistingRDD.scala ---
@@ -130,6 +132,21 @@ private[sql] object PhysicalRDD {
metadata: Map[String, String] = Map.empty): PhysicalRDD = {
// All HadoopFsRelations output UnsafeRows
val outputUnsafeRows = relation.isInstanceOf[HadoopFsRelation]
- PhysicalRDD(output, rdd, relation.toString, metadata, outputUnsafeRows)
+
+ val bucketSpec = relation match {
+ case r: HadoopFsRelation => r.getBucketSpec
+ case _ => None
+ }
+
+ def toAttribute(colName: String): Attribute = output.find(_.name ==
colName).get
--- End diff --
that's too far away from this code and can easily by changed in the future.
I'd add an error message in case it is not found.
---
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]