nihal0107 commented on a change in pull request #3878:
URL: https://github.com/apache/carbondata/pull/3878#discussion_r468359349



##########
File path: 
integration/hive/src/main/java/org/apache/carbondata/hive/MapredCarbonInputFormat.java
##########
@@ -213,6 +223,45 @@ private QueryModel getQueryModel(Configuration 
configuration, String path)
         .build();
   }
 
+  private static CarbonTable getCarbonTable(Configuration tableProperties)
+      throws InvalidConfigurationException, IOException, SQLException {
+    String[] tableUniqueName = tableProperties.get("name").split("\\.");
+    String databaseName = tableUniqueName[0];
+    String tableName = tableUniqueName[1];
+    String tablePath = 
tableProperties.get(hive_metastoreConstants.META_TABLE_LOCATION);
+    String columns = 
tableProperties.get(hive_metastoreConstants.META_TABLE_COLUMNS);
+    String sortColumns = tableProperties.get("sort_columns");
+    String columnTypes = 
tableProperties.get(hive_metastoreConstants.META_TABLE_COLUMN_TYPES);
+    String partitionColumns =
+        
tableProperties.get(hive_metastoreConstants.META_TABLE_PARTITION_COLUMNS);
+    String partitionColumnTypes =
+        
tableProperties.get(hive_metastoreConstants.META_TABLE_PARTITION_COLUMN_TYPES);
+    if (partitionColumns != null) {
+      columns = columns + "," + partitionColumns;
+      columnTypes = columnTypes + ":" + partitionColumnTypes;
+    }
+    String[] columnTypeArray = 
HiveCarbonUtil.splitSchemaStringToArray(columnTypes);
+
+    AbsoluteTableIdentifier absoluteTableIdentifier = AbsoluteTableIdentifier
+        .from(tableProperties.get(hive_metastoreConstants.META_TABLE_LOCATION),
+            getDatabaseName(tableProperties), getTableName(tableProperties));
+    String schemaPath =
+        
CarbonTablePath.getSchemaFilePath(absoluteTableIdentifier.getTablePath(), 
tableProperties);
+
+    CarbonTable carbonTable;
+    String carbonDataFile = CarbonUtil.getFilePathExternalFilePath(schemaPath, 
tableProperties);
+    if (carbonDataFile == null) {

Review comment:
       done.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to