cloud-fan commented on a change in pull request #32301:
URL: https://github.com/apache/spark/pull/32301#discussion_r620136649
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/NestedColumnAliasing.scala
##########
@@ -133,83 +204,77 @@ object NestedColumnAliasing {
}
/**
- * Return root references that are individually accessed as a whole, and
`GetStructField`s
- * or `GetArrayStructField`s which on top of other `ExtractValue`s or
special expressions.
- * Check `SelectedField` to see which expressions should be listed here.
+ * Check [[SelectedField]] to see which expressions should be listed here.
*/
- private def collectRootReferenceAndExtractValue(e: Expression):
Seq[Expression] = e match {
- case _: AttributeReference => Seq(e)
- case GetStructField(_: ExtractValue | _: AttributeReference, _, _) =>
Seq(e)
+ private def isSelectedField(e: Expression): Boolean = e match {
+ case GetStructField(_: ExtractValue | _: AttributeReference, _, _) => true
Review comment:
Not related to this PR: I don't get the reason to match `ExtractValue`.
For `GetStructField(GetArrayItem(Attribute, index), fieldName)`, how can the
data source support it?
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]