New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CARBONDATA-4149] Fix query issues after alter add partition. #4107
Conversation
Build Success with Spark 2.3.4, Please check CI http://121.244.95.60:12444/job/ApacheCarbonPRBuilder2.3/5568/ |
Build Success with Spark 2.4.5, Please check CI http://121.244.95.60:12444/job/ApacheCarbon_PR_Builder_2.4.5/3802/ |
7146add
to
e7a92ed
Compare
Build Success with Spark 2.4.5, Please check CI http://121.244.95.60:12444/job/ApacheCarbon_PR_Builder_2.4.5/3811/ |
Build Failed with Spark 2.3.4, Please check CI http://121.244.95.60:12444/job/ApacheCarbonPRBuilder2.3/5577/ |
Build Success with Spark 2.4.5, Please check CI http://121.244.95.60:12444/job/ApacheCarbon_PR_Builder_2.4.5/3815/ |
Build Success with Spark 2.3.4, Please check CI http://121.244.95.60:12444/job/ApacheCarbonPRBuilder2.3/5581/ |
core/src/main/java/org/apache/carbondata/core/indexstore/ExtendedBlockletWrapper.java
Outdated
Show resolved
Hide resolved
core/src/main/java/org/apache/carbondata/core/readcommitter/TableStatusReadCommittedScope.java
Outdated
Show resolved
Hide resolved
...g/apache/spark/sql/execution/command/partition/CarbonAlterTableAddHivePartitionCommand.scala
Outdated
Show resolved
Hide resolved
core/src/main/java/org/apache/carbondata/core/index/Segment.java
Outdated
Show resolved
Hide resolved
5910a5a
to
248c84d
Compare
integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/CarbonTableCompactor.scala
Show resolved
Hide resolved
...rc/test/scala/org/apache/carbondata/spark/testsuite/secondaryindex/TestSIWithPartition.scala
Show resolved
Hide resolved
integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/CarbonMergerRDD.scala
Outdated
Show resolved
Hide resolved
integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/CarbonTableCompactor.scala
Outdated
Show resolved
Hide resolved
Build Success with Spark 2.3.4, Please check CI http://121.244.95.60:12444/job/ApacheCarbonPRBuilder2.3/5593/ |
Build Success with Spark 2.4.5, Please check CI http://121.244.95.60:12444/job/ApacheCarbon_PR_Builder_2.4.5/3827/ |
248c84d
to
33085cf
Compare
Build Success with Spark 2.3.4, Please check CI http://121.244.95.60:12444/job/ApacheCarbonPRBuilder2.3/5594/ |
Build Success with Spark 2.4.5, Please check CI http://121.244.95.60:12444/job/ApacheCarbon_PR_Builder_2.4.5/3828/ |
integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/CarbonTableCompactor.scala
Outdated
Show resolved
Hide resolved
33085cf
to
3cbd484
Compare
@ShreelekhyaG please update PR description |
update partitionspec path after compaction load data to mv after add partition rework fix for muliple partitions removed old,new
3cbd484
to
265b0aa
Compare
LGTM |
Build Success with Spark 2.3.4, Please check CI http://121.244.95.60:12444/job/ApacheCarbonPRBuilder2.3/5602/ |
Build Success with Spark 2.4.5, Please check CI http://121.244.95.60:12444/job/ApacheCarbon_PR_Builder_2.4.5/3836/ |
Why is this PR needed? Query with SI after add partition based on location on partition table gives incorrect results. 1. While pruning, if it's an external segment, it should use ExternalSegmentResolver , and no need to use ImplicitIncludeFilterExecutor as an external segment is not added in the SI table. 2. If the partition table has external partitions, after compaction the new files are loaded to the external path. 3. Data is not loaded to the child table(MV) after executing add partition command What changes were proposed in this PR? 1. add path to loadMetadataDetails for external partition. It is used to identify it as an external segment. 2. After compaction, to not maintain any link to the external partition, the compacted files will be added as a new partition in the table. To update partition spec details in hive metastore, (drop partition + add partition) operations performed. 3. Add Load Pre and Post listener's in CarbonAlterTableAddHivePartitionCommand to trigger data load to materialized view. Does this PR introduce any user interface change? No Is any new testcase added? Yes This closes apache#4107
Why is this PR needed?
Query with SI after add partition based on location on partition table gives incorrect results.
ExternalSegmentResolver
, and no need to useImplicitIncludeFilterExecutor
as an external segment is not added in the SI table.What changes were proposed in this PR?
loadMetadataDetails
for external partition. It is used to identify it as an external segment.Does this PR introduce any user interface change?
Is any new testcase added?