You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
warnErr:=errors.New("Scalar function '"+scalarFunc.FuncName.L+"'(signature: "+scalarFunc.Function.PbCode().String() +", return type: "+scalarFunc.RetType.CompactStr() +") is not supported to push down to "+storageName+" now.")
1361
1366
ifpc.sc.InExplainStmt {
1362
-
storageName:=storeType.Name()
1363
-
ifstoreType==kv.UnSpecified {
1364
-
storageName="storage layer"
1365
-
}
1366
-
pc.sc.AppendWarning(errors.New("Scalar function '"+scalarFunc.FuncName.L+"'(signature: "+scalarFunc.Function.PbCode().String() +", return type: "+scalarFunc.RetType.CompactStr() +") is not supported to push down to "+storageName+" now."))
1367
+
pc.sc.AppendWarning(warnErr)
1368
+
} else {
1369
+
pc.sc.AppendExtraWarning(warnErr)
1367
1370
}
1368
1371
returnfalse
1369
1372
}
@@ -1393,14 +1396,20 @@ func canExprPushDown(expr Expression, pc PbConverter, storeType kv.StoreType, ca
warnErr:=errors.New("Expression about '"+expr.String() +"' can not be pushed to TiFlash because it contains unsupported calculation of type '"+types.TypeStr(expr.GetType().GetType()) +"'.")
1396
1400
ifpc.sc.InExplainStmt {
1397
-
pc.sc.AppendWarning(errors.New("Expression about '"+expr.String() +"' can not be pushed to TiFlash because it contains unsupported calculation of type '"+types.TypeStr(expr.GetType().GetType()) +"'."))
1401
+
pc.sc.AppendWarning(warnErr)
1402
+
} else {
1403
+
pc.sc.AppendExtraWarning(warnErr)
1398
1404
}
1399
1405
returnfalse
1400
1406
casemysql.TypeNewDecimal:
1401
1407
if!expr.GetType().IsDecimalValid() {
1408
+
warnErr:=errors.New("Expression about '"+expr.String() +"' can not be pushed to TiFlash because it contains invalid decimal('"+strconv.Itoa(expr.GetType().GetFlen()) +"','"+strconv.Itoa(expr.GetType().GetDecimal()) +"').")
1402
1409
ifpc.sc.InExplainStmt {
1403
-
pc.sc.AppendWarning(errors.New("Expression about '"+expr.String() +"' can not be pushed to TiFlash because it contains invalid decimal('"+strconv.Itoa(expr.GetType().GetFlen()) +"','"+strconv.Itoa(expr.GetType().GetDecimal()) +"')."))
re:=tk.MustQuery("select * from information_schema.slow_query")
538
-
re.Check(testkit.RowsWithSep("|", "2019-02-12 19:33:56.571953|406315658548871171|root|localhost|6|57|0.12|4.895492|0.4|0.2|0.000000003|2|0.000000002|0.00000001|0.000000003|0.19|0.21|0.01|0|0.18|[txnLock]|0.03|0|15|480|1|8|0.3824278|0.161|0.101|0.092|1.71|1|100001|100000|100|10|10|10|100|test||0|42a1c8aae6f133e934d4bf0147491709a8812ea05ff8819ec522780fe657b772|t1:1,t2:2|0.1|0.2|0.03|127.0.0.1:20160|0.05|0.6|0.8|0.0.0.0:20160|70724|65536|0|0|0|0|10||0|1|0|0|1|0|0|abcd|60e9378c746d9a2be1c791047e008967cf252eb6de9167ad3aa6098fa2d523f4||update t set i = 2;|select * from t_slim;",
539
-
"2021-09-08|14:39:54.506967|427578666238083075|root|172.16.0.0|40507|0|0|25.571605962|0.002923536|0.006800973|0.002100764|0|0|0|0.000015801|25.542014572|0|0.002294647|0.000605473|12.483|[tikvRPC regionMiss tikvRPC regionMiss regionMiss]|0|0|624|172064|60|0|0|0|0|0|0|0|0|0|0|0|0|0|0|rtdb||0|124acb3a0bec903176baca5f9da00b4e7512a41c93b417923f26502edeb324cc||0|0|0||0|0|0||856544|0|86.635049185|0.015486658|100.054|0|0||0|1|0|0|0|0|0|||||INSERT INTO ...;",
540
-
))
687
+
re.Check(expectedRes)
688
+
541
689
tk.MustExec("set time_zone = '+00:00';")
542
690
re=tk.MustQuery("select * from information_schema.slow_query")
543
-
re.Check(testkit.RowsWithSep("|", "2019-02-12 11:33:56.571953|406315658548871171|root|localhost|6|57|0.12|4.895492|0.4|0.2|0.000000003|2|0.000000002|0.00000001|0.000000003|0.19|0.21|0.01|0|0.18|[txnLock]|0.03|0|15|480|1|8|0.3824278|0.161|0.101|0.092|1.71|1|100001|100000|100|10|10|10|100|test||0|42a1c8aae6f133e934d4bf0147491709a8812ea05ff8819ec522780fe657b772|t1:1,t2:2|0.1|0.2|0.03|127.0.0.1:20160|0.05|0.6|0.8|0.0.0.0:20160|70724|65536|0|0|0|0|10||0|1|0|0|1|0|0|abcd|60e9378c746d9a2be1c791047e008967cf252eb6de9167ad3aa6098fa2d523f4||update t set i = 2;|select * from t_slim;",
544
-
"2021-09-08|06:39:54.506967|427578666238083075|root|172.16.0.0|40507|0|0|25.571605962|0.002923536|0.006800973|0.002100764|0|0|0|0.000015801|25.542014572|0|0.002294647|0.000605473|12.483|[tikvRPC regionMiss tikvRPC regionMiss regionMiss]|0|0|624|172064|60|0|0|0|0|0|0|0|0|0|0|0|0|0|0|rtdb||0|124acb3a0bec903176baca5f9da00b4e7512a41c93b417923f26502edeb324cc||0|0|0||0|0|0||856544|0|86.635049185|0.015486658|100.054|0|0||0|1|0|0|0|0|0|||||INSERT INTO ...;",
Copy file name to clipboardExpand all lines: planner/core/exhaust_physical_plans.go
+4-1Lines changed: 4 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -2730,8 +2730,11 @@ func (la *LogicalAggregation) checkCanPushDownToMPP() bool {
2730
2730
}
2731
2731
}
2732
2732
ifhasUnsupportedDistinct {
2733
+
warnErr:=errors.New("Aggregation can not be pushed to storage layer in mpp mode because it contains agg function with distinct")
2733
2734
ifla.ctx.GetSessionVars().StmtCtx.InExplainStmt {
2734
-
la.ctx.GetSessionVars().StmtCtx.AppendWarning(errors.New("Aggregation can not be pushed to storage layer in mpp mode because it contains agg function with distinct"))
0 commit comments