szehon-ho commented on code in PR #58666:
URL: https://github.com/apache/spark/pull/58666#discussion_r3974651201
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/execution/datasources/v2/DataSourceV2Relation.scala:
##########
@@ -573,6 +574,12 @@ object DataSourceV2Relation {
}
var colStats: Seq[(Attribute, ColumnStat)] = Seq.empty[(Attribute,
ColumnStat)]
+ // A column statistic corresponds to a single top-level output column, so
match the connector's
Review Comment:
please remove these excessive comments about what code it should not call,
we should just describe what the method does (ie,first sentence)
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/execution/datasources/v2/DataSourceV2Relation.scala:
##########
@@ -573,6 +574,12 @@ object DataSourceV2Relation {
}
var colStats: Seq[(Attribute, ColumnStat)] = Seq.empty[(Attribute,
ColumnStat)]
+ // A column statistic corresponds to a single top-level output column, so
match the connector's
Review Comment:
Also this is not right, a DSV2 column stat can correspond to a nested
column, just Spark catalyst stat doesnt represent it yet
##########
sql/catalyst/src/test/scala/org/apache/spark/sql/execution/datasources/v2/DataSourceV2RelationSuite.scala:
##########
@@ -163,6 +163,75 @@ class DataSourceV2RelationSuite extends SparkFunSuite with
SQLHelper {
}
}
+ test("DataSourceV2ScanRelation.computeStats matches column stats for names
needing quoting") {
+ // A top-level column whose name is not a plain identifier ("col-1"
contains a dash, so it is
Review Comment:
let's avoid naming NamedReference.describe() code in the comment.
--
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]