morrySnow commented on code in PR #13928:
URL: https://github.com/apache/doris/pull/13928#discussion_r1018634384
##########
fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/logical/PushdownExpressionsInHashConditionTest.java:
##########
@@ -81,15 +80,10 @@ public void testGeneratePhysicalPlan() {
"SELECT * FROM T1 JOIN (SELECT ID, SUM(SCORE) SCORE FROM T2
GROUP BY ID ORDER BY ID) T ON T1.ID + 1 = T.ID AND T.SCORE < 10"
);
testSql.forEach(sql -> {
- try {
- PhysicalPlan plan = new
NereidsPlanner(createStatementCtx(sql)).plan(
- new NereidsParser().parseSingle(sql),
- PhysicalProperties.ANY
- );
- System.out.println(plan.treeString());
- } catch (AnalysisException e) {
- throw new RuntimeException(e);
- }
+ StatementContext context = createStatementCtx(sql);
+ System.out.printf("run sql: %s\n", sql);
Review Comment:
DO NOT use SYSTEM OUT in code~
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/jobs/cascades/CostAndEnforcerJob.java:
##########
@@ -102,6 +111,28 @@ public CostAndEnforcerJob(GroupExpression groupExpression,
JobContext context) {
public void execute() {
// Do init logic of root plan/groupExpr of `subplan`, only run once
per task.
if (curChildIndex == -1) {
+ // use cache.
+ if (cache.containsKey(groupExpression)) {
+ if
(ConnectContext.get().getSessionVariable().isEnableNereidsTrace()) {
+ System.out.printf("cache get %s\n -> %s\n",
groupExpression, cache.get(groupExpression));
Review Comment:
plz use log instead of print to system out
--
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]