Github user ravipesala commented on a diff in the pull request: https://github.com/apache/incubator-carbondata/pull/703#discussion_r110096123 --- Diff: integration/spark-common/src/main/java/org/apache/carbondata/spark/merger/CarbonCompactionUtil.java --- @@ -351,4 +351,33 @@ private static int getDimensionDefaultCardinality(CarbonDimension dimension) { } return cardinality; } + + /** + * This method will check for any restructured block in the blocks selected for compaction + * + * @param segmentMapping + * @param dataFileMetadataSegMapping + * @param tableLastUpdatedTime + * @return + */ + public static boolean checkIfAnyRestructuredBlockExists(Map<String, TaskBlockInfo> segmentMapping, + Map<String, List<DataFileFooter>> dataFileMetadataSegMapping, long tableLastUpdatedTime) { + boolean restructuredBlockExists = false; + for (Map.Entry<String, TaskBlockInfo> taskMap : segmentMapping.entrySet()) { + String segmentId = taskMap.getKey(); + List<DataFileFooter> listMetadata = dataFileMetadataSegMapping.get(segmentId); + for (DataFileFooter dataFileFooter : listMetadata) { + // if schema modified timestamp is greater than footer stored schema timestamp, --- End diff -- even for table rename also are we updating the schema timestamp ?
--- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. ---