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

Ignite TC Bot commented on IGNITE-18363:
----------------------------------------

{panel:title=Branch: [pull/10428/head] Base: [master] : No blockers 
found!|borderStyle=dashed|borderColor=#ccc|titleBGColor=#D6F7C1}{panel}
{panel:title=Branch: [pull/10428/head] Base: [master] : New Tests 
(4)|borderStyle=dashed|borderColor=#ccc|titleBGColor=#D6F7C1}
{color:#00008b}Calcite SQL{color} [[tests 
4|https://ci2.ignite.apache.org/viewLog.html?buildId=6951758]]
* {color:#013220}IgniteCalciteTestSuite: 
LimitOffsetIntegrationTest.testInvalidLimitOffset - PASSED{color}
* {color:#013220}IgniteCalciteTestSuite: 
LimitOffsetIntegrationTest.testOffsetOutOfRange - PASSED{color}
* {color:#013220}IgniteCalciteTestSuite: 
LimitOffsetIntegrationTest.testLimitOffset - PASSED{color}
* {color:#013220}IgniteCalciteTestSuite: 
LimitOffsetIntegrationTest.testLimitDistributed - PASSED{color}

{panel}
[TeamCity *--> Run :: All* 
Results|https://ci2.ignite.apache.org/viewLog.html?buildId=6951837&buildTypeId=IgniteTests24Java8_RunAll]

> Calcite engine. Limit with offset can return negative estimated rows count
> --------------------------------------------------------------------------
>
>                 Key: IGNITE-18363
>                 URL: https://issues.apache.org/jira/browse/IGNITE-18363
>             Project: Ignite
>          Issue Type: Bug
>            Reporter: Aleksey Plekhanov
>            Assignee: Aleksey Plekhanov
>            Priority: Major
>              Labels: calcite, calcite2-required, calcite3-required
>             Fix For: 2.15
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Limit with offset can return negative estimated rows count, this will throw 
> an assertion error if limit is used as input of another relational operator.
> For example:
> {code:java}
> CREATE TABLE t(id INT);
> INSERT INTO t VALUES (1), (2), (3);
> SELECT (SELECT id FROM t ORDER BY id LIMIT 1 OFFSET 10); {code}
> Throws:
> {noformat}
> java.lang.AssertionError: null
>     at 
> org.apache.calcite.rel.metadata.RelMdUtil.isNonNegative(RelMdUtil.java:988) 
> ~[calcite-core-1.32.0.jar:1.32.0]
>     at 
> org.apache.calcite.rel.metadata.RelMdUtil.validateResult(RelMdUtil.java:977) 
> ~[calcite-core-1.32.0.jar:1.32.0]
>     at 
> org.apache.calcite.rel.metadata.RelMetadataQuery.getRowCount(RelMetadataQuery.java:259)
>  ~[calcite-core-1.32.0.jar:1.32.0]
>     at 
> org.apache.calcite.rel.metadata.RelMdRowCount.getRowCount(RelMdRowCount.java:73)
>  ~[calcite-core-1.32.0.jar:1.32.0]
>     at 
> org.apache.calcite.rel.metadata.janino.GeneratedMetadata_RowCountHandler.getRowCount_$(Unknown
>  Source) ~[?:?]
>     at 
> org.apache.calcite.rel.metadata.janino.GeneratedMetadata_RowCountHandler.getRowCount(Unknown
>  Source) ~[?:?]
>     at 
> org.apache.calcite.rel.metadata.RelMetadataQuery.getRowCount(RelMetadataQuery.java:258)
>  ~[calcite-core-1.32.0.jar:1.32.0]
>     at 
> org.apache.ignite.internal.processors.query.calcite.rel.IgniteAggregate.computeSelfCostHash(IgniteAggregate.java:94)
>  ~[classes/:?]{noformat}
>  



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

Reply via email to