From ff241c3ad75535b638f240b3ea8ded1fb6c29c6d Mon Sep 17 00:00:00 2001 From: Xuhui Lu Date: Sun, 20 Dec 2020 05:48:19 -0800 Subject: [PATCH] backend: import planner/core package to initialize expression.RewriteAstExpr (#526) --- lightning/backend/sql2kv.go | 3 +++ lightning/restore/restore.go | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lightning/backend/sql2kv.go b/lightning/backend/sql2kv.go index 846dcdaabcb84..19ef074b31f74 100644 --- a/lightning/backend/sql2kv.go +++ b/lightning/backend/sql2kv.go @@ -31,6 +31,9 @@ import ( "go.uber.org/zap" "go.uber.org/zap/zapcore" + // Import tidb/planner/core to initialize expression.RewriteAstExpr + _ "github.com/pingcap/tidb/planner/core" + "github.com/pingcap/tidb-lightning/lightning/common" "github.com/pingcap/tidb-lightning/lightning/log" "github.com/pingcap/tidb-lightning/lightning/metric" diff --git a/lightning/restore/restore.go b/lightning/restore/restore.go index 741c0575fe5b2..eee36045fb5e0 100644 --- a/lightning/restore/restore.go +++ b/lightning/restore/restore.go @@ -49,9 +49,6 @@ import ( verify "github.com/pingcap/tidb-lightning/lightning/verification" "github.com/pingcap/tidb-lightning/lightning/web" "github.com/pingcap/tidb-lightning/lightning/worker" - - // TODO: remove this after https://github.com/pingcap/tidb/issues/21342 is fixed. - _ "github.com/pingcap/tidb/planner/core" ) const (