zabetak commented on code in PR #6825:
URL: https://github.com/apache/hive/pull/6825#discussion_r4217002559
##########
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:
Yes the file is not used anywhere else. The rename will make the history
slightly more difficult to follow so I would just leave it as is. The proposed
name is better but I feel that the extra noise is not worth it.
--
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]