Github user ravipesala commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2488#discussion_r202575874
--- Diff:
core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java ---
@@ -3231,4 +3231,42 @@ private static int
unsetLocalDictForComplexColumns(List<ColumnSchema> allColumns
}
return columnLocalDictGenMap;
}
+
+ /**
+ * This method get the carbon file format version
+ *
+ * @param carbonTable
+ * carbon Table
+ */
+ public static ColumnarFormatVersion getFormatVersion(CarbonTable
carbonTable) throws IOException
+ {
+ String tablePath = carbonTable.getTablePath();
+ CarbonFile[] carbonFiles = FileFactory
+ .getCarbonFile(tablePath)
+ .listFiles(new CarbonFileFilter() {
+ @Override
+ public boolean accept(CarbonFile file) {
+ if (file == null) {
+ return false;
+ }
+ return file.getName().endsWith("carbonindex");
--- End diff --
It should not be under carbontable object. It is file version and it is
related to each load, not table. @manishgupta88 I think your PR already
handles the validation of datamap loading on old formats right?
---