Details

    • Patch

    Description

      SQL is:

      select type,count(*) from test group by type limit 1 offset 10
      

      the resultset size is 0.
      I see the hbase scanner only judge the limit size,not found the offset size.
      The most queries offset is calcite service when the scan count bigger than limit+offset.

      Attachments

        Issue Links

          Activity

            wangxiaoyu Xiaoyu Wang added a comment -

            Here is the patch

            wangxiaoyu Xiaoyu Wang added a comment - Here is the patch
            lukehan Luke Han added a comment -

            Hi Xiaoyu, could you also please set right fix version for this patch?

            It's better to have right setting for further release process

            Thanks.

            lukehan Luke Han added a comment - Hi Xiaoyu, could you also please set right fix version for this patch? It's better to have right setting for further release process Thanks.
            mahongbin Hongbin Ma added a comment -

            lukehan it might be a little confusing that we're still using 0.7-staging but fixed versions being 1.1, any notifications or document required?

            mahongbin Hongbin Ma added a comment - lukehan it might be a little confusing that we're still using 0.7-staging but fixed versions being 1.1, any notifications or document required?
            mahongbin Hongbin Ma added a comment -

            lukehan it might be a little confusing that we're still using 0.7-staging but fixed versions being 1.1, any notifications or document required?

            mahongbin Hongbin Ma added a comment - lukehan it might be a little confusing that we're still using 0.7-staging but fixed versions being 1.1, any notifications or document required?
            mahongbin Hongbin Ma added a comment -

            hi xiaoyu

            the patch looks good, can you please add a test query in $KYLIN_HOME/query/src/test/resources/query/sql/ so that integration test KylinQueryTest.java will cover your case?

            mahongbin Hongbin Ma added a comment - hi xiaoyu the patch looks good, can you please add a test query in $KYLIN_HOME/query/src/test/resources/query/sql/ so that integration test KylinQueryTest.java will cover your case?
            lukehan Luke Han added a comment -

            you are right, let's rename the branch to right version

            0.7-staging to 1.x-staging.

            lukehan Luke Han added a comment - you are right, let's rename the branch to right version 0.7-staging to 1.x-staging.
            mahongbin Hongbin Ma added a comment -

            I opened a ticket on https://issues.apache.org/jira/browse/KYLIN-987, let's move there to discuss on this.

            mahongbin Hongbin Ma added a comment - I opened a ticket on https://issues.apache.org/jira/browse/KYLIN-987 , let's move there to discuss on this.
            mahongbin Hongbin Ma added a comment -

            I opened a ticket on https://issues.apache.org/jira/browse/KYLIN-987, let's move there to discuss on this.

            mahongbin Hongbin Ma added a comment - I opened a ticket on https://issues.apache.org/jira/browse/KYLIN-987 , let's move there to discuss on this.
            wangxiaoyu Xiaoyu Wang added a comment -

            OK. I will do it and submit the patch.

            wangxiaoyu Xiaoyu Wang added a comment - OK. I will do it and submit the patch.
            wangxiaoyu Xiaoyu Wang added a comment -

            Please review the patch V2.
            Add testcase.

            wangxiaoyu Xiaoyu Wang added a comment - Please review the patch V2. Add testcase.
            mahongbin Hongbin Ma added a comment -

            hi, xiaoyu

            how did you made the patch? I cannot merge it:

            âžś Kylin-0.7 git:(0.7-staging) git apply --check ~/Desktop/KYLIN-983-Query-sql-offset-keyword-bug-V2.patch
            error: src/main/java/org/apache/kylin/storage/hbase/SerializedHBaseTupleIterator.java: No such file or directory
            error: src/main/java/org/apache/kylin/storage/StorageContext.java: No such file or directory
            error: src/test/java/org/apache/kylin/query/test/KylinQueryTest.java: No such file or directory
            error: src/main/java/org/apache/kylin/query/relnode/OLAPLimitRel.java: No such file or directory

            please use git format-patch: http://kylin.incubator.apache.org/development/howto_contribute.html
            And will you please also make a patch for branch 0.8?

            mahongbin Hongbin Ma added a comment - hi, xiaoyu how did you made the patch? I cannot merge it: âžś Kylin-0.7 git:(0.7-staging) git apply --check ~/Desktop/ KYLIN-983 -Query-sql-offset-keyword-bug-V2.patch error: src/main/java/org/apache/kylin/storage/hbase/SerializedHBaseTupleIterator.java: No such file or directory error: src/main/java/org/apache/kylin/storage/StorageContext.java: No such file or directory error: src/test/java/org/apache/kylin/query/test/KylinQueryTest.java: No such file or directory error: src/main/java/org/apache/kylin/query/relnode/OLAPLimitRel.java: No such file or directory please use git format-patch: http://kylin.incubator.apache.org/development/howto_contribute.html And will you please also make a patch for branch 0.8?
            wangxiaoyu Xiaoyu Wang added a comment -

            Sorry!
            I export the patch with Intellij idea.And use the IDE to apply the patch is OK.
            I use git format-patch command to export the patch V3 for 0.7 and 0.8 branch.

            wangxiaoyu Xiaoyu Wang added a comment - Sorry! I export the patch with Intellij idea.And use the IDE to apply the patch is OK. I use git format-patch command to export the patch V3 for 0.7 and 0.8 branch.
            mahongbin Hongbin Ma added a comment -

            hi xiaoyu,

            In the latest patch, I found sql_verifyCount/query04~sql_verifyCount/query07 are renamed to .disable,
            this will cause integration tests ignore these SQLs.

            Can you explain why they're ignored?

            mahongbin Hongbin Ma added a comment - hi xiaoyu, In the latest patch, I found sql_verifyCount/query04~sql_verifyCount/query07 are renamed to .disable, this will cause integration tests ignore these SQLs. Can you explain why they're ignored?
            wangxiaoyu Xiaoyu Wang added a comment -

            Hi hongbin!
            Before the patch the query/sql_verifyCount dir is not execute. the testSimpleQuery function is ignore

                @Ignore
                @Test
                public void testSimpleQuery() throws Exception {
                    verifyResultRowCount("src/test/resources/query/sql_verifyCount");
                }
            

            I try to add test sql to query/sql dir but this case is limit offset. the result is random, not equals with the H2 result.
            So I add to query/sql_verifyCount dir.and delete the ignore annotation. disable the other querys.

            wangxiaoyu Xiaoyu Wang added a comment - Hi hongbin! Before the patch the query/sql_verifyCount dir is not execute. the testSimpleQuery function is ignore @Ignore @Test public void testSimpleQuery() throws Exception { verifyResultRowCount( "src/test/resources/query/sql_verifyCount" ); } I try to add test sql to query/sql dir but this case is limit offset. the result is random, not equals with the H2 result. So I add to query/sql_verifyCount dir.and delete the ignore annotation. disable the other querys.
            mahongbin Hongbin Ma added a comment -

            I got it. thanks!
            I'll merge your patch first, and try to restore the other test cases.

            mahongbin Hongbin Ma added a comment - I got it. thanks! I'll merge your patch first, and try to restore the other test cases.
            wangxiaoyu Xiaoyu Wang added a comment -

            select * from fact table return one row. the test case will fail. You can try it.

            wangxiaoyu Xiaoyu Wang added a comment - select * from fact table return one row. the test case will fail. You can try it.
            mahongbin Hongbin Ma added a comment -

            issue KYLIN-1064 is found during reviewing KYLIN-983

            mahongbin Hongbin Ma added a comment - issue KYLIN-1064 is found during reviewing KYLIN-983
            shaofengshi Shao Feng Shi added a comment -

            Resolved in release 1.1-incubating (2015-10-25)

            shaofengshi Shao Feng Shi added a comment - Resolved in release 1.1-incubating (2015-10-25)

            People

              mahongbin Hongbin Ma
              wangxiaoyu Xiaoyu Wang
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: