[jira] [Commented] (FLINK-22015) SQL filter containing OR and IS NULL will produce an incorrect result.

2021-06-11 Thread Kurt Young (Jira)


[ 
https://issues.apache.org/jira/browse/FLINK-22015?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17361592#comment-17361592
 ] 

Kurt Young commented on FLINK-22015:


also fixed in 1.12.5: faf7cc43beebce3fee528ec5637e9387b95bec99

> SQL filter containing OR and IS NULL will produce an incorrect result.
> --
>
> Key: FLINK-22015
> URL: https://issues.apache.org/jira/browse/FLINK-22015
> Project: Flink
>  Issue Type: Bug
>  Components: Table SQL / Planner
>Affects Versions: 1.13.0
>Reporter: Caizhi Weng
>Assignee: Caizhi Weng
>Priority: Critical
>  Labels: pull-request-available
> Fix For: 1.13.0, 1.12.5
>
>
> Add the following test case to {{CalcITCase}} to reproduce this bug.
> {code:scala}
> @Test
> def myTest(): Unit = {
>   checkResult(
> """
>   |WITH myView AS (SELECT a, CASE
>   |  WHEN a = 1 THEN '1'
>   |  ELSE CAST(NULL AS STRING)
>   |  END AS s
>   |FROM SmallTable3)
>   |SELECT a FROM myView WHERE s = '2' OR s IS NULL
>   |""".stripMargin,
> Seq(row(2), row(3)))
> }
> {code}
> However if we remove the {{s = '2'}} the result will be correct.



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


[jira] [Commented] (FLINK-22015) SQL filter containing OR and IS NULL will produce an incorrect result.

2021-03-29 Thread Caizhi Weng (Jira)


[ 
https://issues.apache.org/jira/browse/FLINK-22015?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17310609#comment-17310609
 ] 

Caizhi Weng commented on FLINK-22015:
-

Indeed. Thanks for pointing this out [~jark].

> SQL filter containing OR and IS NULL will produce an incorrect result.
> --
>
> Key: FLINK-22015
> URL: https://issues.apache.org/jira/browse/FLINK-22015
> Project: Flink
>  Issue Type: Bug
>  Components: Table SQL / Planner
>Affects Versions: 1.13.0
>Reporter: Caizhi Weng
>Priority: Major
> Fix For: 1.13.0
>
>
> Add the following test case to {{CalcITCase}} to reproduce this bug.
> {code:scala}
> @Test
> def myTest(): Unit = {
>   checkResult(
> """
>   |WITH myView AS (SELECT a, CASE
>   |  WHEN a = 1 THEN '1'
>   |  ELSE CAST(NULL AS STRING)
>   |  END AS s
>   |FROM SmallTable3)
>   |SELECT a FROM myView WHERE s = '2' OR s IS NULL
>   |""".stripMargin,
> Seq(row(2), row(3)))
> }
> {code}
> However if we remove the {{s = '2'}} the result will be correct.



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


[jira] [Commented] (FLINK-22015) SQL filter containing OR and IS NULL will produce an incorrect result.

2021-03-29 Thread Jark Wu (Jira)


[ 
https://issues.apache.org/jira/browse/FLINK-22015?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17310603#comment-17310603
 ] 

Jark Wu commented on FLINK-22015:
-

Maybe the same reason with FLINK-21162.

> SQL filter containing OR and IS NULL will produce an incorrect result.
> --
>
> Key: FLINK-22015
> URL: https://issues.apache.org/jira/browse/FLINK-22015
> Project: Flink
>  Issue Type: Bug
>  Components: Table SQL / Planner
>Affects Versions: 1.13.0
>Reporter: Caizhi Weng
>Priority: Major
> Fix For: 1.13.0
>
>
> Add the following test case to {{CalcITCase}} to reproduce this bug.
> {code:scala}
> @Test
> def myTest(): Unit = {
>   checkResult(
> """
>   |WITH myView AS (SELECT a, CASE
>   |  WHEN a = 1 THEN '1'
>   |  ELSE CAST(NULL AS STRING)
>   |  END AS s
>   |FROM SmallTable3)
>   |SELECT a FROM myView WHERE s = '2' OR s IS NULL
>   |""".stripMargin,
> Seq(row(2), row(3)))
> }
> {code}
> However if we remove the {{s = '2'}} the result will be correct.



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