You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "walterddr (via GitHub)" <gi...@apache.org> on 2023/07/25 03:21:57 UTC

[GitHub] [pinot] walterddr opened a new issue, #11168: [multistage][agg] count(*) return final result on leaf causes compilation error

walterddr opened a new issue, #11168:
URL: https://github.com/apache/pinot/issues/11168

   ```
   select /*+ aggOptions(is_partitioned_by_group_by_keys = 'true') */
   AirlineID, count(*)
   from airlineStats 
   group by 1
   order by 2
   ```
   causes error b/c directly the `order by` operation cannot know count(*) is a non-nullable result column thus the isNullLast check in query context compilation will fail (b/c V2 engine doesn't carry the `*` argument over to the QueryContext thus causes isNullLast check accessing operand position out of bound:
   ```
   java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
   	at jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64) ~[?:?]
   	at jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70) ~[?:?]
   	at jdk.internal.util.Preconditions.checkIndex(Preconditions.java:248) ~[?:?]
   	at java.util.Objects.checkIndex(Objects.java:372) ~[?:?]
   	at java.util.ArrayList.get(ArrayList.java:459) ~[?:?]
   	at org.apache.pinot.core.query.request.context.utils.QueryContextConverterUtils.isNullsLast(QueryContextConverterUtils.java:178) ~[classes/:?]
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] walterddr commented on issue #11168: [multistage][agg] count(*) return final result on leaf causes compilation error

Posted by "walterddr (via GitHub)" <gi...@apache.org>.
walterddr commented on issue #11168:
URL: https://github.com/apache/pinot/issues/11168#issuecomment-1654717599

   this is needed b/c other empty operand functions such as `now()` will still be impacted (although currently it is not a valid query in v1) thank you for the follow up @shenyu0127 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] Jackie-Jiang commented on issue #11168: [multistage][agg] count(*) return final result on leaf causes compilation error

Posted by "Jackie-Jiang (via GitHub)" <gi...@apache.org>.
Jackie-Jiang commented on issue #11168:
URL: https://github.com/apache/pinot/issues/11168#issuecomment-1649038335

   In `RequestContextUtils` line 94-95 I can see a TODO to handle count without argument. I think we should just add the dummy `*` in leaf stage so that the format is the same as v1


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] abhioncbr commented on issue #11168: [multistage][agg] count(*) return final result on leaf causes compilation error

Posted by "abhioncbr (via GitHub)" <gi...@apache.org>.
abhioncbr commented on issue #11168:
URL: https://github.com/apache/pinot/issues/11168#issuecomment-1649646106

   Please assign it to me. Thanks


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] walterddr commented on issue #11168: [multistage][agg] count(*) return final result on leaf causes compilation error

Posted by "walterddr (via GitHub)" <gi...@apache.org>.
walterddr commented on issue #11168:
URL: https://github.com/apache/pinot/issues/11168#issuecomment-1649947664

   oops too late @abhioncbr :-)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] walterddr commented on issue #11168: [multistage][agg] count(*) return final result on leaf causes compilation error

Posted by "walterddr (via GitHub)" <gi...@apache.org>.
walterddr commented on issue #11168:
URL: https://github.com/apache/pinot/issues/11168#issuecomment-1648998001

   CC @Jackie-Jiang @shenyu0127 @vvivekiyer 
   basically this unfortunate error only occurs if v2 engine compiles count(*) and at the same time order by (SortNode) gets push down to leaf. 
   - null check assumes QueryContext expression cannot have empty operand;
   - count(*) pushing down to leaf will not have an operand (or the `*` is stripped)
   
   potential solution 
   1. add a dummy (*) during physical plan construction
   2. make v1 QueryContextConverterUtils handle empty operand 
   
   I am more in favor of solution 1. thoughts?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] Jackie-Jiang closed issue #11168: [multistage][agg] count(*) return final result on leaf causes compilation error

Posted by "Jackie-Jiang (via GitHub)" <gi...@apache.org>.
Jackie-Jiang closed issue #11168: [multistage][agg] count(*) return final result on leaf causes compilation error
URL: https://github.com/apache/pinot/issues/11168


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] shenyu0127 commented on issue #11168: [multistage][agg] count(*) return final result on leaf causes compilation error

Posted by "shenyu0127 (via GitHub)" <gi...@apache.org>.
shenyu0127 commented on issue #11168:
URL: https://github.com/apache/pinot/issues/11168#issuecomment-1654710526

   Once https://github.com/apache/pinot/pull/11199 is checked in, the isNullsLast check will not fail for empty operand inside NULLS_LAST/NULLS_FIRST/ASC/DESC.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org