You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2021/09/03 14:52:14 UTC

[GitHub] [iceberg] owencwl opened a new issue #3068: I use the flinksource with filter conditions to read the iceberg table, which is unfiltered

owencwl opened a new issue #3068:
URL: https://github.com/apache/iceberg/issues/3068


     Why is the filter condition not effective??????and print out all the data in the table.
   I use hivecatalog and the file format is parquet.
   Example code:
   
   
   public static void main(String[] args) throws IOException {
       String lakeSpaceName = "default";
       String lakeTableName = "t";
   
       TableIdentifier tableIdent = TableIdentifier.of(lakeSpaceName, lakeTableName);
       CatalogLoader hiveloader = CatalogLoader.hive(lakeSpaceName, hiveConf, Maps.newHashMap());
       TableLoader tableLoader = TableLoader.fromCatalog(hiveloader, tableIdent);
       List<RowData> results =  readRowData(FlinkSource.forRowData().tableLoader(tableLoader)
           .filters(Collections.singletonList(Expressions.equal("dt", "2020-03-29"))).buildFormat(),null);
       results.forEach(System.out::println);
     }
   
     public static List<RowData> readRowData(FlinkInputFormat inputFormat, RowType rowType)
         throws IOException {
       FlinkInputSplit[] splits = inputFormat.createInputSplits(0);
       List<RowData> results = Lists.newArrayList();
       for (FlinkInputSplit s : splits) {
         inputFormat.open(s);
         while (!inputFormat.reachedEnd()) {
           RowData row = inputFormat.nextRecord(null);
           results.add(row);
         }
       }
       inputFormat.close();
   
       return results;
     }


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] owencwl commented on issue #3068: I use the flinksource with filter conditions to read the iceberg table, which is unfiltered

Posted by GitBox <gi...@apache.org>.
owencwl commented on issue #3068:
URL: https://github.com/apache/iceberg/issues/3068#issuecomment-912605016


   @jackye1995 @rdblue @huaxingao @flyrain @andersonm @shangxinli @kbendick @RussellSpitzer @aokolnychyi


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org