[GitHub] carbondata pull request #1119: [CarbonData-1205] change default partition id...

classic Classic list List threaded Threaded
44 messages Options
123
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #1119: [CarbonData-1250] change default partition id...

qiuchenjian-2
Github user QiangCai commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1119#discussion_r125246737
 
    --- Diff: core/src/main/java/org/apache/carbondata/core/metadata/converter/ThriftWrapperSchemaConverterImpl.java ---
    @@ -219,6 +219,10 @@
         externalPartitionInfo.setList_info(wrapperPartitionInfo.getListInfo());
         externalPartitionInfo.setRange_info(wrapperPartitionInfo.getRangeInfo());
         externalPartitionInfo.setNum_partitions(wrapperPartitionInfo.getNumPartitions());
    +    externalPartitionInfo.setNumOfPartitions(wrapperPartitionInfo.getNumberOfPartitions());
    +    externalPartitionInfo.setMax_partition(wrapperPartitionInfo.getMAX_PARTITION());
    +    externalPartitionInfo.setTaskId_In_PartitionOrder(wrapperPartitionInfo
    --- End diff --
   
    why need to save taskId?


---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #1119: [CarbonData-1250] change default partition id...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user QiangCai commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1119#discussion_r125252324
 
    --- Diff: core/src/main/java/org/apache/carbondata/core/scan/filter/partition/PartitionFilterUtil.java ---
    @@ -229,35 +229,37 @@ public static BitSet getPartitionMapForRangeFilter(PartitionInfo partitionInfo,
           // filter value is in default partition
           if (isGreaterThan) {
             // GreaterThan(>), GreaterThanEqualTo(>=)
    -        partitionMap.set(numPartitions);
    +        partitionMap.set(0);
           } else {
             // LessThan(<), LessThanEqualTo(<=)
    -        partitionMap.set(0, partitioner.numPartitions());
    +        partitionMap.set(1, partitioner.numPartitions());
           }
         } else {
           // filter value is not in default partition
           if (result == 0) {
             // if result is 0, the filter value is a bound value of range partition.
             if (isGreaterThan) {
               // GreaterThan(>), GreaterThanEqualTo(>=)
    -          partitionMap.set(partitionIndex + 1, partitioner.numPartitions());
    +          partitionMap.set(partitionIndex + 1, partitioner.numPartitions() - 1);
    +          partitionMap.set(0);
             } else {
               if (isEqualTo) {
                 // LessThanEqualTo(<=)
    -            partitionMap.set(0, partitionIndex + 2);
    +            partitionMap.set(1, partitionIndex + 3);
               } else {
                 // LessThan(<)
    -            partitionMap.set(0, partitionIndex + 1);
    +            partitionMap.set(1, partitionIndex + 2);
               }
             }
           } else {
             // the filter value is not a bound value of range partition
             if (isGreaterThan) {
               // GreaterThan(>), GreaterThanEqualTo(>=)
    -          partitionMap.set(partitionIndex, partitioner.numPartitions());
    +          partitionMap.set(partitionIndex + 1, partitioner.numPartitions() - 1);
    --- End diff --
   
    partitionMap.set(partitionIndex + 1, partitioner.numPartitions() );


---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #1119: [CarbonData-1250] change default partition id...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user QiangCai commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1119#discussion_r125250632
 
    --- Diff: core/src/main/java/org/apache/carbondata/core/scan/filter/partition/PartitionFilterUtil.java ---
    @@ -229,35 +229,37 @@ public static BitSet getPartitionMapForRangeFilter(PartitionInfo partitionInfo,
           // filter value is in default partition
           if (isGreaterThan) {
             // GreaterThan(>), GreaterThanEqualTo(>=)
    -        partitionMap.set(numPartitions);
    +        partitionMap.set(0);
           } else {
             // LessThan(<), LessThanEqualTo(<=)
    -        partitionMap.set(0, partitioner.numPartitions());
    +        partitionMap.set(1, partitioner.numPartitions());
    --- End diff --
   
    no need to change it.
    It means all partitions were matched.


---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #1119: [CarbonData-1250] change default partition id...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user QiangCai commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1119#discussion_r125251966
 
    --- Diff: core/src/main/java/org/apache/carbondata/core/scan/filter/partition/PartitionFilterUtil.java ---
    @@ -229,35 +229,37 @@ public static BitSet getPartitionMapForRangeFilter(PartitionInfo partitionInfo,
           // filter value is in default partition
           if (isGreaterThan) {
             // GreaterThan(>), GreaterThanEqualTo(>=)
    -        partitionMap.set(numPartitions);
    +        partitionMap.set(0);
           } else {
             // LessThan(<), LessThanEqualTo(<=)
    -        partitionMap.set(0, partitioner.numPartitions());
    +        partitionMap.set(1, partitioner.numPartitions());
           }
         } else {
           // filter value is not in default partition
           if (result == 0) {
             // if result is 0, the filter value is a bound value of range partition.
             if (isGreaterThan) {
               // GreaterThan(>), GreaterThanEqualTo(>=)
    -          partitionMap.set(partitionIndex + 1, partitioner.numPartitions());
    +          partitionMap.set(partitionIndex + 1, partitioner.numPartitions() - 1);
    --- End diff --
   
    partitionMap.set(partitionIndex + 2, partitioner.numPartitions());


---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
123