[jira] [Updated] (IGNITE-16191) Calcite engine. Unexpected result of COUNT with multiple parameters

2022-03-04 Thread Evgeny Stanilovsky (Jira)


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

Evgeny Stanilovsky updated IGNITE-16191:

Labels: calcite  (was: calcite3-required)

> Calcite engine. Unexpected result of COUNT with multiple parameters
> ---
>
> Key: IGNITE-16191
> URL: https://issues.apache.org/jira/browse/IGNITE-16191
> Project: Ignite
>  Issue Type: Bug
>  Components: sql
>Reporter: Aleksey Plekhanov
>Assignee: Andrey Mashenkov
>Priority: Major
>  Labels: calcite
> Fix For: 2.13
>
>  Time Spent: 1h
>  Remaining Estimate: 0h
>
> The calcite engine supports the {{COUNT}} aggregate function with multiple 
> parameters. Such a function should return the number of input rows for which 
> parameters are wholly not null.
> But currently queries like: 
> {noformat}
> SELECT COUNT(null, 1)
> SELECT COUNT(1, null)
> {noformat}
> Return 0 (expected 1).
> Query:
> {noformat}
> SELECT COUNT(null, null)
> {noformat}
> Throw an exception:
> {noformat}
> Caused by: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
>   at java.util.ArrayList.rangeCheck(ArrayList.java:657)
>   at java.util.ArrayList.get(ArrayList.java:433)
>   at 
> org.apache.ignite.internal.processors.query.calcite.exec.exp.agg.AccumulatorsFactory$WrapperPrototype$1.apply(AccumulatorsFactory.java:226)
>   at 
> org.apache.ignite.internal.processors.query.calcite.exec.exp.agg.AccumulatorsFactory$WrapperPrototype$1.apply(AccumulatorsFactory.java:223)
>   at 
> org.apache.ignite.internal.processors.query.calcite.exec.exp.agg.AccumulatorsFactory$AccumulatorWrapperImpl.add(AccumulatorsFactory.java:305)
>   at 
> org.apache.ignite.internal.processors.query.calcite.exec.rel.HashAggregateNode$Grouping.addOnMapper(HashAggregateNode.java:294)
>   at 
> org.apache.ignite.internal.processors.query.calcite.exec.rel.HashAggregateNode$Grouping.add(HashAggregateNode.java:265)
>   at 
> org.apache.ignite.internal.processors.query.calcite.exec.rel.HashAggregateNode$Grouping.access$100(HashAggregateNode.java:222)
>   at 
> org.apache.ignite.internal.processors.query.calcite.exec.rel.HashAggregateNode.push(HashAggregateNode.java:127)
>   at 
> org.apache.ignite.internal.processors.query.calcite.exec.rel.ScanNode.push(ScanNode.java:107)
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Updated] (IGNITE-16191) Calcite engine. Unexpected result of COUNT with multiple parameters

2022-02-07 Thread Aleksey Plekhanov (Jira)


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

Aleksey Plekhanov updated IGNITE-16191:
---
Labels: calcite3-required  (was: calcite2-required calcite3-required)

> Calcite engine. Unexpected result of COUNT with multiple parameters
> ---
>
> Key: IGNITE-16191
> URL: https://issues.apache.org/jira/browse/IGNITE-16191
> Project: Ignite
>  Issue Type: Bug
>  Components: sql
>Reporter: Aleksey Plekhanov
>Assignee: Andrey Mashenkov
>Priority: Major
>  Labels: calcite3-required
> Fix For: 2.13
>
>  Time Spent: 1h
>  Remaining Estimate: 0h
>
> The calcite engine supports the {{COUNT}} aggregate function with multiple 
> parameters. Such a function should return the number of input rows for which 
> parameters are wholly not null.
> But currently queries like: 
> {noformat}
> SELECT COUNT(null, 1)
> SELECT COUNT(1, null)
> {noformat}
> Return 0 (expected 1).
> Query:
> {noformat}
> SELECT COUNT(null, null)
> {noformat}
> Throw an exception:
> {noformat}
> Caused by: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
>   at java.util.ArrayList.rangeCheck(ArrayList.java:657)
>   at java.util.ArrayList.get(ArrayList.java:433)
>   at 
> org.apache.ignite.internal.processors.query.calcite.exec.exp.agg.AccumulatorsFactory$WrapperPrototype$1.apply(AccumulatorsFactory.java:226)
>   at 
> org.apache.ignite.internal.processors.query.calcite.exec.exp.agg.AccumulatorsFactory$WrapperPrototype$1.apply(AccumulatorsFactory.java:223)
>   at 
> org.apache.ignite.internal.processors.query.calcite.exec.exp.agg.AccumulatorsFactory$AccumulatorWrapperImpl.add(AccumulatorsFactory.java:305)
>   at 
> org.apache.ignite.internal.processors.query.calcite.exec.rel.HashAggregateNode$Grouping.addOnMapper(HashAggregateNode.java:294)
>   at 
> org.apache.ignite.internal.processors.query.calcite.exec.rel.HashAggregateNode$Grouping.add(HashAggregateNode.java:265)
>   at 
> org.apache.ignite.internal.processors.query.calcite.exec.rel.HashAggregateNode$Grouping.access$100(HashAggregateNode.java:222)
>   at 
> org.apache.ignite.internal.processors.query.calcite.exec.rel.HashAggregateNode.push(HashAggregateNode.java:127)
>   at 
> org.apache.ignite.internal.processors.query.calcite.exec.rel.ScanNode.push(ScanNode.java:107)
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Updated] (IGNITE-16191) Calcite engine. Unexpected result of COUNT with multiple parameters

2022-01-26 Thread Yury Gerzhedovich (Jira)


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

Yury Gerzhedovich updated IGNITE-16191:
---
Component/s: sql

> Calcite engine. Unexpected result of COUNT with multiple parameters
> ---
>
> Key: IGNITE-16191
> URL: https://issues.apache.org/jira/browse/IGNITE-16191
> Project: Ignite
>  Issue Type: Bug
>  Components: sql
>Reporter: Aleksey Plekhanov
>Priority: Major
>  Labels: calcite2-required, calcite3-required
>
> The calcite engine supports the {{COUNT}} aggregate function with multiple 
> parameters. Such a function should return the number of input rows for which 
> parameters are wholly not null.
> But currently queries like: 
> {noformat}
> SELECT COUNT(null, 1)
> SELECT COUNT(1, null)
> {noformat}
> Return 0 (expected 1).
> Query:
> {noformat}
> SELECT COUNT(null, null)
> {noformat}
> Throw an exception:
> {noformat}
> Caused by: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
>   at java.util.ArrayList.rangeCheck(ArrayList.java:657)
>   at java.util.ArrayList.get(ArrayList.java:433)
>   at 
> org.apache.ignite.internal.processors.query.calcite.exec.exp.agg.AccumulatorsFactory$WrapperPrototype$1.apply(AccumulatorsFactory.java:226)
>   at 
> org.apache.ignite.internal.processors.query.calcite.exec.exp.agg.AccumulatorsFactory$WrapperPrototype$1.apply(AccumulatorsFactory.java:223)
>   at 
> org.apache.ignite.internal.processors.query.calcite.exec.exp.agg.AccumulatorsFactory$AccumulatorWrapperImpl.add(AccumulatorsFactory.java:305)
>   at 
> org.apache.ignite.internal.processors.query.calcite.exec.rel.HashAggregateNode$Grouping.addOnMapper(HashAggregateNode.java:294)
>   at 
> org.apache.ignite.internal.processors.query.calcite.exec.rel.HashAggregateNode$Grouping.add(HashAggregateNode.java:265)
>   at 
> org.apache.ignite.internal.processors.query.calcite.exec.rel.HashAggregateNode$Grouping.access$100(HashAggregateNode.java:222)
>   at 
> org.apache.ignite.internal.processors.query.calcite.exec.rel.HashAggregateNode.push(HashAggregateNode.java:127)
>   at 
> org.apache.ignite.internal.processors.query.calcite.exec.rel.ScanNode.push(ScanNode.java:107)
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)