You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by vdiravka <gi...@git.apache.org> on 2017/03/07 21:04:06 UTC

[GitHub] drill pull request #775: DRILL-5326: Unit tests failures related to the SERV...

GitHub user vdiravka opened a pull request:

    https://github.com/apache/drill/pull/775

    DRILL-5326: Unit tests failures related to the SERVER_METADTA

    - adding of the sql type name for the "GENERIC_OBJECT";
    - changing "NullCollation" in the "ServerMetaProvider" to the correct default value;

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/vdiravka/drill DRILL-5326

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/drill/pull/775.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #775
    
----
commit e7ca7650fa1bcc32638cfe4aade96aa56406a362
Author: Vitalii Diravka <vi...@gmail.com>
Date:   2017-03-07T20:53:03Z

    DRILL-5326: Unit tests failures related to the SERVER_METADTA
    - adding of the sql type name for the "GENERIC_OBJECT";
    - changing "NullCollation" in the "ServerMetaProvider" to the correct default value;

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] drill pull request #775: DRILL-5326: Unit tests failures related to the SERV...

Posted by jinfengni <gi...@git.apache.org>.
Github user jinfengni commented on a diff in the pull request:

    https://github.com/apache/drill/pull/775#discussion_r104816830
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/work/metadata/ServerMetaProvider.java ---
    @@ -76,7 +76,7 @@
           .setReadOnly(false)
           .setGroupBySupport(GroupBySupport.GB_UNRELATED)
           .setLikeEscapeClauseSupported(true)
    -      .setNullCollation(NullCollation.NC_AT_END)
    +      .setNullCollation(NullCollation.NC_HIGH)
    --- End diff --
    
    If only specify NC here (no sort order), then NC_HIGH looks more reasonable. The change looks fine to me.  


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] drill pull request #775: DRILL-5326: Unit tests failures related to the SERV...

Posted by zfong <gi...@git.apache.org>.
Github user zfong commented on a diff in the pull request:

    https://github.com/apache/drill/pull/775#discussion_r104805550
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/work/metadata/ServerMetaProvider.java ---
    @@ -76,7 +76,7 @@
           .setReadOnly(false)
           .setGroupBySupport(GroupBySupport.GB_UNRELATED)
           .setLikeEscapeClauseSupported(true)
    -      .setNullCollation(NullCollation.NC_AT_END)
    +      .setNullCollation(NullCollation.NC_HIGH)
    --- End diff --
    
    @jinfengni  - See @vdiravka's comments in the Jira.  The Drill documentation at https://drill.apache.org/docs/order-by-clause/#usage-notes says NULLs sort highest.  If the doc is wrong, then we should fix the doc. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] drill pull request #775: DRILL-5326: Unit tests failures related to the SERV...

Posted by vdiravka <gi...@git.apache.org>.
Github user vdiravka commented on a diff in the pull request:

    https://github.com/apache/drill/pull/775#discussion_r104812618
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/work/metadata/ServerMetaProvider.java ---
    @@ -76,7 +76,7 @@
           .setReadOnly(false)
           .setGroupBySupport(GroupBySupport.GB_UNRELATED)
           .setLikeEscapeClauseSupported(true)
    -      .setNullCollation(NullCollation.NC_AT_END)
    +      .setNullCollation(NullCollation.NC_HIGH)
    --- End diff --
    
    @jinfengni Agree with Paul. The difference between NC_HIGH and NC_AT_END for the DESC case. I checked that Drill uses NC_HIGH for sorting. Please, see it at [jira](https://issues.apache.org/jira/browse/DRILL-5326?focusedCommentId=15900411&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15900411), since github doesn't show formatted code correctly in the comments.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] drill issue #775: DRILL-5326: Unit tests failures related to the SERVER_META...

Posted by vdiravka <gi...@git.apache.org>.
Github user vdiravka commented on the issue:

    https://github.com/apache/drill/pull/775
  
    @laurentgo I changed the names for the server meta method. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] drill pull request #775: DRILL-5326: Unit tests failures related to the SERV...

Posted by jinfengni <gi...@git.apache.org>.
Github user jinfengni commented on a diff in the pull request:

    https://github.com/apache/drill/pull/775#discussion_r104807540
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/work/metadata/ServerMetaProvider.java ---
    @@ -76,7 +76,7 @@
           .setReadOnly(false)
           .setGroupBySupport(GroupBySupport.GB_UNRELATED)
           .setLikeEscapeClauseSupported(true)
    -      .setNullCollation(NullCollation.NC_AT_END)
    +      .setNullCollation(NullCollation.NC_HIGH)
    --- End diff --
    
    My understanding is NULL collation should be specified together with ASC/DESC.  ASC/NULL LAST as the default option essentially implies NC_HIGH. However, I'm not sure if we just specify NC_HIGH alone, or ASC/NC_AT_END combined.   


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] drill pull request #775: DRILL-5326: Unit tests failures related to the SERV...

Posted by jinfengni <gi...@git.apache.org>.
Github user jinfengni commented on a diff in the pull request:

    https://github.com/apache/drill/pull/775#discussion_r104802660
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/work/metadata/ServerMetaProvider.java ---
    @@ -76,7 +76,7 @@
           .setReadOnly(false)
           .setGroupBySupport(GroupBySupport.GB_UNRELATED)
           .setLikeEscapeClauseSupported(true)
    -      .setNullCollation(NullCollation.NC_AT_END)
    +      .setNullCollation(NullCollation.NC_HIGH)
    --- End diff --
    
    I'm not completely sure why we should change from NC_AT_END to NC_HIGH, in stead of NC_AT_END.  I thought Drill is using ASC as default ordering, and NULLS LAST as default null collation for ASC. This is consistent to what Oracle [1] and Postgres [2] is doing : ASC /NULL LAST is the default option.  
    
    1. http://docs.oracle.com/javadb/10.6.2.1/ref/rrefsqlj13658.html
    2. https://www.postgresql.org/docs/9.4/static/queries-order.html



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] drill issue #775: DRILL-5326: Unit tests failures related to the SERVER_META...

Posted by laurentgo <gi...@git.apache.org>.
Github user laurentgo commented on the issue:

    https://github.com/apache/drill/pull/775
  
    LGTM


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] drill pull request #775: DRILL-5326: Unit tests failures related to the SERV...

Posted by laurentgo <gi...@git.apache.org>.
Github user laurentgo commented on a diff in the pull request:

    https://github.com/apache/drill/pull/775#discussion_r104813282
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/work/metadata/ServerMetaProvider.java ---
    @@ -76,7 +76,7 @@
           .setReadOnly(false)
           .setGroupBySupport(GroupBySupport.GB_UNRELATED)
           .setLikeEscapeClauseSupported(true)
    -      .setNullCollation(NullCollation.NC_AT_END)
    +      .setNullCollation(NullCollation.NC_HIGH)
    --- End diff --
    
    I'm not sure if the last sentence is correct. If user specified DESC, and null collation is unspecified, then null should sort first, no (if always HIGH). NC_HIGH seems then the correct value (unless the default can be changed in the planner configuration).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] drill pull request #775: DRILL-5326: Unit tests failures related to the SERV...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/drill/pull/775


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] drill pull request #775: DRILL-5326: Unit tests failures related to the SERV...

Posted by paul-rogers <gi...@git.apache.org>.
Github user paul-rogers commented on a diff in the pull request:

    https://github.com/apache/drill/pull/775#discussion_r104809964
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/work/metadata/ServerMetaProvider.java ---
    @@ -76,7 +76,7 @@
           .setReadOnly(false)
           .setGroupBySupport(GroupBySupport.GB_UNRELATED)
           .setLikeEscapeClauseSupported(true)
    -      .setNullCollation(NullCollation.NC_AT_END)
    +      .setNullCollation(NullCollation.NC_HIGH)
    --- End diff --
    
    When sorting in Drill, the detailed sort spec is set in the {{ExternalSort}} operator definition. This thing is a bit complex. One can control sort order (ASC, DESC) and nulls position (LOW, HIGH, UNSPECIFIED.)
    
    Data sorts according to ASC, DESC.
    Nulls sort as follows:
    
    HIGH: last if ASC, first if DESC
    LOW: first if ASC, last if DESC
    UNSPECIFIED: always high
    
    If the planner has no way of setting the nulls ordering from a SQL query, then the value is UNSPECIFIED, which means nulls always sort last as Jinfeng explained.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] drill issue #775: DRILL-5326: Unit tests failures related to the SERVER_META...

Posted by jinfengni <gi...@git.apache.org>.
Github user jinfengni commented on the issue:

    https://github.com/apache/drill/pull/775
  
    @laurentgo , @vdiravka , thanks. I'll run regression & merge.
    
    +1



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---