cloud-fan commented on code in PR #53832:
URL: https://github.com/apache/spark/pull/53832#discussion_r2703109760


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/ColumnResolutionHelper.scala:
##########
@@ -616,11 +616,7 @@ trait ColumnResolutionHelper extends Logging with 
DataTypeErrorsBase {
     // the dataframe column 'df.id' will remain unresolved, and the analyzer
     // will try to resolve 'id' without plan id later.
     val filtered = resolved.filter { r =>
-      if (isMetadataAccess) {
-        r._1.references.subsetOf(AttributeSet(p.output ++ p.metadataOutput))
-      } else {
-        r._1.references.subsetOf(p.outputSet)
-      }
+      r._1.references.subsetOf(AttributeSet(p.output ++ p.metadataOutput))

Review Comment:
   let's add a comment to explain it.
   ```
   // A DataFrame column can be resolved as a metadata column, we should keep 
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.

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]

Reply via email to