thejasmn commented on a change in pull request #1443:
URL: https://github.com/apache/hive/pull/1443#discussion_r483153493



##########
File path: jdbc/src/java/org/apache/hive/jdbc/HiveConnection.java
##########
@@ -866,6 +874,13 @@ private void openSession() throws SQLException {
     try {
       TOpenSessionResp openResp = client.OpenSession(openReq);
 
+      // Override HS2 server HiveConf in Connection parameter HiveConf

Review comment:
       1.  The setting in client side should override the server settings. ie, 
server setting should be used if no such value is set in the client side
   2. Can we make this generic ? Ie, loop through all the server settings and 
set it in hiveConfs only if there is no value set currently ?
   

##########
File path: 
service/src/java/org/apache/hive/service/cli/thrift/ThriftCLIService.java
##########
@@ -326,10 +327,12 @@ public TOpenSessionResp OpenSession(TOpenSessionReq req) 
throws TException {
 
       final int fetchSize = 
hiveConf.getIntVar(HiveConf.ConfVars.HIVE_SERVER2_THRIFT_RESULTSET_DEFAULT_FETCH_SIZE);
 
+      Map<String, String> map = new HashMap<>();

Review comment:
       Can we add a test to verify we are getting the config value from server 
? Either in TestHiveDatabaseMetaData or a different test ?
   

##########
File path: jdbc/src/java/org/apache/hive/jdbc/HiveDatabaseMetaData.java
##########
@@ -1227,4 +1232,18 @@ private TGetInfoResp getServerInfo(TGetInfoType type) 
throws SQLException {
     Utils.verifySuccess(resp.getStatus());
     return resp;
   }
+
+  /**
+   * This returns Hive configuration for HIVE_DEFAULT_NULLS_LAST.
+   *
+   * @param hiveConfs
+   * @return
+   */
+  public static boolean getHiveDefaultNullsLast(Map<String, String> hiveConfs) 
{
+    boolean response = ConfVars.HIVE_DEFAULT_NULLS_LAST.defaultBoolVal;
+    if ((hiveConfs != null) && 
(hiveConfs.get(JdbcConnectionParams.HIVE_DEFAULT_NULLS_LAST_KEY) != null)) {

Review comment:
       This if statement should never return false. Something is wrong if it 
does, we should throw an error in that case (otherwise, we might run into some 
harder to debug issues).
   




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org
For additional commands, e-mail: gitbox-h...@hive.apache.org

Reply via email to