You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "zhengruifeng (via GitHub)" <gi...@apache.org> on 2023/09/26 02:52:27 UTC

[GitHub] [spark] zhengruifeng commented on a diff in pull request #43115: [TEST ONLY][SQL] Test resolve column references with PLAN_ID

zhengruifeng commented on code in PR #43115:
URL: https://github.com/apache/spark/pull/43115#discussion_r1336569941


##########
sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala:
##########
@@ -1446,15 +1446,15 @@ class Dataset[T] private[sql](
       if (sqlContext.conf.supportQuotedRegexColumnName) {
         colRegex(colName)
       } else {
-        Column(addDataFrameIdToCol(resolve(colName)))
+        Column(addPlanId(UnresolvedAttribute.quotedString(colName)))
       }
   }
 
   /**
    * Selects column based on the column index (0-based) and returns it as a [[Column]].
    */
   private[sql] def col(index: Int): Column = {
-    Column(addDataFrameIdToCol(queryExecution.analyzed.output(index)))

Review Comment:
   right now PLAN_ID is not actually used in GetColumnByOrdinal resolution, maybe we should  add it in 
   https://github.com/apache/spark/blob/2a10c8d93aa9033842471e4f676fddb3b3f90940/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/ColumnResolutionHelper.scala#L493-L506



-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org