rtrivedi12 opened a new pull request, #6350:
URL: https://github.com/apache/hive/pull/6350
### What changes were proposed in this pull request?
org.apache.hadoop.hive.serde2.avro.AvroSerDe and
org.apache.hadoop.hive.hbase.HBaseSerDe are added to the default value of
MetastoreConf.ConfVars.SERDES_USING_METASTORE_FOR_SCHEMA.
### Why are the changes needed?
`HiveMetaStore.get_fields_with_environment_context() `checks whether a
table's SerDe is listed in `metastore.serdes.using.metastore.for.schema`. If it
is, columns are returned directly from tbl.getSd().getCols(). If not, HMS
delegates to StorageSchemaReader, whose default implementation
(DefaultStorageSchemaReader) unconditionally throws:
> MetaException: java.lang.UnsupportedOperationException: Storage schema
reading not supported
### Does this PR introduce _any_ user-facing change?
Yes. Previously, calling HMS.getFields() on a table using AvroSerDe or
HBaseSerDe would fail with MetaException: Storage schema reading not supported.
After this change, the call succeeds and returns the columns stored in the
metastore, consistent with the behavior for all other built-in SerDes
### How was this patch tested?
A new test testGetFieldsForStorageSerDes() is added to TestHiveMetaStore
```
mvn test -Dtest.groups= \
-Dtest="TestEmbeddedHiveMetaStore#testGetFieldsForStorageSerDes+TestRemoteHiveMetaStore#testGetFieldsForStorageSerDes"
\
-pl standalone-metastore/metastore-server
```
--
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]