Github user lionelcao commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/1192#discussion_r130505076
--- Diff:
core/src/main/java/org/apache/carbondata/core/metadata/schema/PartitionInfo.java
---
@@ -65,6 +65,31 @@ public PartitionInfo(List<ColumnSchema>
columnSchemaList, PartitionType partitio
this.partitionIds = new ArrayList<>();
}
+ /**
+ * add partition means split default partition, add in last directly
+ */
+ public void addPartition(int addPartitionCount) {
+ for (int i = 0; i < addPartitionCount; i++) {
+ partitionIds.add(++MAX_PARTITION);
+ numPartitions++;
+ }
+ }
+
+ /**
+ * e.g. original partition[0,1,2,3,4,5]
+ * split partition 2 to partition 6,7,8 (will not reuse 2)
+ * then sourcePartitionId is 2, newPartitionNumbers is 3
+ * @param sourcePartitionIndex
+ * @param newPartitionNumbers
+ */
+ public void splitPartition(int sourcePartitionIndex, int
newPartitionNumbers) {
--- End diff --
Carbon partition design is different from Hive partition, it's not based on
path but blocks. Split means add new partition between existed partitions for
range partition table. For list partition table, split allow user to reduce the
partition data volume.
---
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 [email protected] or file a JIRA ticket
with INFRA.
---