[ 
https://issues.apache.org/jira/browse/HIVE-25225?focusedWorklogId=609400&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-609400
 ]

ASF GitHub Bot logged work on HIVE-25225:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 09/Jun/21 21:28
            Start Date: 09/Jun/21 21:28
    Worklog Time Spent: 10m 
      Work Description: pvary commented on a change in pull request #2376:
URL: https://github.com/apache/hive/pull/2376#discussion_r648697220



##########
File path: 
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HMSHandler.java
##########
@@ -9037,8 +9061,16 @@ public boolean 
set_aggr_stats_for(SetPartitionsStatsRequest request) throws TExc
       } else { // No merge.
         Table t = getTable(catName, dbName, tableName);
         // We don't short-circuit on errors here anymore. That can leave acid 
stats invalid.
-        ret = updatePartitionColStatsInBatch(t, newStatsMap,
-                request.getValidWriteIdList(), request.getWriteId());
+        if (MetastoreConf.getBoolVar(getConf(), ConfVars.TRY_DIRECT_SQL)) {

Review comment:
       It is very strange to use the `ConfVars.TRY_DIRECT_SQL` configuration in 
client side.
   
   We could have used the same patterns like in `get_table_statistics_req`:
   - HMSHandler has only a single method to call on `getMS()`
   - ObjectStore could use some `GetHelper` implementation to decide on the 
actual implementation (directsql/datanucleus)
   - If we want to make sure that the size of the Thrift request is not too 
much we might have another configuration on client size like we do with 
`BATCH_RETRIEVE_MAX`




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


Issue Time Tracking
-------------------

    Worklog Id:     (was: 609400)
    Time Spent: 0.5h  (was: 20m)

> Update column stat throws NPE if direct sql is disabled
> -------------------------------------------------------
>
>                 Key: HIVE-25225
>                 URL: https://issues.apache.org/jira/browse/HIVE-25225
>             Project: Hive
>          Issue Type: Sub-task
>            Reporter: mahesh kumar behera
>            Assignee: mahesh kumar behera
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> In case direct sql is disabled, the MetaStoreDirectSql object is not 
> initialised and thats causing NPE. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to