[jira] [Commented] (KYLIN-5279) Default null collation for Kylin5.0 sqls should be null-last for ASC order and null-first for DESC order.

2022-12-13 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/KYLIN-5279?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17646559#comment-17646559
 ] 

ASF subversion and git services commented on KYLIN-5279:


Commit 66057d5c707e58e1b1be405121561ce779780008 in kylin's branch 
refs/heads/kylin5 from sibing.zhang
[ https://gitbox.apache.org/repos/asf?p=kylin.git;h=66057d5c70 ]

KYLIN-5279 Modify the default value of null collation to low


> Default null collation for Kylin5.0 sqls should be null-last for ASC order 
> and null-first for DESC order.
> -
>
> Key: KYLIN-5279
> URL: https://issues.apache.org/jira/browse/KYLIN-5279
> Project: Kylin
>  Issue Type: Bug
>  Components: Query Engine
>Reporter: Zhenning Zhang
>Assignee: Zhenning Zhang
>Priority: Major
> Fix For: 5.0-alpha
>
> Attachments: image-2022-10-20-15-12-12-967.png
>
>
> according to pgsql: 
> [https://www.postgresql.org/docs/current/queries-order.html]
> "By default, null values sort as if larger than any non-null value; that is, 
> {{NULLS FIRST}} is the default for {{DESC}} order, and {{NULLS LAST}} 
> otherwise."
> currently, the result is:
> !image-2022-10-20-15-12-12-967.png|width=1320,height=743!



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


[jira] [Commented] (KYLIN-5279) Default null collation for Kylin5.0 sqls should be null-last for ASC order and null-first for DESC order.

2022-11-10 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/KYLIN-5279?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17632022#comment-17632022
 ] 

ASF GitHub Bot commented on KYLIN-5279:
---

hit-lacus merged PR #2001:
URL: https://github.com/apache/kylin/pull/2001




> Default null collation for Kylin5.0 sqls should be null-last for ASC order 
> and null-first for DESC order.
> -
>
> Key: KYLIN-5279
> URL: https://issues.apache.org/jira/browse/KYLIN-5279
> Project: Kylin
>  Issue Type: Bug
>  Components: Query Engine
>Reporter: Zhenning Zhang
>Assignee: Zhenning Zhang
>Priority: Major
> Fix For: 5.0-alpha
>
> Attachments: image-2022-10-20-15-12-12-967.png
>
>
> according to pgsql: 
> [https://www.postgresql.org/docs/current/queries-order.html]
> "By default, null values sort as if larger than any non-null value; that is, 
> {{NULLS FIRST}} is the default for {{DESC}} order, and {{NULLS LAST}} 
> otherwise."
> currently, the result is:
> !image-2022-10-20-15-12-12-967.png|width=1320,height=743!



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


[jira] [Commented] (KYLIN-5279) Default null collation for Kylin5.0 sqls should be null-last for ASC order and null-first for DESC order.

2022-11-10 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/KYLIN-5279?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17632023#comment-17632023
 ] 

ASF subversion and git services commented on KYLIN-5279:


Commit 1fa73daee7fff8e912bcff9aaf859b66f5ebf94a in kylin's branch 
refs/heads/kylin5 from zznlime
[ https://gitbox.apache.org/repos/asf?p=kylin.git;h=1fa73daee7 ]

KYLIN-5279 Add default null collation configuration with 
CalciteExtrasProperties for Kylin5.0  (#2001)

* KYLIN-5279 Default null collation for Kylin5.0 sqls should be null-last for 
ASC order and null-first for DESC order.

* KYLIN-5279 add a config for default null collation for Kylin5.0.

* reuse KylinConfigBase#getCalciteExtrasProperties for get default null 
collation.

> Default null collation for Kylin5.0 sqls should be null-last for ASC order 
> and null-first for DESC order.
> -
>
> Key: KYLIN-5279
> URL: https://issues.apache.org/jira/browse/KYLIN-5279
> Project: Kylin
>  Issue Type: Bug
>  Components: Query Engine
>Reporter: Zhenning Zhang
>Assignee: Zhenning Zhang
>Priority: Major
> Fix For: 5.0-alpha
>
> Attachments: image-2022-10-20-15-12-12-967.png
>
>
> according to pgsql: 
> [https://www.postgresql.org/docs/current/queries-order.html]
> "By default, null values sort as if larger than any non-null value; that is, 
> {{NULLS FIRST}} is the default for {{DESC}} order, and {{NULLS LAST}} 
> otherwise."
> currently, the result is:
> !image-2022-10-20-15-12-12-967.png|width=1320,height=743!



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


[jira] [Commented] (KYLIN-5279) Default null collation for Kylin5.0 sqls should be null-last for ASC order and null-first for DESC order.

2022-10-25 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/KYLIN-5279?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17624194#comment-17624194
 ] 

ASF GitHub Bot commented on KYLIN-5279:
---

hit-lacus commented on PR #2001:
URL: https://github.com/apache/kylin/pull/2001#issuecomment-1291530344

   LGTM, I will merge it later.




> Default null collation for Kylin5.0 sqls should be null-last for ASC order 
> and null-first for DESC order.
> -
>
> Key: KYLIN-5279
> URL: https://issues.apache.org/jira/browse/KYLIN-5279
> Project: Kylin
>  Issue Type: Bug
>  Components: Query Engine
>Reporter: Zhenning Zhang
>Assignee: Zhenning Zhang
>Priority: Major
> Fix For: 5.0-alpha
>
> Attachments: image-2022-10-20-15-12-12-967.png
>
>
> according to pgsql: 
> [https://www.postgresql.org/docs/current/queries-order.html]
> "By default, null values sort as if larger than any non-null value; that is, 
> {{NULLS FIRST}} is the default for {{DESC}} order, and {{NULLS LAST}} 
> otherwise."
> currently, the result is:
> !image-2022-10-20-15-12-12-967.png|width=1320,height=743!



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


[jira] [Commented] (KYLIN-5279) Default null collation for Kylin5.0 sqls should be null-last for ASC order and null-first for DESC order.

2022-10-25 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/KYLIN-5279?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17623830#comment-17623830
 ] 

ASF GitHub Bot commented on KYLIN-5279:
---

zznlime commented on PR #2001:
URL: https://github.com/apache/kylin/pull/2001#issuecomment-1290563309

   Thanks for the suggestion! Have remove the config 
'kylin.query.asc-order-null-first-enable', and reuse 
KylinConfigBase#getCalciteExtrasProperties for setting default null collation.
   
   @hit-lacus 




> Default null collation for Kylin5.0 sqls should be null-last for ASC order 
> and null-first for DESC order.
> -
>
> Key: KYLIN-5279
> URL: https://issues.apache.org/jira/browse/KYLIN-5279
> Project: Kylin
>  Issue Type: Bug
>  Components: Query Engine
>Reporter: Zhenning Zhang
>Assignee: Zhenning Zhang
>Priority: Major
> Fix For: 5.0-alpha
>
> Attachments: image-2022-10-20-15-12-12-967.png
>
>
> according to pgsql: 
> [https://www.postgresql.org/docs/current/queries-order.html]
> "By default, null values sort as if larger than any non-null value; that is, 
> {{NULLS FIRST}} is the default for {{DESC}} order, and {{NULLS LAST}} 
> otherwise."
> currently, the result is:
> !image-2022-10-20-15-12-12-967.png|width=1320,height=743!



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


[jira] [Commented] (KYLIN-5279) Default null collation for Kylin5.0 sqls should be null-last for ASC order and null-first for DESC order.

2022-10-25 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/KYLIN-5279?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17623592#comment-17623592
 ] 

ASF GitHub Bot commented on KYLIN-5279:
---

hit-lacus commented on PR #2001:
URL: https://github.com/apache/kylin/pull/2001#issuecomment-1290073592

   Here is my suggestion.You don't need add a new config entry like: 
`kylin.query.asc-order-null-first-enable`. 
   
   Looks like you can reuse existent config entry in 
`KylinConfigBase#getCalciteExtrasProperties` and remove the overwrite method 
`defaultNullCollation` of KECalciteConfig.  After that, you 
   just need set 
"kylin.query.calcite.extras-props.defaultNullCollation=low/high/first/last" in 
kylin.properties .
   




> Default null collation for Kylin5.0 sqls should be null-last for ASC order 
> and null-first for DESC order.
> -
>
> Key: KYLIN-5279
> URL: https://issues.apache.org/jira/browse/KYLIN-5279
> Project: Kylin
>  Issue Type: Bug
>  Components: Query Engine
>Reporter: Zhenning Zhang
>Assignee: Zhenning Zhang
>Priority: Major
> Fix For: 5.0-alpha
>
> Attachments: image-2022-10-20-15-12-12-967.png
>
>
> according to pgsql: 
> [https://www.postgresql.org/docs/current/queries-order.html]
> "By default, null values sort as if larger than any non-null value; that is, 
> {{NULLS FIRST}} is the default for {{DESC}} order, and {{NULLS LAST}} 
> otherwise."
> currently, the result is:
> !image-2022-10-20-15-12-12-967.png|width=1320,height=743!



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


[jira] [Commented] (KYLIN-5279) Default null collation for Kylin5.0 sqls should be null-last for ASC order and null-first for DESC order.

2022-10-22 Thread liyang (Jira)


[ 
https://issues.apache.org/jira/browse/KYLIN-5279?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17622601#comment-17622601
 ] 

liyang commented on KYLIN-5279:
---

NULL is smaller or larger? It depends.

The answe depends on the SQL vendor. Below is a summary from
[https://learnsql.com/blog/how-to-order-rows-with-nulls/]
 * PostgreSQL / Oracle  — NULL is larger, by default
 * MySQL / SQL Server — NULL is smaller, by default

Of course, the default behavior is configurable in most of these products.

The PR looks good as it lets KYLIN behavior configurable as well. 

> Default null collation for Kylin5.0 sqls should be null-last for ASC order 
> and null-first for DESC order.
> -
>
> Key: KYLIN-5279
> URL: https://issues.apache.org/jira/browse/KYLIN-5279
> Project: Kylin
>  Issue Type: Bug
>  Components: Query Engine
>Reporter: Zhenning Zhang
>Assignee: Zhenning Zhang
>Priority: Major
> Fix For: 5.0-alpha
>
> Attachments: image-2022-10-20-15-12-12-967.png
>
>
> according to pgsql: 
> [https://www.postgresql.org/docs/current/queries-order.html]
> "By default, null values sort as if larger than any non-null value; that is, 
> {{NULLS FIRST}} is the default for {{DESC}} order, and {{NULLS LAST}} 
> otherwise."
> currently, the result is:
> !image-2022-10-20-15-12-12-967.png|width=1320,height=743!



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


[jira] [Commented] (KYLIN-5279) Default null collation for Kylin5.0 sqls should be null-last for ASC order and null-first for DESC order.

2022-10-20 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/KYLIN-5279?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17620843#comment-17620843
 ] 

ASF GitHub Bot commented on KYLIN-5279:
---

zznlime commented on PR #2001:
URL: https://github.com/apache/kylin/pull/2001#issuecomment-1285064622

   @hit-lacus 




> Default null collation for Kylin5.0 sqls should be null-last for ASC order 
> and null-first for DESC order.
> -
>
> Key: KYLIN-5279
> URL: https://issues.apache.org/jira/browse/KYLIN-5279
> Project: Kylin
>  Issue Type: Bug
>  Components: Query Engine
>Reporter: Zhenning Zhang
>Assignee: Zhenning Zhang
>Priority: Major
> Fix For: 5.0-alpha
>
> Attachments: image-2022-10-20-15-12-12-967.png
>
>
> according to pgsql: 
> [https://www.postgresql.org/docs/current/queries-order.html]
> "By default, null values sort as if larger than any non-null value; that is, 
> {{NULLS FIRST}} is the default for {{DESC}} order, and {{NULLS LAST}} 
> otherwise."
> currently, the result is:
> !image-2022-10-20-15-12-12-967.png|width=1320,height=743!



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


[jira] [Commented] (KYLIN-5279) Default null collation for Kylin5.0 sqls should be null-last for ASC order and null-first for DESC order.

2022-10-20 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/KYLIN-5279?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17620839#comment-17620839
 ] 

ASF GitHub Bot commented on KYLIN-5279:
---

zznlime opened a new pull request, #2001:
URL: https://github.com/apache/kylin/pull/2001

   according to pgsql: 
https://www.postgresql.org/docs/current/queries-order.html
   
   By default, null values sort as if larger than any non-null value; that is, 
NULLS FIRST is the default for DESC order, and NULLS LAST otherwise.
   
   ## Branch to commit
   - [ ] Branch **kylin3** for v2.x to v3.x
   - [ ] Branch **kylin4** for v4.x
   - [ x ] Branch **kylin5** for v5.x
   
   ## Types of changes
   
   What types of changes does your code introduce to Kylin?
   _Put an `x` in the boxes that apply_
   
   - [ x ] Bugfix (non-breaking change which fixes an issue)
   - [ ] New feature (non-breaking change which adds functionality)
   - [ ] Breaking change (fix or feature that would cause existing 
functionality to not work as expected)
   - [ ] Documentation Update (if none of the other choices apply)
   
   ## Checklist
   
   _Put an `x` in the boxes that apply. You can also fill these out after 
creating the PR. If you're unsure about any of them, don't hesitate to ask. 
We're here to help! This is simply a reminder of what we are going to look for 
before merging your code._
   
   - [x] I have created an issue on [Kylin's 
jira](https://issues.apache.org/jira/browse/KYLIN), and have described the 
bug/feature there in detail
   - [x] Commit messages in my PR start with the related jira ID, like 
"KYLIN-5279 Make Kylin project open-source"
   - [x] Compiling and unit tests pass locally with my changes
   - [ ] I have added tests that prove my fix is effective or that my feature 
works
   - [ ] I have added necessary documentation (if appropriate)
   - [ ] Any dependent changes have been merged
   
   




> Default null collation for Kylin5.0 sqls should be null-last for ASC order 
> and null-first for DESC order.
> -
>
> Key: KYLIN-5279
> URL: https://issues.apache.org/jira/browse/KYLIN-5279
> Project: Kylin
>  Issue Type: Bug
>  Components: Query Engine
>Reporter: Zhenning Zhang
>Assignee: Zhenning Zhang
>Priority: Major
> Fix For: 5.0-alpha
>
> Attachments: image-2022-10-20-15-12-12-967.png
>
>
> according to pgsql: 
> [https://www.postgresql.org/docs/current/queries-order.html]
> "By default, null values sort as if larger than any non-null value; that is, 
> {{NULLS FIRST}} is the default for {{DESC}} order, and {{NULLS LAST}} 
> otherwise."
> currently, the result is:
> !image-2022-10-20-15-12-12-967.png|width=1320,height=743!



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