seawinde commented on code in PR #34753:
URL: https://github.com/apache/doris/pull/34753#discussion_r1600851198
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/mv/LogicalCompatibilityContext.java:
##########
@@ -92,31 +92,28 @@ public BiMap<Integer, Integer>
getQueryToViewNodeIDMapping() {
return queryToViewNodeIDMapping;
}
- /**
- * Get all expression mapping in query to view
- */
- @Deprecated
- public BiMap<Expression, Expression> getQueryToViewAllExpressionMapping() {
- if (queryToViewAllExpressionMapping != null) {
- return queryToViewAllExpressionMapping;
- }
- queryToViewAllExpressionMapping = HashBiMap.create();
-
queryToViewAllExpressionMapping.putAll(getQueryToViewJoinEdgeExpressionMapping());
-
queryToViewAllExpressionMapping.putAll(getQueryToViewNodeExpressionMapping());
-
queryToViewAllExpressionMapping.putAll(getQueryToViewFilterEdgeExpressionMapping());
- return queryToViewAllExpressionMapping;
+ public Expression getQueryJoinExprFromView(Expression viewJoinExpr) {
+ return
queryToViewJoinEdgeExpressionMappingSupplier.get().inverse().get(viewJoinExpr);
+ }
+
+ public Expression getViewJoinExprFromQuery(Expression queryJoinExpr) {
+ return
queryToViewJoinEdgeExpressionMappingSupplier.get().get(queryJoinExpr);
+ }
+
+ public Expression getQueryFilterExprFromView(Expression viewJoinExpr) {
+ return
queryToViewFilterEdgeExpressionMappingSupplier.get().inverse().get(viewJoinExpr);
Review Comment:
the same as above
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]