[jira] [Work logged] (HIVE-25907) IOW Directory queries fails to write data to final path when query result cache is enabled

2022-03-15 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on HIVE-25907:
-

Author: ASF GitHub Bot
Created on: 16/Mar/22 04:34
Start Date: 16/Mar/22 04:34
Worklog Time Spent: 10m 
  Work Description: shameersss1 commented on pull request #2978:
URL: https://github.com/apache/hive/pull/2978#issuecomment-1068722479


   @kgyrtkirk @rbalamohan Could you please review the changes?


-- 
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: gitbox-unsubscr...@hive.apache.org

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


Issue Time Tracking
---

Worklog Id: (was: 742021)
Time Spent: 1.5h  (was: 1h 20m)

> IOW Directory queries fails to write data to final path when query result 
> cache is enabled
> --
>
> Key: HIVE-25907
> URL: https://issues.apache.org/jira/browse/HIVE-25907
> Project: Hive
>  Issue Type: Bug
>  Components: Hive
>Affects Versions: 4.0.0
>Reporter: Syed Shameerur Rahman
>Assignee: Syed Shameerur Rahman
>Priority: Major
>  Labels: pull-request-available
> Fix For: 4.0.0
>
>  Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> INSERT OVERWRITE DIRECTORY queries fails to write the data to the specified 
> directory location when query result cache is enabled.
> *Steps to reproduce*
> {code:java}
> 1. create a data file with the following data
> 1 abc 10.5
> 2 def 11.5
> 2. create table pointing to that data
> create external table iowd(strct struct)
> row format delimited
> fields terminated by '\t'
> collection items terminated by ' '
> location '';
> 3. run the following query
> set hive.query.results.cache.enabled=true;
> INSERT OVERWRITE DIRECTORY "" SELECT * FROM iowd;
> {code}
> After execution of the above query, It is expected that the destination 
> directory contains data from the table iowd, But due to HIVE-21386 it is not 
> happening anymore.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Work logged] (HIVE-25907) IOW Directory queries fails to write data to final path when query result cache is enabled

2022-03-15 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on HIVE-25907:
-

Author: ASF GitHub Bot
Created on: 16/Mar/22 04:33
Start Date: 16/Mar/22 04:33
Worklog Time Spent: 10m 
  Work Description: shameersss1 removed a comment on pull request #2978:
URL: https://github.com/apache/hive/pull/2978#issuecomment-1047410298






-- 
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: gitbox-unsubscr...@hive.apache.org

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


Issue Time Tracking
---

Worklog Id: (was: 742020)
Time Spent: 1h 20m  (was: 1h 10m)

> IOW Directory queries fails to write data to final path when query result 
> cache is enabled
> --
>
> Key: HIVE-25907
> URL: https://issues.apache.org/jira/browse/HIVE-25907
> Project: Hive
>  Issue Type: Bug
>  Components: Hive
>Affects Versions: 4.0.0
>Reporter: Syed Shameerur Rahman
>Assignee: Syed Shameerur Rahman
>Priority: Major
>  Labels: pull-request-available
> Fix For: 4.0.0
>
>  Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> INSERT OVERWRITE DIRECTORY queries fails to write the data to the specified 
> directory location when query result cache is enabled.
> *Steps to reproduce*
> {code:java}
> 1. create a data file with the following data
> 1 abc 10.5
> 2 def 11.5
> 2. create table pointing to that data
> create external table iowd(strct struct)
> row format delimited
> fields terminated by '\t'
> collection items terminated by ' '
> location '';
> 3. run the following query
> set hive.query.results.cache.enabled=true;
> INSERT OVERWRITE DIRECTORY "" SELECT * FROM iowd;
> {code}
> After execution of the above query, It is expected that the destination 
> directory contains data from the table iowd, But due to HIVE-21386 it is not 
> happening anymore.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Work logged] (HIVE-21456) Hive Metastore HTTP Thrift

2022-03-15 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on HIVE-21456:
-

Author: ASF GitHub Bot
Created on: 16/Mar/22 01:03
Start Date: 16/Mar/22 01:03
Worklog Time Spent: 10m 
  Work Description: yongzhi commented on a change in pull request #3105:
URL: https://github.com/apache/hive/pull/3105#discussion_r827532603



##
File path: 
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/utils/SecurityUtils.java
##
@@ -271,6 +286,31 @@ public static TTransport getSSLSocket(String host, int 
port, int loginTimeout,
 return getSSLSocketWithHttps(tSSLSocket);
   }
 
+  public static THttpClient getHttpSSLSocket(String httpsUrl, String 
trustStorePath,
+  String trustStorePasswd, String trustStoreAlgorithm, String 
trustStoreType)

Review comment:
   I did not find http server related code, for example, the server ssl  
socket that can handle http request. Will the servlet handle that?

##
File path: itests/hive-unit/src/main/java/org/hadoop/hive/jdbc/SSLTestUtils.java
##
@@ -67,6 +67,12 @@ public static void setMetastoreSslConf(HiveConf conf) {
 KEY_STORE_TRUST_STORE_PASSWORD);
   }
 
+  public static void setMetastoreHttpsConf(HiveConf conf) {
+setMetastoreSslConf(conf);
+MetastoreConf.setVar(conf, MetastoreConf.ConfVars.TRANSPORT_MODE, "http");

Review comment:
   Should it be THRIFT_TRANSPORT_MODE?

##
File path: 
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
##
@@ -591,6 +592,31 @@ public void renamePartition(String catName, String dbname, 
String tableName, Lis
 client.rename_partition_req(req);
   }
 
+  /**
+   * The config parameter can be like "path", "/path", "/path/", "path/*", 
"/path1/path2/*" and so on.
+   * httpPath should end up as "/*", "/path/*" or "/path1/../pathN/*"
+   * @param httpPath
+   * @return
+   */
+  private String getHttpPath(String httpPath) {

Review comment:
   It is duplicated and has no use, should be removed?




-- 
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: gitbox-unsubscr...@hive.apache.org

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


Issue Time Tracking
---

Worklog Id: (was: 741972)
Time Spent: 1h 10m  (was: 1h)

> Hive Metastore HTTP Thrift
> --
>
> Key: HIVE-21456
> URL: https://issues.apache.org/jira/browse/HIVE-21456
> Project: Hive
>  Issue Type: New Feature
>  Components: Metastore, Standalone Metastore
>Reporter: Amit Khanna
>Assignee: Sourabh Goyal
>Priority: Major
>  Labels: pull-request-available
> Attachments: HIVE-21456.2.patch, HIVE-21456.3.patch, 
> HIVE-21456.4.patch, HIVE-21456.patch
>
>  Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> Hive Metastore currently doesn't have support for HTTP transport because of 
> which it is not possible to access it via Knox. Adding support for Thrift 
> over HTTP transport will allow the clients to access via Knox



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Work logged] (HIVE-25963) Temporary table creation with not null constraint gets converted to external table

2022-03-15 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on HIVE-25963:
-

Author: ASF GitHub Bot
Created on: 15/Mar/22 23:06
Start Date: 15/Mar/22 23:06
Worklog Time Spent: 10m 
  Work Description: sourabh912 closed pull request #3106:
URL: https://github.com/apache/hive/pull/3106


   


-- 
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: gitbox-unsubscr...@hive.apache.org

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


Issue Time Tracking
---

Worklog Id: (was: 741940)
Time Spent: 2h 40m  (was: 2.5h)

> Temporary table creation with not null constraint gets converted to external 
> table 
> ---
>
> Key: HIVE-25963
> URL: https://issues.apache.org/jira/browse/HIVE-25963
> Project: Hive
>  Issue Type: Bug
>  Components: HiveServer2, Standalone Metastore
>Reporter: Sourabh Goyal
>Assignee: Sourabh Goyal
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 2h 40m
>  Remaining Estimate: 0h
>
> When creating a temporary table with not null, constraint it gets covered to 
> external table. For example: 
> create temporary table t2 (a int not null);
> table t2' metadata looks like: 
> {code:java}
> +---+++
> |   col_name| data_type   
>|  comment   |
> +---+++
> | a | int 
>||
> |   | NULL
>| NULL   |
> | # Detailed Table Information  | NULL
>| NULL   |
> | Database: | default 
>| NULL   |
> | OwnerType:| USER
>| NULL   |
> | Owner:| sourabh 
>| NULL   |
> | CreateTime:   | Tue Feb 15 15:20:13 PST 2022
>| NULL   |
> | LastAccessTime:   | UNKNOWN 
>| NULL   |
> | Retention:| 0   
>| NULL   |
> | Location: | 
> hdfs://localhost:9000/tmp/hive/sourabh/80d374a8-cd7a-4fcf-ae72-51b04ff9c3d8/_tmp_space.db/4574446d-c144-48f9-b4b6-2e9ee0ce5be4
>  | NULL   |
> | Table Type:   | EXTERNAL_TABLE  
>| NULL   |
> | Table Parameters: | NULL
>| NULL   |
> |   | COLUMN_STATS_ACCURATE   
>| {\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"a\":\"true\"}} |
> |   | EXTERNAL
>| TRUE   |
> |   | TRANSLATED_TO_EXTERNAL  
>| TRUE   |
> |   | bucketing_version   
>| 2  |
> |   | external.table.purge
>| TRUE   |
> |   | numFiles
>| 0  |
> |   | numRows 
>| 0

[jira] [Work logged] (HIVE-25963) Temporary table creation with not null constraint gets converted to external table

2022-03-15 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on HIVE-25963:
-

Author: ASF GitHub Bot
Created on: 15/Mar/22 23:06
Start Date: 15/Mar/22 23:06
Worklog Time Spent: 10m 
  Work Description: sourabh912 commented on pull request #3106:
URL: https://github.com/apache/hive/pull/3106#issuecomment-1068548698


   Thank you for approving and merging the PR, @nrg4878 


-- 
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: gitbox-unsubscr...@hive.apache.org

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


Issue Time Tracking
---

Worklog Id: (was: 741939)
Time Spent: 2.5h  (was: 2h 20m)

> Temporary table creation with not null constraint gets converted to external 
> table 
> ---
>
> Key: HIVE-25963
> URL: https://issues.apache.org/jira/browse/HIVE-25963
> Project: Hive
>  Issue Type: Bug
>  Components: HiveServer2, Standalone Metastore
>Reporter: Sourabh Goyal
>Assignee: Sourabh Goyal
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 2.5h
>  Remaining Estimate: 0h
>
> When creating a temporary table with not null, constraint it gets covered to 
> external table. For example: 
> create temporary table t2 (a int not null);
> table t2' metadata looks like: 
> {code:java}
> +---+++
> |   col_name| data_type   
>|  comment   |
> +---+++
> | a | int 
>||
> |   | NULL
>| NULL   |
> | # Detailed Table Information  | NULL
>| NULL   |
> | Database: | default 
>| NULL   |
> | OwnerType:| USER
>| NULL   |
> | Owner:| sourabh 
>| NULL   |
> | CreateTime:   | Tue Feb 15 15:20:13 PST 2022
>| NULL   |
> | LastAccessTime:   | UNKNOWN 
>| NULL   |
> | Retention:| 0   
>| NULL   |
> | Location: | 
> hdfs://localhost:9000/tmp/hive/sourabh/80d374a8-cd7a-4fcf-ae72-51b04ff9c3d8/_tmp_space.db/4574446d-c144-48f9-b4b6-2e9ee0ce5be4
>  | NULL   |
> | Table Type:   | EXTERNAL_TABLE  
>| NULL   |
> | Table Parameters: | NULL
>| NULL   |
> |   | COLUMN_STATS_ACCURATE   
>| {\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"a\":\"true\"}} |
> |   | EXTERNAL
>| TRUE   |
> |   | TRANSLATED_TO_EXTERNAL  
>| TRUE   |
> |   | bucketing_version   
>| 2  |
> |   | external.table.purge
>| TRUE   |
> |   | numFiles
>| 0  |
> |   | 

[jira] [Work logged] (HIVE-25963) Temporary table creation with not null constraint gets converted to external table

2022-03-15 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on HIVE-25963:
-

Author: ASF GitHub Bot
Created on: 15/Mar/22 22:41
Start Date: 15/Mar/22 22:41
Worklog Time Spent: 10m 
  Work Description: nrg4878 commented on pull request #3106:
URL: https://github.com/apache/hive/pull/3106#issuecomment-1068535542


   PR merged. Please close the PR


-- 
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: gitbox-unsubscr...@hive.apache.org

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


Issue Time Tracking
---

Worklog Id: (was: 741929)
Time Spent: 2h 20m  (was: 2h 10m)

> Temporary table creation with not null constraint gets converted to external 
> table 
> ---
>
> Key: HIVE-25963
> URL: https://issues.apache.org/jira/browse/HIVE-25963
> Project: Hive
>  Issue Type: Bug
>  Components: HiveServer2, Standalone Metastore
>Reporter: Sourabh Goyal
>Assignee: Sourabh Goyal
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 2h 20m
>  Remaining Estimate: 0h
>
> When creating a temporary table with not null, constraint it gets covered to 
> external table. For example: 
> create temporary table t2 (a int not null);
> table t2' metadata looks like: 
> {code:java}
> +---+++
> |   col_name| data_type   
>|  comment   |
> +---+++
> | a | int 
>||
> |   | NULL
>| NULL   |
> | # Detailed Table Information  | NULL
>| NULL   |
> | Database: | default 
>| NULL   |
> | OwnerType:| USER
>| NULL   |
> | Owner:| sourabh 
>| NULL   |
> | CreateTime:   | Tue Feb 15 15:20:13 PST 2022
>| NULL   |
> | LastAccessTime:   | UNKNOWN 
>| NULL   |
> | Retention:| 0   
>| NULL   |
> | Location: | 
> hdfs://localhost:9000/tmp/hive/sourabh/80d374a8-cd7a-4fcf-ae72-51b04ff9c3d8/_tmp_space.db/4574446d-c144-48f9-b4b6-2e9ee0ce5be4
>  | NULL   |
> | Table Type:   | EXTERNAL_TABLE  
>| NULL   |
> | Table Parameters: | NULL
>| NULL   |
> |   | COLUMN_STATS_ACCURATE   
>| {\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"a\":\"true\"}} |
> |   | EXTERNAL
>| TRUE   |
> |   | TRANSLATED_TO_EXTERNAL  
>| TRUE   |
> |   | bucketing_version   
>| 2  |
> |   | external.table.purge
>| TRUE   |
> |   | numFiles
>| 0  |
> |   | numRows   

[jira] [Work logged] (HIVE-25575) Add support for JWT authentication in HTTP mode

2022-03-15 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on HIVE-25575:
-

Author: ASF GitHub Bot
Created on: 15/Mar/22 16:41
Start Date: 15/Mar/22 16:41
Worklog Time Spent: 10m 
  Work Description: sourabh912 commented on a change in pull request #3006:
URL: https://github.com/apache/hive/pull/3006#discussion_r826430241



##
File path: 
service/src/java/org/apache/hive/service/cli/thrift/ThriftHttpServlet.java
##
@@ -302,6 +310,27 @@ protected void doPost(HttpServletRequest request, 
HttpServletResponse response)
 }
   }
 
+  private String validateJWT(HttpServletRequest request, HttpServletResponse 
response)
+  throws HttpAuthenticationException {
+Preconditions.checkState(jwtValidator != null, "JWT validator should have 
been set");
+String signedJwt = extractBearerToken(request, response);
+if (signedJwt == null) {
+  LOG.debug("No token found with the request {}", request);
+  return null;
+}
+String user = null;
+try {
+  user = jwtValidator.validateJWTAndExtractUser(signedJwt);
+  Preconditions.checkNotNull(user, "JWT needs to contain the user name as 
subject");
+  Preconditions.checkState(!user.isEmpty(), "User name should not be 
empty");
+  LOG.info("JWT verification successful for user {}", user);
+} catch (Exception e) {
+  LOG.info("JWT verification failed", e);

Review comment:
   nit: It should be LOG.error()

##
File path: service/src/java/org/apache/hive/service/auth/jwt/JWTValidator.java
##
@@ -0,0 +1,93 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hive.service.auth.jwt;
+
+import com.google.common.base.Preconditions;
+import com.nimbusds.jose.JOSEException;
+import com.nimbusds.jose.JWSHeader;
+import com.nimbusds.jose.JWSObject;
+import com.nimbusds.jose.JWSVerifier;
+import com.nimbusds.jose.crypto.factories.DefaultJWSVerifierFactory;
+import com.nimbusds.jose.jwk.AsymmetricJWK;
+import com.nimbusds.jose.jwk.JWK;
+import com.nimbusds.jwt.JWTClaimsSet;
+import com.nimbusds.jwt.SignedJWT;
+import org.apache.hadoop.hive.conf.HiveConf;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.security.sasl.AuthenticationException;
+import java.io.IOException;
+import java.security.Key;
+import java.text.ParseException;
+import java.util.Date;
+import java.util.List;
+
+public class JWTValidator {

Review comment:
   nit: add some description about what this validator does? 

##
File path: 
itests/hive-unit/src/test/java/org/apache/hive/service/auth/jwt/TestHttpJwtAuthentication.java
##
@@ -0,0 +1,219 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hive.service.auth.jwt;
+
+import com.github.tomakehurst.wiremock.junit.WireMockRule;
+import com.nimbusds.jose.JWSAlgorithm;
+import com.nimbusds.jose.JWSHeader;
+import com.nimbusds.jose.JWSSigner;
+import com.nimbusds.jose.crypto.RSASSASigner;
+import com.nimbusds.jose.jwk.RSAKey;
+import com.nimbusds.jwt.JWTClaimsSet;
+import com.nimbusds.jwt.SignedJWT;
+import org.apache.hadoop.hive.conf.HiveConf;
+import org.apache.hadoop.hive.conf.HiveConf.ConfVars;
+import org.apache.hive.jdbc.HiveConnection;
+import 

[jira] [Commented] (HIVE-25540) Enable batch update of column stats only for MySql and Postgres

2022-03-15 Thread Stamatis Zampetakis (Jira)


[ 
https://issues.apache.org/jira/browse/HIVE-25540?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17506975#comment-17506975
 ] 

Stamatis Zampetakis commented on HIVE-25540:


I think it would be good solve this JIRA before releasing 4.0.0-alpha-1 to 
avoid failures like the one outlined above.

> Enable batch update of column stats only for MySql and Postgres 
> 
>
> Key: HIVE-25540
> URL: https://issues.apache.org/jira/browse/HIVE-25540
> Project: Hive
>  Issue Type: Sub-task
>Reporter: mahesh kumar behera
>Assignee: mahesh kumar behera
>Priority: Major
>  Labels: pull-request-available
> Fix For: 4.0.0-alpha-1
>
>  Time Spent: 50m
>  Remaining Estimate: 0h
>
> The batch updation of partition column stats using direct sql is tested only 
> for MySql and Postgres.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (HIVE-25540) Enable batch update of column stats only for MySql and Postgres

2022-03-15 Thread Stamatis Zampetakis (Jira)


[ 
https://issues.apache.org/jira/browse/HIVE-25540?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17506973#comment-17506973
 ] 

Stamatis Zampetakis commented on HIVE-25540:


Today I was running a few tests (over commit 
https://github.com/apache/hive/commit/d696b34a5765fe950ebe4bfffd36b9ea914dfaab) 
with various kind of metastore backends (e.g., MicrosoftSQLServer) for another 
JIRA case and I bumped into a exceptions with directsql and updating statistics 
which I think are related/ can be solved by this JIRA.

{code:bash}
mvn test -Dtest=TestMiniLlapLocalCliDriver -Dqfile=list_bucket_dml_9.q 
-Dtest.metastore.db=mssql
{code}

{noformat}
2022-03-15T07:57:17,078 ERROR [2b933b88-6083-4750-b151-2d2c7e04ccce main] 
metastore.DirectSqlUpdateStat: Unable to 
getNextCSIdForMPartitionColumnStatistics
com.microsoft.sqlserver.jdbc.SQLServerException: Line 1: FOR UPDATE clause 
allowed only for DECLARE CURSOR.
at 
com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:258)
 ~[mssql-jdbc-6.2.1.jre8.jar:?]
at 
com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1535)
 ~[mssql-jdbc-6.2.1.jre8.jar:?]
at 
com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteStatement(SQLServerStatement.java:845)
 ~[mssql-jdbc-6.2.1.jre8.jar:?]
at 
com.microsoft.sqlserver.jdbc.SQLServerStatement$StmtExecCmd.doExecute(SQLServerStatement.java:752)
 ~[mssql-jdbc-6.2.1.jre8.jar:?]
at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:7151) 
~[mssql-jdbc-6.2.1.jre8.jar:?]
at 
com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:2478)
 ~[mssql-jdbc-6.2.1.jre8.jar:?]
at 
com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:219)
 ~[mssql-jdbc-6.2.1.jre8.jar:?]
at 
com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:199)
 ~[mssql-jdbc-6.2.1.jre8.jar:?]
at 
com.microsoft.sqlserver.jdbc.SQLServerStatement.executeQuery(SQLServerStatement.java:654)
 ~[mssql-jdbc-6.2.1.jre8.jar:?]
at 
com.zaxxer.hikari.pool.ProxyStatement.executeQuery(ProxyStatement.java:108) 
~[HikariCP-2.6.1.jar:?]
at 
com.zaxxer.hikari.pool.HikariProxyStatement.executeQuery(HikariProxyStatement.java)
 ~[HikariCP-2.6.1.jar:?]
at 
org.apache.hadoop.hive.metastore.DirectSqlUpdateStat.getNextCSIdForMPartitionColumnStatistics(DirectSqlUpdateStat.java:676)
 [hive-standalone-metastore-server-4.0.0-SNAPSHOT.jar:4.0.0-SNAPSHOT]
at 
org.apache.hadoop.hive.metastore.MetaStoreDirectSql.updatePartitionColumnStatisticsBatch(MetaStoreDirectSql.java:2966)
 [hive-standalone-metastore-server-4.0.0-SNAPSHOT.jar:4.0.0-SNAPSHOT]
at 
org.apache.hadoop.hive.metastore.ObjectStore.updatePartitionColumnStatisticsInBatch(ObjectStore.java:9849)
 [hive-standalone-metastore-server-4.0.0-SNAPSHOT.jar:4.0.0-SNAPSHOT]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
~[?:1.8.0_261]
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
~[?:1.8.0_261]
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 ~[?:1.8.0_261]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_261]
at 
org.apache.hadoop.hive.metastore.RawStoreProxy.invoke(RawStoreProxy.java:97) 
[hive-standalone-metastore-server-4.0.0-SNAPSHOT.jar:4.0.0-SNAPSHOT]
at 
com.sun.proxy.$Proxy60.updatePartitionColumnStatisticsInBatch(Unknown Source) 
[?:?]
at 
org.apache.hadoop.hive.metastore.HMSHandler.updatePartitionColStatsForOneBatch(HMSHandler.java:7060)
 [hive-standalone-metastore-server-4.0.0-SNAPSHOT.jar:4.0.0-SNAPSHOT]
at 
org.apache.hadoop.hive.metastore.HMSHandler.updatePartitionColStatsInBatch(HMSHandler.java:7113)
 [hive-standalone-metastore-server-4.0.0-SNAPSHOT.jar:4.0.0-SNAPSHOT]
at 
org.apache.hadoop.hive.metastore.HMSHandler.set_aggr_stats_for(HMSHandler.java:9137)
 [hive-standalone-metastore-server-4.0.0-SNAPSHOT.jar:4.0.0-SNAPSHOT]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
~[?:1.8.0_261]
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
~[?:1.8.0_261]
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 ~[?:1.8.0_261]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_261]
at 
org.apache.hadoop.hive.metastore.RetryingHMSHandler.invokeInternal(RetryingHMSHandler.java:146)
 [hive-standalone-metastore-server-4.0.0-SNAPSHOT.jar:4.0.0-SNAPSHOT]
at 
org.apache.hadoop.hive.metastore.RetryingHMSHandler.invoke(RetryingHMSHandler.java:107)
 [hive-standalone-metastore-server-4.0.0-SNAPSHOT.jar:4.0.0-SNAPSHOT]
at com.sun.proxy.$Proxy61.set_aggr_stats_for(Unknown 

[jira] [Updated] (HIVE-25540) Enable batch update of column stats only for MySql and Postgres

2022-03-15 Thread Stamatis Zampetakis (Jira)


 [ 
https://issues.apache.org/jira/browse/HIVE-25540?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stamatis Zampetakis updated HIVE-25540:
---
Fix Version/s: 4.0.0-alpha-1

> Enable batch update of column stats only for MySql and Postgres 
> 
>
> Key: HIVE-25540
> URL: https://issues.apache.org/jira/browse/HIVE-25540
> Project: Hive
>  Issue Type: Sub-task
>Reporter: mahesh kumar behera
>Assignee: mahesh kumar behera
>Priority: Major
>  Labels: pull-request-available
> Fix For: 4.0.0-alpha-1
>
>  Time Spent: 50m
>  Remaining Estimate: 0h
>
> The batch updation of partition column stats using direct sql is tested only 
> for MySql and Postgres.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)