Removed transforming of hasharray to hashstring
As the hashing of text array is fixed in PR
removing dependency to transform hasharray to hash string which is being done
in function transformTextArrayCols()
@@ -1481,26 +1481,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('-----------------------------------')
@@ -1546,9 +1526,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.
