zabetak commented on code in PR #6825:
URL: https://github.com/apache/hive/pull/6825#discussion_r4220543469


##########
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/dbinstall/rules/PostgresTPCDS.java:
##########
@@ -57,6 +70,12 @@ public void install() {
     String hiveSchemaVer = MetaStoreSchemaInfoFactory.get(new 
Configuration()).getHiveSchemaVersion();
     try (InputStream script = PostgresTPCDS.class.getClassLoader()
         .getResourceAsStream("sql/postgres/upgrade-3.1.3000-to-" + 
hiveSchemaVer + ".postgres.sql")) {
+      // The dump was created from a metastore where some columns had the 
wrong types.
+      // Fix those that some tests verify.
+      String fixColumnTypes =
+          "UPDATE \"COLUMNS_V2\" c SET \"TYPE_NAME\" = 'char(16)' WHERE 
\"COLUMN_NAME\" in ('c_customer_id', 'ca_address_id')" + "AND EXISTS (SELECT * 
FROM \"SDS\" s WHERE s.\"CD_ID\" = c.\"CD_ID\");\n";
+      InputStream script2 =
+          new SequenceInputStream(new 
ByteArrayInputStream(fixColumnTypes.getBytes(StandardCharsets.UTF_8)), script);

Review Comment:
   Personally, I use the git blame on both GitHub and IDE and its very 
convenient to see and go over previous versions by clicking on a specific line 
of a file. When a file is renamed this functionality does not work very well. 
Anyways this particular file does not have tons of history so I am fine with 
any direction you take.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to