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/10/05 14:49:35 UTC

Re: [PR] [TEST ONLY][SQL] Test resolve column references with PLAN_ID [spark]

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


##########
sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala:
##########
@@ -1489,7 +1476,7 @@ class Dataset[T] private[sql](
       case ParserUtils.qualifiedEscapedIdentifier(nameParts, columnNameRegex) =>
         Column(UnresolvedRegex(columnNameRegex, Some(nameParts), caseSensitive))
       case _ =>
-        Column(addDataFrameIdToCol(resolve(colName)))
+        Column(addPlanId(UnresolvedAttribute.quotedString(colName)))

Review Comment:
   I think we can still eagerly resolve the column here to make sure it exists, then create an `UnresolvedAttribute` from the resolved `AttributeReference`: `UnresolvedAttribute(Seq(attr.name))`.



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