You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@carbondata.apache.org by foryou2030 <gi...@git.apache.org> on 2016/09/07 14:54:01 UTC

[GitHub] incubator-carbondata pull request #137: [CARBONDATA-222] Handled query issue...

GitHub user foryou2030 opened a pull request:

    https://github.com/apache/incubator-carbondata/pull/137

    [CARBONDATA-222]  Handled query issue for all dimensions are no dictionary columns

    # Why raise this pr?
    query failed when all dimensions are no-dictionary column, and the data contains one row that all no-dictionary column value are empty
    # How to resolve?
    when find First Data Block, we need to compare indexes, in this scenario,we should use other compareTo method.

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

    $ git pull https://github.com/foryou2030/incubator-carbondata no_dict_null

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

    https://github.com/apache/incubator-carbondata/pull/137.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 #137
    
----

----


---
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] incubator-carbondata pull request #137: [CARBONDATA-222] Handled query issue...

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

    https://github.com/apache/incubator-carbondata/pull/137#discussion_r77950155
  
    --- Diff: core/src/main/java/org/apache/carbondata/core/carbon/datastore/impl/btree/BTreeDataRefNodeFinder.java ---
    @@ -240,9 +240,16 @@ private int compareIndexes(IndexKey first, IndexKey second) {
                   firstNoDictionaryKeyBuffer.getShort(nonDictionaryKeyOffset + SHORT_SIZE_IN_BYTES);
               secondNodeDictionaryLength =
                   secondNoDictionaryKeyBuffer.getShort(nonDictionaryKeyOffset + SHORT_SIZE_IN_BYTES);
    -          compareResult = ByteUtil.UnsafeComparer.INSTANCE
    -              .compareTo(first.getNoDictionaryKeys(), actualOffset, firstNoDcitionaryLength,
    -                  second.getNoDictionaryKeys(), actualOffset, secondNodeDictionaryLength);
    +          int minLength = Math.min(firstNoDcitionaryLength, secondNodeDictionaryLength);
    --- End diff --
    
    @kumarvishal09 please comment on this. I am not getting how actualOffset is same for both keybuffers. 
    Also as I know length can be calculated by nextOffset-currentOffset. Please give the structure of data stored and how this function works 


---
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] incubator-carbondata pull request #137: [CARBONDATA-222] Handled query issue...

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

    https://github.com/apache/incubator-carbondata/pull/137


---
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] incubator-carbondata pull request #137: [CARBONDATA-222] Handled query issue...

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

    https://github.com/apache/incubator-carbondata/pull/137#discussion_r77957259
  
    --- Diff: core/src/main/java/org/apache/carbondata/core/carbon/datastore/impl/btree/BTreeDataRefNodeFinder.java ---
    @@ -240,9 +240,16 @@ private int compareIndexes(IndexKey first, IndexKey second) {
                   firstNoDictionaryKeyBuffer.getShort(nonDictionaryKeyOffset + SHORT_SIZE_IN_BYTES);
               secondNodeDictionaryLength =
                   secondNoDictionaryKeyBuffer.getShort(nonDictionaryKeyOffset + SHORT_SIZE_IN_BYTES);
    -          compareResult = ByteUtil.UnsafeComparer.INSTANCE
    -              .compareTo(first.getNoDictionaryKeys(), actualOffset, firstNoDcitionaryLength,
    -                  second.getNoDictionaryKeys(), actualOffset, secondNodeDictionaryLength);
    +          int minLength = Math.min(firstNoDcitionaryLength, secondNodeDictionaryLength);
    --- End diff --
    
    ok, handled. thanks for you @gvramana @kumarvishal09 


---
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] incubator-carbondata pull request #137: [CARBONDATA-222] Handled query issue...

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

    https://github.com/apache/incubator-carbondata/pull/137#discussion_r77953725
  
    --- Diff: core/src/main/java/org/apache/carbondata/core/carbon/datastore/impl/btree/BTreeDataRefNodeFinder.java ---
    @@ -240,9 +240,16 @@ private int compareIndexes(IndexKey first, IndexKey second) {
                   firstNoDictionaryKeyBuffer.getShort(nonDictionaryKeyOffset + SHORT_SIZE_IN_BYTES);
               secondNodeDictionaryLength =
                   secondNoDictionaryKeyBuffer.getShort(nonDictionaryKeyOffset + SHORT_SIZE_IN_BYTES);
    -          compareResult = ByteUtil.UnsafeComparer.INSTANCE
    -              .compareTo(first.getNoDictionaryKeys(), actualOffset, firstNoDcitionaryLength,
    -                  second.getNoDictionaryKeys(), actualOffset, secondNodeDictionaryLength);
    +          int minLength = Math.min(firstNoDcitionaryLength, secondNodeDictionaryLength);
    --- End diff --
    
    @gvramana Yes you right current logic has some problem we need to maintain offset of both the keys and when it is not the last key we need to substract the secondNodeDictionaryLength - actualOffset1 and firstNodeDictionaryLength-actualOffset. 


---
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.
---