[ 
https://issues.apache.org/jira/browse/FLINK-35098?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sergey Nuyanzin resolved FLINK-35098.
-------------------------------------
    Fix Version/s: 1.18.2
                   1.20.0
                   1.19.1
       Resolution: Fixed

> Incorrect results for queries like "10 >= y" on tables using Filesystem 
> connector and Orc format
> ------------------------------------------------------------------------------------------------
>
>                 Key: FLINK-35098
>                 URL: https://issues.apache.org/jira/browse/FLINK-35098
>             Project: Flink
>          Issue Type: Bug
>          Components: Connectors / ORC, Formats (JSON, Avro, Parquet, ORC, 
> SequenceFile)
>    Affects Versions: 1.12.7, 1.13.6, 1.14.6, 1.15.4, 1.16.3, 1.17.2, 1.19.0, 
> 1.18.1
>            Reporter: Andrey Gaskov
>            Assignee: Andrey Gaskov
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.18.2, 1.20.0, 1.19.1
>
>
> When working with ORC files, there is an issue with evaluation of SQL queries 
> containing expressions with a literal as the first operand. Specifically, the 
> query *10 >= y* does not always return the correct result.
> This test added to OrcFileSystemITCase.java fails on the second check:
>  
> {code:java}
> @TestTemplate
> void testOrcFilterPushDownLiteralFirst() throws ExecutionException, 
> InterruptedException {
>     super.tableEnv()
>             .executeSql("insert into orcLimitTable values('a', 10, 10)")
>             .await();
>     List<Row> expected = Collections.singletonList(Row.of(10));
>     check("select y from orcLimitTable where y <= 10", expected);
>     check("select y from orcLimitTable where 10 >= y", expected);
> }
> Results do not match for query:
>   select y from orcLimitTable where 10 >= y
> Results
>  == Correct Result - 1 ==   == Actual Result - 0 ==
> !+I[10]    {code}
> The checks are equivalent and should evaluate to the same result. But the 
> second query doesn't return the record with y=10.
> The table is defined as:
> {code:java}
> create table orcLimitTable (
>     x string,
>     y int,
>     a int) 
> with (
>     'connector' = 'filesystem',
>     'path' = '/tmp/junit4374176500101507155/junit7109291529844202275/',
>     'format'='orc'){code}
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to