You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by ab...@apache.org on 2022/10/17 09:55:00 UTC

[incubator-devlake] branch release-v0.14 updated: fix: starrocks cached plan must not change result type

This is an automated email from the ASF dual-hosted git repository.

abeizn pushed a commit to branch release-v0.14
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git


The following commit(s) were added to refs/heads/release-v0.14 by this push:
     new 59cd4839 fix: starrocks cached plan must not change result type
59cd4839 is described below

commit 59cd48396919b8dd73d4d0b91a6d4fd49e7dc283
Author: abeizn <zi...@merico.dev>
AuthorDate: Mon Oct 17 17:23:16 2022 +0800

    fix: starrocks cached plan must not change result type
---
 plugins/starrocks/tasks.go | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/plugins/starrocks/tasks.go b/plugins/starrocks/tasks.go
index 5bd68265..a7d38b4f 100644
--- a/plugins/starrocks/tasks.go
+++ b/plugins/starrocks/tasks.go
@@ -123,7 +123,15 @@ func createTable(starrocks *sql.DB, db dal.Dal, starrocksTable string, table str
 	columeMetas, err := db.GetColumns(&Table{name: table}, nil)
 	columnMap := make(map[string]string)
 	if err != nil {
-		return columnMap, err
+		if strings.Contains(err.Error(), "cached plan must not change result type") {
+			c.GetLogger().Warn(err, "skip err: cached plan must not change result type")
+			columeMetas, err = db.GetColumns(&Table{name: table}, nil)
+			if err != nil {
+				return nil, errors.Convert(err)
+			}
+		} else {
+			return nil, errors.Convert(err)
+		}
 	}
 	var pks []string
 	var columns []string