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

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

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


##########
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:
   where do we use it? I feel it's risky to get dataframe column references by ordinal. If it's ambiguous, there is no way to fix it, as it can't use qualified names.



-- 
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