You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by wa...@apache.org on 2022/10/13 07:42:13 UTC

[incubator-devlake] branch main updated: fix: starrocks plugin sync pg enum data type

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

warren pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git


The following commit(s) were added to refs/heads/main by this push:
     new dd4df15d fix: starrocks plugin sync pg enum data type
dd4df15d is described below

commit dd4df15d40186c9915427c459b498865101d6e92
Author: long2ice <lo...@gmail.com>
AuthorDate: Thu Oct 13 15:25:52 2022 +0800

    fix: starrocks plugin sync pg enum data type
---
 plugins/starrocks/utils.go | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/plugins/starrocks/utils.go b/plugins/starrocks/utils.go
index 0aa1ce5b..9588b9fe 100644
--- a/plugins/starrocks/utils.go
+++ b/plugins/starrocks/utils.go
@@ -88,10 +88,8 @@ func stringIn(s string, l ...string) bool {
 	return false
 }
 func getDataType(dataType string) string {
-	starrocksDatatype := dataType
-	if hasPrefixes(dataType, "varchar", "varying", "character", "bytea") {
-		starrocksDatatype = "string"
-	} else if hasPrefixes(dataType, "datetime", "timestamp") {
+	starrocksDatatype := "string"
+	if hasPrefixes(dataType, "datetime", "timestamp") {
 		starrocksDatatype = "datetime"
 	} else if strings.HasPrefix(dataType, "bigint") {
 		starrocksDatatype = "bigint"