rtrivedi12 commented on code in PR #6350:
URL: https://github.com/apache/hive/pull/6350#discussion_r2915939258
##########
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStore.java:
##########
@@ -3958,4 +3958,58 @@ public void testDropDataConnectorIfNotExistsTrue()
throws Exception {
// No such data connector, ignore NoSuchObjectException
client.dropDataConnector("no_such_data_connector", true, false);
}
+
+ /**
+ * Test for storage-based SerDes (AvroSerDe, HBaseSerDe).If the SerDe is not
listed in
+ * SERDES_USING_METASTORE_FOR_SCHEMA, HMS falls through to
DefaultStorageSchemaReader and throws
+ * "Storage schema reading not supported".
+ */
+ @Test
+ public void testGetFieldsForStorageSerDes() throws Exception {
Review Comment:
Thanks for the review @soumyakanti3578 !
I have separated the tests for AvroSerDe and HBaseSerDe.
For the AvroSerDe fix, I've modified and kept it out of
`SERDES_USING_METASTORE_FOR_SCHEMA` and handled it at the `HMSHandler` level
instead. Adding AvroSerDe to that config list has two correctness problems:
**Breaks schema evolution in HiveServer2** -`Table.getColsInternal()` uses
`hasMetastoreBasedSchema`() which checks SERDES_USING_METASTORE_FOR_SCHEMA. If
AvroSerDe is in the list, it short-circuits directly to SD columns for all Avro
tables . This would cause HS2 to silently serve stale schema.
**Permanently blocks ALTER TABLE <avro_tbl> UPDATE COLUMNS**
-`AlterTableUpdateColumnsOperation` throws UnsupportedOperationException for
any SerDe in SERDES_USING_METASTORE_FOR_SCHEMA. This would prevent users from
ever syncing an Avro table's SD columns from the live SerDe schema.
--
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]