Github user bhavya411 commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/2139#discussion_r179913270
  
    --- Diff: 
integration/presto/src/main/java/org/apache/carbondata/presto/impl/CarbonTableReader.java
 ---
    @@ -415,14 +440,56 @@ public TBase create() {
         return result;
       }
     
    +  /** Returns list of partition specs to query based on the domain 
constraints
    +   * @param constraints
    +   * @param carbonTable
    +   * @throws IOException
    +   */
    +  private List<PartitionSpec> 
findRequiredPartitions(TupleDomain<ColumnHandle> constraints, CarbonTable 
carbonTable,
    +      LoadMetadataDetails[]loadMetadataDetails)  {
    +    Set<PartitionSpec> partitionSpecs = new HashSet<>();
    +    List<PartitionSpec> prunePartitions = new ArrayList();
    +
    +    for (LoadMetadataDetails loadMetadataDetail : loadMetadataDetails) {
    +      SegmentFileStore segmentFileStore = null;
    +      try {
    +        segmentFileStore =
    +            new SegmentFileStore(carbonTable.getTablePath(), 
loadMetadataDetail.getSegmentFile());
    +        partitionSpecs.addAll(segmentFileStore.getPartitionSpecs());
    +
    +      } catch (IOException e) {
    +        e.printStackTrace();
    --- End diff --
    
    Please do not use e.printstacktrace, log the exception and then handle it 
appropriately


---

Reply via email to