quintoandar / hive-metastore-client

A client for connecting and running DDLs on hive metastore.
Apache License 2.0
52 stars 15 forks source link

[DAE-126] Handle exception when table has no partitions #55

Closed LucasMMota closed 3 years ago

LucasMMota commented 3 years ago

Why? :open_book:

When using the method get_partition_values_from_table with non-partitioned tables we get an exception:

thrift.transport.TTransport.TTransportException: TSocket read 0 bytes

We decided to handle this as an empty return, once the table does not have partitions.

What? :wrench:

modify method get_partition_values_from_table handle to handle the Exception

Type of change :file_cabinet:

How everything was tested? :straight_ruler:

Unit + testing with Hive Metastore Server

Checklist :memo:

Attention Points :warning:

Replace me for what the reviewer will need to pay attention to in the PR or just to cover any concerns after the merge.

sonarcloud[bot] commented 3 years ago

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication