You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudberry.apache.org by av...@apache.org on 2024/12/27 11:17:40 UTC

(cloudberry) 01/13: Removed transforming of hasharray to hashstring (#14121)

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

avamingli pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudberry.git

commit 1157e367e51d96526c183e54212fc8d821d37bd1
Author: Rakesh Sharma <sh...@vmware.com>
AuthorDate: Mon Sep 19 12:03:51 2022 +0530

    Removed transforming of hasharray to hashstring (#14121)
    
    As the hashing of text array is fixed in PR https://github.com/greenplum-db/gpdb/pull/4940
    removing dependency to transform hasharray to hash string which is being done
    in function transformTextArrayCols()
---
 gpMgmt/bin/gpcheckcat | 23 -----------------------
 1 file changed, 23 deletions(-)

diff --git a/gpMgmt/bin/gpcheckcat b/gpMgmt/bin/gpcheckcat
index fcdaede138..5103cc746b 100755
--- a/gpMgmt/bin/gpcheckcat
+++ b/gpMgmt/bin/gpcheckcat
@@ -1489,26 +1489,6 @@ def missingEntryQuery(max_content, catname, pkey, castedPkey):
     return qry
 
 
-def transformTextArrayCols(catname, columns, colnames, coltypes):
-    # Distributing by hash(text[]) is potentially dangerous,
-    # so if the table has text[] column, then we need array_to_string
-    #
-    # We should fix the text[] hash expression issue, but
-    # for this script, this seems like a reasonable workaround.
-    #
-    # GPDB_12_MERGE_FIXME: was this fixed by the hashing changes
-    # in GPDB 6?
-
-    transformed = []
-    for i in range(len(columns)):
-        if coltypes[colnames[i]] == '_text':
-            transformed.append("array_to_string(" + columns[i] + ", ',') AS " + columns[i])
-        else:
-            transformed.append(columns[i])
-
-    return transformed
-
-
 # -------------------------------------------------------------------------------
 def checkInconsistentEntry():
     logger.info('-----------------------------------')
@@ -1562,9 +1542,6 @@ def checkTableInconsistentEntry(cat):
     castedPkey = [c + autoCast.get(coltypes[c], '') for c in castedPkey]
     castcols = [c + autoCast.get(coltypes[c], '') for c in columns]
 
-    # transform text[] cols for sure. See comments on transformTextArrayCols
-    castcols = transformTextArrayCols(catname, castcols, columns, cat.getTableColtypes())
-
     # pg_attribute.attmissingval has pseudo-type 'any', which doesn't allow
     # much operations on it. Cast it to text, by replacing it with
     # "attmissingval::text" in the columns list.


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: commits-help@cloudberry.apache.org