Pankit Thapar created HIVE-7251:
-----------------------------------
Summary: Fix StorageDescriptor usage in unit tests
Key: HIVE-7251
URL: https://issues.apache.org/jira/browse/HIVE-7251
Project: Hive
Issue Type: Bug
Components: Tests
Affects Versions: 0.13.1
Reporter: Pankit Thapar
Priority: Minor
Current Approach :
StorageDescriptor class is used to describe parameters like InputFormat,
Outputformat, SerDeInfo, etc. for a hive table.
Some of the class variables like InputFormat, OutputFormat,
SerDeInfo.serializationLib, etc. are required fields when
creating a storage descriptor object.
For example : createTable command in the metaStoreClient creates the table with
the default values of such variables defined in HiveConf or hive-default.xml
But in unit tests, table is created in a slightly different way, that these
values need to be set explicitly.
Thus, when creating tables in tests, required fieldes of StorageDescriptor
object need to be set.
Issue with current approach :
>From some of the current usages of this class in unit tests, I noticed that
when any one of the test cases tried to clean up the database and found a table
created by any of the previously executed test cases,
the clean up process tries to fetch the Table object and performs the sanity
checks which include checking for required fields like InputFormat,
OutputFormat, SerDeInfo.serializationLib
of the table. The sanity checks fail which results in failure of the test case.
Fix :
In unit-tests, StorageDescriptor object should be created with the Fields that
are sanity checked when trying to fetch the table.
NOTE : This fix fixes 6 test cases in itests/hive-unit/
--
This message was sent by Atlassian JIRA
(v6.2#6252)