[GitHub] [carbondata] kunal642 commented on a change in pull request #3914: [CARBONDATA-3979] Added Hive local dictionary support example

Posted by GitBox on
URL: http://apache-carbondata-dev-mailing-list-archive.168.s1.nabble.com/GitHub-carbondata-ShreelekhyaG-opened-a-new-pull-request-3914-WIP-Added-Hive-test-for-read-and-local-tp99864p101334.html


kunal642 commented on a change in pull request #3914:
URL: https://github.com/apache/carbondata/pull/3914#discussion_r499389123



##########
File path: integration/hive/src/test/java/org/apache/carbondata/hive/HiveCarbonTest.java
##########
@@ -211,6 +248,85 @@ public void testStructType() throws Exception {
     checkAnswer(carbonResult, hiveResult);
   }
 
+  private ArrayList<DimensionRawColumnChunk> getDimRawChunk(Integer blockindex)
+      throws IOException {
+    File rootPath = new File(HiveTestUtils.class.getResource("/").getPath() + "../../../..");
+    String storePath = rootPath.getAbsolutePath() + "/integration/hive/target/warehouse/warehouse/hive_carbon_table/";
+    CarbonFile[] dataFiles = FileFactory.getCarbonFile(storePath)
+        .listFiles(new CarbonFileFilter() {
+          @Override
+          public boolean accept(CarbonFile file) {
+            if (file.getName().endsWith(CarbonCommonConstants.FACT_FILE_EXT)) {
+              return true;
+            } else {
+              return false;
+            }
+          }
+        });
+    ArrayList<DimensionRawColumnChunk> dimensionRawColumnChunks = read(dataFiles[0].getAbsolutePath(),
+        blockindex);
+    return dimensionRawColumnChunks;
+  }
+
+  private ArrayList<DimensionRawColumnChunk> read(String filePath, Integer blockIndex) throws IOException {

Review comment:
       If this code to verify LocalDictionary is same as the other LocalDictionaryTest cases, please move to a common Util class and use at both places.




----------------------------------------------------------------
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:
[hidden email]