dengzhhu653 commented on code in PR #4872:
URL: https://github.com/apache/hive/pull/4872#discussion_r1418247666
##########
standalone-metastore/metastore-server/src/main/sql/derby/upgrade-4.0.0-alpha-2-to-4.0.0-beta-1.derby.sql:
##########
@@ -31,18 +31,19 @@ ALTER TABLE "APP"."METASTORE_DB_PROPERTIES" ADD
PROPERTYCONTENT BLOB;
-- HIVE-27457
UPDATE "SDS"
- SET "SDS"."INPUT_FORMAT" = 'org.apache.hadoop.hive.kudu.KuduInputFormat',
- "SDS"."OUTPUT_FORMAT" = 'org.apache.hadoop.hive.kudu.KuduOutputFormat'
- WHERE "SDS"."SD_ID" IN (
- SELECT "TBL_ID" FROM "TABLE_PARAMS" WHERE "PARAM_VALUE" LIKE
'%KuduStorageHandler%'
- );
+ SET "INPUT_FORMAT" = 'org.apache.hadoop.hive.kudu.KuduInputFormat',
"OUTPUT_FORMAT" = 'org.apache.hadoop.hive.kudu.KuduOutputFormat'
+ WHERE "SD_ID" IN (
+ SELECT "TBLS"."SD_ID" FROM "TBLS"
+ INNER JOIN "TABLE_PARAMS" ON "TBLS"."TBL_ID" =
"TABLE_PARAMS"."TBL_ID"
+ WHERE "TABLE_PARAMS"."PARAM_VALUE" LIKE '%KuduStorageHandler%'
+ );
UPDATE "SERDES"
SET "SERDES"."SLIB" = 'org.apache.hadoop.hive.kudu.KuduSerDe'
WHERE "SERDE_ID" IN (
SELECT "SDS"."SERDE_ID"
FROM "TBLS"
- LEFT JOIN "SDS" ON "TBLS"."SD_ID" = "SDS"."SD_ID"
- WHERE "TBL_ID" IN (SELECT "TBL_ID" FROM "TABLE_PARAMS" WHERE
"PARAM_VALUE" LIKE '%KuduStorageHandler%')
+ INNER JOIN "SDS" ON "TBLS"."SD_ID" = "SDS"."SD_ID"
+ WHERE "TBLS"."TBL_ID" IN (SELECT "TBL_ID" FROM "TABLE_PARAMS"
WHERE "PARAM_VALUE" LIKE '%KuduStorageHandler%')
Review Comment:
In UPDATE "SERDES", we cares about the records that "SERDES"."SERDE_ID" =
"SDS"."SERDE_ID" and the table is a Kudu table, the latter feels like more like
a filter, I would like to keep it as a filter to make it straightforward.
--
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]