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

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

                Author: ASF GitHub Bot
            Created on: 11/Aug/21 03:30
            Start Date: 11/Aug/21 03:30
    Worklog Time Spent: 10m 
      Work Description: ramesh0201 commented on a change in pull request #2573:
URL: https://github.com/apache/hive/pull/2573#discussion_r686464751



##########
File path: 
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/DirectSqlUpdateStat.java
##########
@@ -647,6 +653,12 @@ public long getNextCSIdForMPartitionColumnStatistics(long 
numStats) throws MetaE
       jdoConn = pm.getDataStoreConnection();
       dbConn = (Connection) (jdoConn.getNativeConnection());
 
+      if (sqlGenerator.getDbProduct().isMYSQL()) {
+        try (Statement stmt = dbConn.createStatement()) {
+          stmt.execute("SET @@session.sql_mode=ANSI_QUOTES");
+        }
+      }
+

Review comment:
       Can we move the two code blocks to a function and invoke the function in 
the two places.




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


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

    Worklog Id:     (was: 636715)
    Time Spent: 20m  (was: 10m)

> Update partition column stats fails with invalid syntax error for MySql
> -----------------------------------------------------------------------
>
>                 Key: HIVE-25438
>                 URL: https://issues.apache.org/jira/browse/HIVE-25438
>             Project: Hive
>          Issue Type: Sub-task
>            Reporter: mahesh kumar behera
>            Assignee: mahesh kumar behera
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> The quotes are not supported by mysql if  ANSI_QUOTES is not set.



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

Reply via email to