You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/04/14 10:09:56 UTC

[GitHub] [spark] AngersZhuuuu opened a new pull request #32165: [SPARK-35070][SQL] TRANSFORM not support alias in inputs

AngersZhuuuu opened a new pull request #32165:
URL: https://github.com/apache/spark/pull/32165


   ### What changes were proposed in this pull request?
   Normal function parameters should not support alias, hive not support too
   ![image](https://user-images.githubusercontent.com/46485123/114645556-4a7ff400-9d0c-11eb-91eb-bc679ea0039a.png)
   In this pr we forbid use alias in `TRANSFORM`'s inputs
   
   
   ### Why are the changes needed?
   Fix bug
   
   
   ### Does this PR introduce _any_ user-facing change?
   No
   
   ### How was this patch tested?
   Added UT
   


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

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


[GitHub] [spark] SparkQA removed a comment on pull request #32165: [SPARK-35070][SQL] TRANSFORM not support alias in inputs

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #32165:
URL: https://github.com/apache/spark/pull/32165#issuecomment-820015641


   **[Test build #137389 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/137389/testReport)** for PR 32165 at commit [`8209d0f`](https://github.com/apache/spark/commit/8209d0f8fb69e092e79eeffc33a4ad85cc87c46e).


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

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


[GitHub] [spark] AngersZhuuuu commented on a change in pull request #32165: [SPARK-35070][SQL] TRANSFORM not support alias in inputs

Posted by GitBox <gi...@apache.org>.
AngersZhuuuu commented on a change in pull request #32165:
URL: https://github.com/apache/spark/pull/32165#discussion_r613781857



##########
File path: docs/sql-migration-guide.md
##########
@@ -77,6 +77,8 @@ license: |
 
   - In Spark 3.2, `CREATE TABLE .. LIKE ..` command can not use reserved properties. You need their specific clauses to specify them, for example, `CREATE TABLE test1 LIKE test LOCATION 'some path'`. You can set `spark.sql.legacy.notReserveProperties` to `true` to ignore the `ParseException`, in this case, these properties will be silently removed, for example: `TBLPROPERTIES('owner'='yao')` will have no effect. In Spark version 3.1 and below, the reserved properties can be used in `CREATE TABLE .. LIKE ..` command but have no side effects, for example, `TBLPROPERTIES('location'='/tmp')` does not change the location of the table but only create a headless property just like `'a'='b'`.
 
+  - In Spark 3.2, `TRANSFORM` operator can't support alias in inputs. In Spark 3.1 and earlier, we can write script transform like `SELECT TRANSFORM(a AS c1, b AS c2) USING 'cat' FROM TBL`.
+

Review comment:
       > Is there any valid use case around it? Can users access `c1, c2` somehow? e.g. `SELECT c1 FROM (SELECT TRANSFORM ...)`
   
   Such as 
   ```
   SELECT TRANSFORM(a as a1, sum(b) as sum_b)
   USING 'cat'
   FROM tbl
   WHERE a1 > 3
   HAVING sum_b > 10
   ```




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

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


[GitHub] [spark] cloud-fan commented on pull request #32165: [SPARK-35070][SQL] TRANSFORM not support alias in inputs

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on pull request #32165:
URL: https://github.com/apache/spark/pull/32165#issuecomment-820146580


   retest this please


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

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


[GitHub] [spark] AngersZhuuuu commented on a change in pull request #32165: [SPARK-35070][SQL] TRANSFORM not support alias in inputs

Posted by GitBox <gi...@apache.org>.
AngersZhuuuu commented on a change in pull request #32165:
URL: https://github.com/apache/spark/pull/32165#discussion_r613713028



##########
File path: sql/core/src/test/resources/sql-tests/inputs/transform.sql
##########
@@ -206,7 +206,7 @@ FROM script_trans
 LIMIT 1;
 
 SELECT TRANSFORM(
-  b AS d5, a,

Review comment:
       > Can we add an item in the migration guide? Mentioning that alias is not allowed anymore in `TRANSFORM`.
   
   Done




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

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


[GitHub] [spark] cloud-fan commented on a change in pull request #32165: [SPARK-35070][SQL] TRANSFORM not support alias in inputs

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #32165:
URL: https://github.com/apache/spark/pull/32165#discussion_r613784052



##########
File path: docs/sql-migration-guide.md
##########
@@ -77,6 +77,8 @@ license: |
 
   - In Spark 3.2, `CREATE TABLE .. LIKE ..` command can not use reserved properties. You need their specific clauses to specify them, for example, `CREATE TABLE test1 LIKE test LOCATION 'some path'`. You can set `spark.sql.legacy.notReserveProperties` to `true` to ignore the `ParseException`, in this case, these properties will be silently removed, for example: `TBLPROPERTIES('owner'='yao')` will have no effect. In Spark version 3.1 and below, the reserved properties can be used in `CREATE TABLE .. LIKE ..` command but have no side effects, for example, `TBLPROPERTIES('location'='/tmp')` does not change the location of the table but only create a headless property just like `'a'='b'`.
 
+  - In Spark 3.2, `TRANSFORM` operator can't support alias in inputs. In Spark 3.1 and earlier, we can write script transform like `SELECT TRANSFORM(a AS c1, b AS c2) USING 'cat' FROM TBL`.
+

Review comment:
       this looks super weird and not SQL-ish.




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

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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #32165: [SPARK-35070][SQL] TRANSFORM not support alias in inputs

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #32165:
URL: https://github.com/apache/spark/pull/32165#issuecomment-820196668






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

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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #32165: [SPARK-35070][SQL] TRANSFORM not support alias in inputs

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #32165:
URL: https://github.com/apache/spark/pull/32165#issuecomment-820333796


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/137402/
   


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

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


[GitHub] [spark] github-actions[bot] commented on pull request #32165: [SPARK-35070][SQL] TRANSFORM not support alias in inputs

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #32165:
URL: https://github.com/apache/spark/pull/32165#issuecomment-819950322


   **[Test build #750328208](https://github.com/AngersZhuuuu/spark/actions/runs/750328208)** for PR 32165 at commit [`f2ac092`](https://github.com/AngersZhuuuu/spark/commit/f2ac09232ebb4895ccb195a8f0abf578aa6c02a0).


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

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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #32165: [SPARK-35070][SQL] TRANSFORM not support alias in inputs

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #32165:
URL: https://github.com/apache/spark/pull/32165#issuecomment-819450665


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/41921/
   


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

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


[GitHub] [spark] AmplabJenkins commented on pull request #32165: [SPARK-35070][SQL] TRANSFORM not support alias in inputs

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #32165:
URL: https://github.com/apache/spark/pull/32165#issuecomment-820333796


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/137402/
   


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

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


[GitHub] [spark] SparkQA commented on pull request #32165: [SPARK-35070][SQL] TRANSFORM not support alias in inputs

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #32165:
URL: https://github.com/apache/spark/pull/32165#issuecomment-819445499






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

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


[GitHub] [spark] SparkQA commented on pull request #32165: [SPARK-35070][SQL] TRANSFORM not support alias in inputs

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #32165:
URL: https://github.com/apache/spark/pull/32165#issuecomment-820012886






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

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


[GitHub] [spark] AmplabJenkins commented on pull request #32165: [SPARK-35070][SQL] TRANSFORM not support alias in inputs

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #32165:
URL: https://github.com/apache/spark/pull/32165#issuecomment-820158714


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/137382/
   


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

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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #32165: [SPARK-35070][SQL] TRANSFORM not support alias in inputs

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #32165:
URL: https://github.com/apache/spark/pull/32165#issuecomment-819614916


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/137342/
   


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

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


[GitHub] [spark] AmplabJenkins commented on pull request #32165: [SPARK-35070][SQL] TRANSFORM not support alias in inputs

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #32165:
URL: https://github.com/apache/spark/pull/32165#issuecomment-820196667






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

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


[GitHub] [spark] AmplabJenkins commented on pull request #32165: [SPARK-35070][SQL] TRANSFORM not support alias in inputs

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #32165:
URL: https://github.com/apache/spark/pull/32165#issuecomment-819614916


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/137342/
   


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

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


[GitHub] [spark] SparkQA commented on pull request #32165: [SPARK-35070][SQL] TRANSFORM not support alias in inputs

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #32165:
URL: https://github.com/apache/spark/pull/32165#issuecomment-820154369


   **[Test build #137382 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/137382/testReport)** for PR 32165 at commit [`f2ac092`](https://github.com/apache/spark/commit/f2ac09232ebb4895ccb195a8f0abf578aa6c02a0).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds no public classes.


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

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


[GitHub] [spark] cloud-fan commented on a change in pull request #32165: [SPARK-35070][SQL] TRANSFORM not support alias in inputs

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #32165:
URL: https://github.com/apache/spark/pull/32165#discussion_r613709641



##########
File path: sql/core/src/test/resources/sql-tests/inputs/transform.sql
##########
@@ -206,7 +206,7 @@ FROM script_trans
 LIMIT 1;
 
 SELECT TRANSFORM(
-  b AS d5, a,

Review comment:
       Can we add an item in the migration guide? Mentioning that alias is not allowed anymore in `TRANSFORM`.




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

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


[GitHub] [spark] cloud-fan commented on a change in pull request #32165: [SPARK-35070][SQL] TRANSFORM not support alias in inputs

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #32165:
URL: https://github.com/apache/spark/pull/32165#discussion_r613780708



##########
File path: docs/sql-migration-guide.md
##########
@@ -77,6 +77,8 @@ license: |
 
   - In Spark 3.2, `CREATE TABLE .. LIKE ..` command can not use reserved properties. You need their specific clauses to specify them, for example, `CREATE TABLE test1 LIKE test LOCATION 'some path'`. You can set `spark.sql.legacy.notReserveProperties` to `true` to ignore the `ParseException`, in this case, these properties will be silently removed, for example: `TBLPROPERTIES('owner'='yao')` will have no effect. In Spark version 3.1 and below, the reserved properties can be used in `CREATE TABLE .. LIKE ..` command but have no side effects, for example, `TBLPROPERTIES('location'='/tmp')` does not change the location of the table but only create a headless property just like `'a'='b'`.
 
+  - In Spark 3.2, `TRANSFORM` operator can't support alias in inputs. In Spark 3.1 and earlier, we can write script transform like `SELECT TRANSFORM(a AS c1, b AS c2) USING 'cat' FROM TBL`.
+

Review comment:
       Is there any valid use case around it? Can users access `c1, c2` somehow? e.g. `SELECT c1 FROM (SELECT TRANSFORM ...)`




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

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


[GitHub] [spark] SparkQA removed a comment on pull request #32165: [SPARK-35070][SQL] TRANSFORM not support alias in inputs

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #32165:
URL: https://github.com/apache/spark/pull/32165#issuecomment-820160180


   **[Test build #137402 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/137402/testReport)** for PR 32165 at commit [`8209d0f`](https://github.com/apache/spark/commit/8209d0f8fb69e092e79eeffc33a4ad85cc87c46e).


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

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


[GitHub] [spark] cloud-fan closed pull request #32165: [SPARK-35070][SQL] TRANSFORM not support alias in inputs

Posted by GitBox <gi...@apache.org>.
cloud-fan closed pull request #32165:
URL: https://github.com/apache/spark/pull/32165


   


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

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


[GitHub] [spark] SparkQA commented on pull request #32165: [SPARK-35070][SQL] TRANSFORM not support alias in inputs

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #32165:
URL: https://github.com/apache/spark/pull/32165#issuecomment-820160180


   **[Test build #137402 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/137402/testReport)** for PR 32165 at commit [`8209d0f`](https://github.com/apache/spark/commit/8209d0f8fb69e092e79eeffc33a4ad85cc87c46e).


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

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


[GitHub] [spark] AngersZhuuuu commented on a change in pull request #32165: [SPARK-35070][SQL] TRANSFORM not support alias in inputs

Posted by GitBox <gi...@apache.org>.
AngersZhuuuu commented on a change in pull request #32165:
URL: https://github.com/apache/spark/pull/32165#discussion_r613693430



##########
File path: sql/core/src/test/resources/sql-tests/inputs/transform.sql
##########
@@ -206,7 +206,7 @@ FROM script_trans
 LIMIT 1;
 
 SELECT TRANSFORM(
-  b AS d5, a,

Review comment:
       > what was the behavior before (Spark 3.1 or older) when there is an alias? do we just ignore the alias?
   
   Treat it just like select clause since `TRANSFORM`'s input child plan can be all kind of  `SELECT` clause 




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

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


[GitHub] [spark] SparkQA removed a comment on pull request #32165: [SPARK-35070][SQL] TRANSFORM not support alias in inputs

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #32165:
URL: https://github.com/apache/spark/pull/32165#issuecomment-819957712


   **[Test build #137382 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/137382/testReport)** for PR 32165 at commit [`f2ac092`](https://github.com/apache/spark/commit/f2ac09232ebb4895ccb195a8f0abf578aa6c02a0).


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

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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #32165: [SPARK-35070][SQL] TRANSFORM not support alias in inputs

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #32165:
URL: https://github.com/apache/spark/pull/32165#issuecomment-820033616


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/41966/
   


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

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


[GitHub] [spark] cloud-fan commented on a change in pull request #32165: [SPARK-35070][SQL] TRANSFORM not support alias in inputs

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #32165:
URL: https://github.com/apache/spark/pull/32165#discussion_r613335417



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/AstBuilder.scala
##########
@@ -627,6 +627,13 @@ class AstBuilder extends SqlBaseBaseVisitor[AnyRef] with SQLConfHelper with Logg
       .map(typedVisit[Expression])
   }
 
+  override def visitExpressionSeq(
+    ctx: ExpressionSeqContext): Seq[Expression] = {

Review comment:
       nit: can be put in one line?




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

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


[GitHub] [spark] github-actions[bot] commented on pull request #32165: [SPARK-35070][SQL] TRANSFORM not support alias in inputs

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #32165:
URL: https://github.com/apache/spark/pull/32165#issuecomment-819950172


   **[Test build #750327111](https://github.com/AngersZhuuuu/spark/actions/runs/750327111)** for PR 32165 at commit [`242ba6e`](https://github.com/AngersZhuuuu/spark/commit/242ba6e8995baa13079f48b0131a043eac3689bb).


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

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


[GitHub] [spark] SparkQA commented on pull request #32165: [SPARK-35070][SQL] TRANSFORM not support alias in inputs

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #32165:
URL: https://github.com/apache/spark/pull/32165#issuecomment-820015641


   **[Test build #137389 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/137389/testReport)** for PR 32165 at commit [`8209d0f`](https://github.com/apache/spark/commit/8209d0f8fb69e092e79eeffc33a4ad85cc87c46e).


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

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


[GitHub] [spark] cloud-fan commented on pull request #32165: [SPARK-35070][SQL] TRANSFORM not support alias in inputs

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on pull request #32165:
URL: https://github.com/apache/spark/pull/32165#issuecomment-820164837


   thanks, merging to master!


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

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


[GitHub] [spark] github-actions[bot] commented on pull request #32165: [SPARK-35070][SQL] TRANSFORM not support alias in inputs

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #32165:
URL: https://github.com/apache/spark/pull/32165#issuecomment-820009805


   **[Test build #750464190](https://github.com/AngersZhuuuu/spark/actions/runs/750464190)** for PR 32165 at commit [`8209d0f`](https://github.com/AngersZhuuuu/spark/commit/8209d0f8fb69e092e79eeffc33a4ad85cc87c46e).


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

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


[GitHub] [spark] SparkQA commented on pull request #32165: [SPARK-35070][SQL] TRANSFORM not support alias in inputs

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #32165:
URL: https://github.com/apache/spark/pull/32165#issuecomment-820187282






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

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


[GitHub] [spark] SparkQA commented on pull request #32165: [SPARK-35070][SQL] TRANSFORM not support alias in inputs

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #32165:
URL: https://github.com/apache/spark/pull/32165#issuecomment-820178869


   **[Test build #137389 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/137389/testReport)** for PR 32165 at commit [`8209d0f`](https://github.com/apache/spark/commit/8209d0f8fb69e092e79eeffc33a4ad85cc87c46e).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds no public classes.


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

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


[GitHub] [spark] AmplabJenkins commented on pull request #32165: [SPARK-35070][SQL] TRANSFORM not support alias in inputs

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #32165:
URL: https://github.com/apache/spark/pull/32165#issuecomment-820014890


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/41959/
   


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

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


[GitHub] [spark] HyukjinKwon commented on a change in pull request #32165: [SPARK-35070][SQL] TRANSFORM not support alias in inputs

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on a change in pull request #32165:
URL: https://github.com/apache/spark/pull/32165#discussion_r613946783



##########
File path: docs/sql-migration-guide.md
##########
@@ -77,6 +77,8 @@ license: |
 
   - In Spark 3.2, `CREATE TABLE .. LIKE ..` command can not use reserved properties. You need their specific clauses to specify them, for example, `CREATE TABLE test1 LIKE test LOCATION 'some path'`. You can set `spark.sql.legacy.notReserveProperties` to `true` to ignore the `ParseException`, in this case, these properties will be silently removed, for example: `TBLPROPERTIES('owner'='yao')` will have no effect. In Spark version 3.1 and below, the reserved properties can be used in `CREATE TABLE .. LIKE ..` command but have no side effects, for example, `TBLPROPERTIES('location'='/tmp')` does not change the location of the table but only create a headless property just like `'a'='b'`.
 
+  - In Spark 3.2, `TRANSFORM` operator can't support alias in inputs. In Spark 3.1 and earlier, we can write script transform like `SELECT TRANSFORM(a AS c1, b AS c2) USING 'cat' FROM TBL`.

Review comment:
       Can we add a legacy conf?




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

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


[GitHub] [spark] github-actions[bot] commented on pull request #32165: [SPARK-35070][SQL] TRANSFORM not support alias in inputs

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #32165:
URL: https://github.com/apache/spark/pull/32165#issuecomment-819606903


   **[Test build #747903905](https://github.com/AngersZhuuuu/spark/actions/runs/747903905)** for PR 32165 at commit [`55a1daa`](https://github.com/AngersZhuuuu/spark/commit/55a1daa03c3f5fc41ab174fc8eb5576695602ec2).


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

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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #32165: [SPARK-35070][SQL] TRANSFORM not support alias in inputs

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #32165:
URL: https://github.com/apache/spark/pull/32165#issuecomment-820158714


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/137382/
   


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

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


[GitHub] [spark] SparkQA commented on pull request #32165: [SPARK-35070][SQL] TRANSFORM not support alias in inputs

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #32165:
URL: https://github.com/apache/spark/pull/32165#issuecomment-819590995


   **[Test build #137342 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/137342/testReport)** for PR 32165 at commit [`55a1daa`](https://github.com/apache/spark/commit/55a1daa03c3f5fc41ab174fc8eb5576695602ec2).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds no public classes.


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

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


[GitHub] [spark] SparkQA commented on pull request #32165: [SPARK-35070][SQL] TRANSFORM not support alias in inputs

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #32165:
URL: https://github.com/apache/spark/pull/32165#issuecomment-820030769






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

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


[GitHub] [spark] SparkQA commented on pull request #32165: [SPARK-35070][SQL] TRANSFORM not support alias in inputs

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #32165:
URL: https://github.com/apache/spark/pull/32165#issuecomment-819957712


   **[Test build #137382 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/137382/testReport)** for PR 32165 at commit [`f2ac092`](https://github.com/apache/spark/commit/f2ac09232ebb4895ccb195a8f0abf578aa6c02a0).


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

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


[GitHub] [spark] SparkQA removed a comment on pull request #32165: [SPARK-35070][SQL] TRANSFORM not support alias in inputs

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #32165:
URL: https://github.com/apache/spark/pull/32165#issuecomment-819418604


   **[Test build #137342 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/137342/testReport)** for PR 32165 at commit [`55a1daa`](https://github.com/apache/spark/commit/55a1daa03c3f5fc41ab174fc8eb5576695602ec2).


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

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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #32165: [SPARK-35070][SQL] TRANSFORM not support alias in inputs

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #32165:
URL: https://github.com/apache/spark/pull/32165#issuecomment-820014890


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/41959/
   


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

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


[GitHub] [spark] cloud-fan commented on a change in pull request #32165: [SPARK-35070][SQL] TRANSFORM not support alias in inputs

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #32165:
URL: https://github.com/apache/spark/pull/32165#discussion_r613336860



##########
File path: sql/core/src/test/resources/sql-tests/inputs/transform.sql
##########
@@ -206,7 +206,7 @@ FROM script_trans
 LIMIT 1;
 
 SELECT TRANSFORM(
-  b AS d5, a,

Review comment:
       what was the behavior before (Spark 3.1 or older) when there is an alias? do we just ignore the alias?




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

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


[GitHub] [spark] SparkQA commented on pull request #32165: [SPARK-35070][SQL] TRANSFORM not support alias in inputs

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #32165:
URL: https://github.com/apache/spark/pull/32165#issuecomment-820332648


   **[Test build #137402 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/137402/testReport)** for PR 32165 at commit [`8209d0f`](https://github.com/apache/spark/commit/8209d0f8fb69e092e79eeffc33a4ad85cc87c46e).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds no public classes.


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

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


[GitHub] [spark] AngersZhuuuu commented on a change in pull request #32165: [SPARK-35070][SQL] TRANSFORM not support alias in inputs

Posted by GitBox <gi...@apache.org>.
AngersZhuuuu commented on a change in pull request #32165:
URL: https://github.com/apache/spark/pull/32165#discussion_r613781857



##########
File path: docs/sql-migration-guide.md
##########
@@ -77,6 +77,8 @@ license: |
 
   - In Spark 3.2, `CREATE TABLE .. LIKE ..` command can not use reserved properties. You need their specific clauses to specify them, for example, `CREATE TABLE test1 LIKE test LOCATION 'some path'`. You can set `spark.sql.legacy.notReserveProperties` to `true` to ignore the `ParseException`, in this case, these properties will be silently removed, for example: `TBLPROPERTIES('owner'='yao')` will have no effect. In Spark version 3.1 and below, the reserved properties can be used in `CREATE TABLE .. LIKE ..` command but have no side effects, for example, `TBLPROPERTIES('location'='/tmp')` does not change the location of the table but only create a headless property just like `'a'='b'`.
 
+  - In Spark 3.2, `TRANSFORM` operator can't support alias in inputs. In Spark 3.1 and earlier, we can write script transform like `SELECT TRANSFORM(a AS c1, b AS c2) USING 'cat' FROM TBL`.
+

Review comment:
       > Is there any valid use case around it? Can users access `c1, c2` somehow? e.g. `SELECT c1 FROM (SELECT TRANSFORM ...)`
   
   ```
   SELECT TRANSFORM(a as a1, sum(b) as sum_b)
   USING 'cat'
   FROM tbl
   HAVING sum_b > 10
   ```




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

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


[GitHub] [spark] AmplabJenkins commented on pull request #32165: [SPARK-35070][SQL] TRANSFORM not support alias in inputs

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #32165:
URL: https://github.com/apache/spark/pull/32165#issuecomment-819450665


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/41921/
   


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

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


[GitHub] [spark] AmplabJenkins commented on pull request #32165: [SPARK-35070][SQL] TRANSFORM not support alias in inputs

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #32165:
URL: https://github.com/apache/spark/pull/32165#issuecomment-820033616


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/41966/
   


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

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


[GitHub] [spark] SparkQA commented on pull request #32165: [SPARK-35070][SQL] TRANSFORM not support alias in inputs

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #32165:
URL: https://github.com/apache/spark/pull/32165#issuecomment-819418604


   **[Test build #137342 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/137342/testReport)** for PR 32165 at commit [`55a1daa`](https://github.com/apache/spark/commit/55a1daa03c3f5fc41ab174fc8eb5576695602ec2).


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

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


[GitHub] [spark] AngersZhuuuu commented on pull request #32165: [SPARK-35070][SQL] TRANSFORM not support alias in inputs

Posted by GitBox <gi...@apache.org>.
AngersZhuuuu commented on pull request #32165:
URL: https://github.com/apache/spark/pull/32165#issuecomment-819403237






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

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