nebojsa-db opened a new pull request, #47180:
URL: https://github.com/apache/spark/pull/47180

   ### What changes were proposed in this pull request?
   DECLARE agg = 'max';
   DECLARE col = 'c1';
   DECLARE tab = 'T';
   
   WITH S(c1, c2) AS (VALUES(1, 2), (2, 3)),
         T(c1, c2) AS (VALUES ('a', 'b'), ('c', 'd'))
   SELECT IDENTIFIER(agg)(IDENTIFIER(col)) FROM IDENTIFIER(tab);
   
   -- OR 
   
   WITH S(c1, c2) AS (VALUES(1, 2), (2, 3)),
         T(c1, c2) AS (VALUES ('a', 'b'), ('c', 'd'))
   SELECT IDENTIFIER('max')(IDENTIFIER('c1')) FROM IDENTIFIER('T');
   
   Currently we don't support Identifier clause as part of CTE reference.
   
   
   ### Why are the changes needed?
   Adding support for Identifier clause as part of CTE reference for both 
constant string expressions and session variables.
   
   
   ### Does this PR introduce _any_ user-facing change?
   It contains user facing changes in sense that identifier clause as cte 
reference will now be supported.
   
   
   ### How was this patch tested?
   Added tests as part of this PR.
   
   
   ### Was this patch authored or co-authored using generative AI tooling?
   No.
   


-- 
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-unsubscr...@spark.apache.org

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


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

Reply via email to