zabetak commented on code in PR #3364:
URL: https://github.com/apache/hive/pull/3364#discussion_r896711505
##########
ql/src/test/queries/clientnegative/jdbc_table_create_with_wrong_password.q:
##########
@@ -0,0 +1,12 @@
+--! qt:database:mariadb:q_test_country_table_with_schema.mariadb.sql
+
+-- Create jdbc table with wrong password(hive.sql.dbcp.password)
+CREATE EXTERNAL TABLE country_test1 (id int, name varchar(20))
Review Comment:
Would it be possible to write unit tests using derby which are more
lightweight than those starting up docker containers?
##########
jdbc-handler/src/main/java/org/apache/hive/storage/jdbc/JdbcSerDe.java:
##########
@@ -131,7 +131,8 @@ public void initialize(Configuration configuration,
Properties tableProperties,
row = new ArrayList<>(hiveColumnNames.length);
}
} catch (Exception e) {
- throw new SerDeException("Caught exception while initializing the
SqlSerDe", e);
+ log.error("Caught exception while initializing the SqlSerDe", e);
+ throw new SerDeException(e);
Review Comment:
Log and rethrow is usually an anti pattern and most of the time it will lead
into reporting the same problem multiple times.
Also it is usually a good thing to wrap and rethrow an exception with a
message appropriate for the current abstraction.
I am not sure that the code here is responsible for "losing" the real
exception. Have you checked higher or lower in the call hierarchy to see if
there is something wrong going on there?
--
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]