[jira] [Commented] (SPARK-33883) Can repeat "where" twice without error in spark sql

2020-12-28 Thread Stu (Jira)


[ 
https://issues.apache.org/jira/browse/SPARK-33883?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17255603#comment-17255603
 ] 

Stu commented on SPARK-33883:
-

that makes so much sense, thanks!

> Can repeat "where" twice without error in spark sql
> ---
>
> Key: SPARK-33883
> URL: https://issues.apache.org/jira/browse/SPARK-33883
> Project: Spark
>  Issue Type: Bug
>  Components: SQL
>Affects Versions: 2.4.3
>Reporter: Stu
>Priority: Minor
> Attachments: image-2020-12-28-18-24-18-395.png, 
> image-2020-12-28-18-32-25-960.png
>
>
> the following sql code works, despite having bad syntax ("where" is mentioned 
> twice):
> {code:java}
> select * from table
> where where field is not null{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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



[jira] [Commented] (SPARK-33883) Can repeat "where" twice without error in spark sql

2020-12-28 Thread Liu Neng (Jira)


[ 
https://issues.apache.org/jira/browse/SPARK-33883?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17255515#comment-17255515
 ] 

Liu Neng commented on SPARK-33883:
--

!image-2020-12-28-18-24-18-395.png!

the first where is a table alias,

you can try 'select where.* from person where where name is not null'.

you can set spark.sql.ansi.enabled=true to raise an exception in this case.

!image-2020-12-28-18-32-25-960.png!

so I think it is not an issue. 

> Can repeat "where" twice without error in spark sql
> ---
>
> Key: SPARK-33883
> URL: https://issues.apache.org/jira/browse/SPARK-33883
> Project: Spark
>  Issue Type: Bug
>  Components: SQL
>Affects Versions: 2.4.3
>Reporter: Stu
>Priority: Minor
> Attachments: image-2020-12-28-18-24-18-395.png, 
> image-2020-12-28-18-32-25-960.png
>
>
> the following sql code works, despite having bad syntax ("where" is mentioned 
> twice):
> {code:java}
> select * from table
> where where field is not null{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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