You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Chunwei Lei (Jira)" <ji...@apache.org> on 2020/11/03 02:32:00 UTC

[jira] [Resolved] (CALCITE-4350) The reverse operation of collation direction is overly relaxed

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

Chunwei Lei resolved CALCITE-4350.
----------------------------------
    Resolution: Fixed

Fixed in [https://github.com/apache/calcite/commit/c19da85b32f17fd78ff2fb03298ef66675c1705c.] Thank you for your PR, [~fan_li_ya]!

> The reverse operation of collation direction is overly relaxed
> --------------------------------------------------------------
>
>                 Key: CALCITE-4350
>                 URL: https://issues.apache.org/jira/browse/CALCITE-4350
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>            Reporter: Liya Fan
>            Assignee: Liya Fan
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.27.0
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> For the current implementation, {{RelFieldCollation#Direction#reverse}} returns \{{DESCENDING}} for \{{STRICTLY_ASCENDING}}, and returns \{{ASCENDING}} for {{STRICTLY_DESCENDING}}.
> This is overly relaxed. In a strict manner, it should return \{{STRICTLY_DESCENDING}} for \{{STRICTLY_ASCENDING}}, and vice versa. 
> If the user needs to get the relaxed reverse direction, they may call \{{collation.getDirection().reverse().lax();}}, as in many places of our code base. 
> Do you agree?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)