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

Chunwei Lei commented on CALCITE-5170:
--------------------------------------

Good catch! The PR looks good.

> Assertion error on range distribution creation
> ----------------------------------------------
>
>                 Key: CALCITE-5170
>                 URL: https://issues.apache.org/jira/browse/CALCITE-5170
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.30.0
>            Reporter: Roman Kondakov
>            Assignee: Roman Kondakov
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.31.0
>
>
> An assertion error occurs on range distribution creation. This test fails:
> {code:java}
> @Test void testRangeRelDistributionKeys() {
>     RelDistributions.range(Arrays.asList(0, 1));
> }
> {code}
> This happens because there is an incorrect assertion in 
> {{RelDistributionImpl}} constructor:
> {code:java}
>       assert type == Type.HASH_DISTRIBUTED
>           || type == Type.RANDOM_DISTRIBUTED
>           || keys.isEmpty();
> {code}
> It should be  {{RANGE_DISTRIBUTED}} instead of {{RANDOM_DISTRIBUTED}}



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to