morningman commented on code in PR #34422: URL: https://github.com/apache/doris/pull/34422#discussion_r1602803384
########## fe/fe-core/src/main/java/org/apache/doris/datasource/trinoconnector/source/TrinoConnectorScanNode.java: ########## @@ -102,11 +113,31 @@ protected void doInitialize() throws UserException { table.getName())); } - source = new TrinoConnectorSource(desc, table); - computeColumnsFilter(); initBackendPolicy(); + source = new TrinoConnectorSource(desc, table); initSchemaParams(); + convertPredicate(); + } + + protected void convertPredicate() throws UserException { + if (conjuncts.isEmpty()) { + constraint = Constraint.alwaysTrue(); + } + TupleDomain<ColumnHandle> summary = TupleDomain.all(); + TrinoConnectorPredicateConverter trinoConnectorPredicateConverter = new TrinoConnectorPredicateConverter( + source.getTargetTable().getColumnHandleMap(), + source.getTargetTable().getColumnMetadataMap()); + try { + for (int i = 0; i < conjuncts.size(); ++i) { + summary = summary.intersect( + trinoConnectorPredicateConverter.convertExprToTrinoTupleDomain(conjuncts.get(i))); + } + } catch (AnalysisException e) { + LOG.warn("Can not convert Expr to trino tuple domain, exception: {}", e.getMessage()); Review Comment: ```suggestion LOG.debug("Can not convert Expr to trino tuple domain, exception: {}", e.getMessage()); ``` -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org