[jira] [Work logged] (HIVE-25813) CREATE TABLE x LIKE storagehandler-based-source fails

2022-10-31 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on HIVE-25813:
-

Author: ASF GitHub Bot
Created on: 01/Nov/22 01:08
Start Date: 01/Nov/22 01:08
Worklog Time Spent: 10m 
  Work Description: dengzhhu653 merged PR #3627:
URL: https://github.com/apache/hive/pull/3627




Issue Time Tracking
---

Worklog Id: (was: 822146)
Time Spent: 4h  (was: 3h 50m)

> CREATE TABLE x LIKE storagehandler-based-source fails 
> --
>
> Key: HIVE-25813
> URL: https://issues.apache.org/jira/browse/HIVE-25813
> Project: Hive
>  Issue Type: Bug
>Reporter: Sai Hemanth Gantasala
>Assignee: Sai Hemanth Gantasala
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 4h
>  Remaining Estimate: 0h
>
> {code:java}
> CREATE EXTERNAL TABLE default.dbs (
>   DB_IDbigint,
>   DB_LOCATION_URI  string,
>   NAME string,
>   OWNER_NAME   string,
>   OWNER_TYPE   string )
> STORED BY 'org.apache.hive.storage.jdbc.JdbcStorageHandler'
> TBLPROPERTIES (
>   'hive.sql.database.type' = 'MYSQL',
>   'hive.sql.jdbc.driver'   = 'com.mysql.jdbc.Driver',
>   'hive.sql.jdbc.url'  = 'jdbc:mysql://localhost:3306/hive1',
>   'hive.sql.dbcp.username' = 'hive1',
>   'hive.sql.dbcp.password' = 'cloudera',
>   'hive.sql.query' = 'SELECT DB_ID, DB_LOCATION_URI, NAME, OWNER_NAME, 
> OWNER_TYPE FROM DBS'
> );
> CREATE TABLE default.dbscopy LIKE default.dbs;
> Caused by: java.lang.NullPointerException
>   at 
> org.apache.hadoop.hive.metastore.HiveMetaStoreUtils.getFieldsFromDeserializer(HiveMetaStoreUtils.java:186)
>  {code}
> With this patch, we don't want to copy over the table properties or any other 
> physical properties (storage handler e.t.c) of the source table when CREATE 
> TABLE LIKE TABLE command is executed. Only table schema (logical properties) 
> should be copied. This implementation is consistent with other SQL engines 
> like Mysql, Redshift etc.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (HIVE-25813) CREATE TABLE x LIKE storagehandler-based-source fails

2022-10-31 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on HIVE-25813:
-

Author: ASF GitHub Bot
Created on: 31/Oct/22 20:10
Start Date: 31/Oct/22 20:10
Worklog Time Spent: 10m 
  Work Description: saihemanth-cloudera commented on PR #3627:
URL: https://github.com/apache/hive/pull/3627#issuecomment-1297624594

   @dengzhhu653 - Tested are green. Can you merge this patch?  




Issue Time Tracking
---

Worklog Id: (was: 822081)
Time Spent: 3h 50m  (was: 3h 40m)

> CREATE TABLE x LIKE storagehandler-based-source fails 
> --
>
> Key: HIVE-25813
> URL: https://issues.apache.org/jira/browse/HIVE-25813
> Project: Hive
>  Issue Type: Bug
>Reporter: Sai Hemanth Gantasala
>Assignee: Sai Hemanth Gantasala
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 3h 50m
>  Remaining Estimate: 0h
>
> {code:java}
> CREATE EXTERNAL TABLE default.dbs (
>   DB_IDbigint,
>   DB_LOCATION_URI  string,
>   NAME string,
>   OWNER_NAME   string,
>   OWNER_TYPE   string )
> STORED BY 'org.apache.hive.storage.jdbc.JdbcStorageHandler'
> TBLPROPERTIES (
>   'hive.sql.database.type' = 'MYSQL',
>   'hive.sql.jdbc.driver'   = 'com.mysql.jdbc.Driver',
>   'hive.sql.jdbc.url'  = 'jdbc:mysql://localhost:3306/hive1',
>   'hive.sql.dbcp.username' = 'hive1',
>   'hive.sql.dbcp.password' = 'cloudera',
>   'hive.sql.query' = 'SELECT DB_ID, DB_LOCATION_URI, NAME, OWNER_NAME, 
> OWNER_TYPE FROM DBS'
> );
> CREATE TABLE default.dbscopy LIKE default.dbs;
> Caused by: java.lang.NullPointerException
>   at 
> org.apache.hadoop.hive.metastore.HiveMetaStoreUtils.getFieldsFromDeserializer(HiveMetaStoreUtils.java:186)
>  {code}
> With this patch, we don't want to copy over the table properties or any other 
> physical properties (storage handler e.t.c) of the source table when CREATE 
> TABLE LIKE TABLE command is executed. Only table schema (logical properties) 
> should be copied. This implementation is consistent with other SQL engines 
> like Mysql, Redshift etc.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (HIVE-25813) CREATE TABLE x LIKE storagehandler-based-source fails

2022-10-31 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on HIVE-25813:
-

Author: ASF GitHub Bot
Created on: 31/Oct/22 17:15
Start Date: 31/Oct/22 17:15
Worklog Time Spent: 10m 
  Work Description: sonarcloud[bot] commented on PR #3627:
URL: https://github.com/apache/hive/pull/3627#issuecomment-1297410545

   Kudos, SonarCloud Quality Gate passed!    [![Quality Gate 
passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png
 'Quality Gate 
passed')](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=3627)
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3627&resolved=false&types=BUG)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3627&resolved=false&types=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3627&resolved=false&types=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3627&resolved=false&types=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3627&resolved=false&types=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3627&resolved=false&types=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=3627&resolved=false&types=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=3627&resolved=false&types=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=3627&resolved=false&types=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3627&resolved=false&types=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3627&resolved=false&types=CODE_SMELL)
 [9 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3627&resolved=false&types=CODE_SMELL)
   
   [![No Coverage 
information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo-16px.png
 'No Coverage 
information')](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=3627&metric=coverage&view=list)
 No Coverage information  
   [![No Duplication 
information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/NoDuplicationInfo-16px.png
 'No Duplication 
information')](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=3627&metric=duplicated_lines_density&view=list)
 No Duplication information
   
   




Issue Time Tracking
---

Worklog Id: (was: 822035)
Time Spent: 3h 40m  (was: 3.5h)

> CREATE TABLE x LIKE storagehandler-based-source fails 
> --
>
> Key: HIVE-25813
> URL: https://issues.apache.org/jira/browse/HIVE-25813
> Project: Hive
>  Issue Type: Bug
>Reporter: Sai Hemanth Gantasala
>Assignee: Sai Hemanth Gantasala
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 3h 40m
>  Remaining Estimate: 0h
>
> {code:java}
> CREATE EXTERNAL TABLE default.dbs (
>   DB_IDbigint,
>   DB_LOCATION_URI  string,
>   NAME string,
>   OWNER_NAME   string,
>   OWNER_TYPE   string )
> STORED BY 'org.apache.hive.storage.jdbc.JdbcStorageHandler'
> TBLPROPERTIES (
>   'hive.sql.database.type' = 'MYSQL',
>   'hive.sql.jdbc.driver'   = 'com.mysql.jdbc.Driver',
>   'hive.sql.jdbc.url'  = 'jdbc:mysql://localhost:3306/hive1',
>   'hive.sql.dbcp.username' = 'hive1',
>   'hive.sql.dbcp.password' = 'cloudera',
>   'hive.sql.query' = 'SELECT DB_ID, DB_LOCATION_URI, NAME, OWNER_NAME,

[jira] [Work logged] (HIVE-25813) CREATE TABLE x LIKE storagehandler-based-source fails

2022-10-28 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on HIVE-25813:
-

Author: ASF GitHub Bot
Created on: 28/Oct/22 18:54
Start Date: 28/Oct/22 18:54
Worklog Time Spent: 10m 
  Work Description: sonarcloud[bot] commented on PR #3627:
URL: https://github.com/apache/hive/pull/3627#issuecomment-1295345286

   Kudos, SonarCloud Quality Gate passed!    [![Quality Gate 
passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png
 'Quality Gate 
passed')](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=3627)
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3627&resolved=false&types=BUG)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3627&resolved=false&types=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3627&resolved=false&types=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3627&resolved=false&types=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3627&resolved=false&types=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3627&resolved=false&types=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=3627&resolved=false&types=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=3627&resolved=false&types=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=3627&resolved=false&types=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3627&resolved=false&types=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3627&resolved=false&types=CODE_SMELL)
 [9 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3627&resolved=false&types=CODE_SMELL)
   
   [![No Coverage 
information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo-16px.png
 'No Coverage 
information')](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=3627&metric=coverage&view=list)
 No Coverage information  
   [![No Duplication 
information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/NoDuplicationInfo-16px.png
 'No Duplication 
information')](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=3627&metric=duplicated_lines_density&view=list)
 No Duplication information
   
   




Issue Time Tracking
---

Worklog Id: (was: 821570)
Time Spent: 3.5h  (was: 3h 20m)

> CREATE TABLE x LIKE storagehandler-based-source fails 
> --
>
> Key: HIVE-25813
> URL: https://issues.apache.org/jira/browse/HIVE-25813
> Project: Hive
>  Issue Type: Bug
>Reporter: Sai Hemanth Gantasala
>Assignee: Sai Hemanth Gantasala
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 3.5h
>  Remaining Estimate: 0h
>
> {code:java}
> CREATE EXTERNAL TABLE default.dbs (
>   DB_IDbigint,
>   DB_LOCATION_URI  string,
>   NAME string,
>   OWNER_NAME   string,
>   OWNER_TYPE   string )
> STORED BY 'org.apache.hive.storage.jdbc.JdbcStorageHandler'
> TBLPROPERTIES (
>   'hive.sql.database.type' = 'MYSQL',
>   'hive.sql.jdbc.driver'   = 'com.mysql.jdbc.Driver',
>   'hive.sql.jdbc.url'  = 'jdbc:mysql://localhost:3306/hive1',
>   'hive.sql.dbcp.username' = 'hive1',
>   'hive.sql.dbcp.password' = 'cloudera',
>   'hive.sql.query' = 'SELECT DB_ID, DB_LOCATION_URI, NAME, OWNER_NAME, 

[jira] [Work logged] (HIVE-25813) CREATE TABLE x LIKE storagehandler-based-source fails

2022-10-28 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on HIVE-25813:
-

Author: ASF GitHub Bot
Created on: 28/Oct/22 07:43
Start Date: 28/Oct/22 07:43
Worklog Time Spent: 10m 
  Work Description: sonarcloud[bot] commented on PR #3627:
URL: https://github.com/apache/hive/pull/3627#issuecomment-1294610238

   Kudos, SonarCloud Quality Gate passed!    [![Quality Gate 
passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png
 'Quality Gate 
passed')](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=3627)
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3627&resolved=false&types=BUG)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3627&resolved=false&types=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3627&resolved=false&types=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3627&resolved=false&types=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3627&resolved=false&types=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3627&resolved=false&types=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=3627&resolved=false&types=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=3627&resolved=false&types=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=3627&resolved=false&types=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3627&resolved=false&types=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3627&resolved=false&types=CODE_SMELL)
 [9 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3627&resolved=false&types=CODE_SMELL)
   
   [![No Coverage 
information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo-16px.png
 'No Coverage 
information')](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=3627&metric=coverage&view=list)
 No Coverage information  
   [![No Duplication 
information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/NoDuplicationInfo-16px.png
 'No Duplication 
information')](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=3627&metric=duplicated_lines_density&view=list)
 No Duplication information
   
   




Issue Time Tracking
---

Worklog Id: (was: 821329)
Time Spent: 3h 20m  (was: 3h 10m)

> CREATE TABLE x LIKE storagehandler-based-source fails 
> --
>
> Key: HIVE-25813
> URL: https://issues.apache.org/jira/browse/HIVE-25813
> Project: Hive
>  Issue Type: Bug
>Reporter: Sai Hemanth Gantasala
>Assignee: Sai Hemanth Gantasala
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 3h 20m
>  Remaining Estimate: 0h
>
> {code:java}
> CREATE EXTERNAL TABLE default.dbs (
>   DB_IDbigint,
>   DB_LOCATION_URI  string,
>   NAME string,
>   OWNER_NAME   string,
>   OWNER_TYPE   string )
> STORED BY 'org.apache.hive.storage.jdbc.JdbcStorageHandler'
> TBLPROPERTIES (
>   'hive.sql.database.type' = 'MYSQL',
>   'hive.sql.jdbc.driver'   = 'com.mysql.jdbc.Driver',
>   'hive.sql.jdbc.url'  = 'jdbc:mysql://localhost:3306/hive1',
>   'hive.sql.dbcp.username' = 'hive1',
>   'hive.sql.dbcp.password' = 'cloudera',
>   'hive.sql.query' = 'SELECT DB_ID, DB_LOCATION_URI, NAME, OWNER_NAM

[jira] [Work logged] (HIVE-25813) CREATE TABLE x LIKE storagehandler-based-source fails

2022-10-27 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on HIVE-25813:
-

Author: ASF GitHub Bot
Created on: 28/Oct/22 01:25
Start Date: 28/Oct/22 01:25
Worklog Time Spent: 10m 
  Work Description: dengzhhu653 commented on PR #3627:
URL: https://github.com/apache/hive/pull/3627#issuecomment-1294298203

   Leave some minor comments, others look good to me!




Issue Time Tracking
---

Worklog Id: (was: 821231)
Time Spent: 3h 10m  (was: 3h)

> CREATE TABLE x LIKE storagehandler-based-source fails 
> --
>
> Key: HIVE-25813
> URL: https://issues.apache.org/jira/browse/HIVE-25813
> Project: Hive
>  Issue Type: Bug
>Reporter: Sai Hemanth Gantasala
>Assignee: Sai Hemanth Gantasala
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 3h 10m
>  Remaining Estimate: 0h
>
> {code:java}
> CREATE EXTERNAL TABLE default.dbs (
>   DB_IDbigint,
>   DB_LOCATION_URI  string,
>   NAME string,
>   OWNER_NAME   string,
>   OWNER_TYPE   string )
> STORED BY 'org.apache.hive.storage.jdbc.JdbcStorageHandler'
> TBLPROPERTIES (
>   'hive.sql.database.type' = 'MYSQL',
>   'hive.sql.jdbc.driver'   = 'com.mysql.jdbc.Driver',
>   'hive.sql.jdbc.url'  = 'jdbc:mysql://localhost:3306/hive1',
>   'hive.sql.dbcp.username' = 'hive1',
>   'hive.sql.dbcp.password' = 'cloudera',
>   'hive.sql.query' = 'SELECT DB_ID, DB_LOCATION_URI, NAME, OWNER_NAME, 
> OWNER_TYPE FROM DBS'
> );
> CREATE TABLE default.dbscopy LIKE default.dbs;
> Caused by: java.lang.NullPointerException
>   at 
> org.apache.hadoop.hive.metastore.HiveMetaStoreUtils.getFieldsFromDeserializer(HiveMetaStoreUtils.java:186)
>  {code}
> With this patch, we don't want to copy over the table properties or any other 
> physical properties (storage handler e.t.c) of the source table when CREATE 
> TABLE LIKE TABLE command is executed. Only table schema (logical properties) 
> should be copied. This implementation is consistent with other SQL engines 
> like Mysql, Redshift etc.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (HIVE-25813) CREATE TABLE x LIKE storagehandler-based-source fails

2022-10-27 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on HIVE-25813:
-

Author: ASF GitHub Bot
Created on: 28/Oct/22 01:24
Start Date: 28/Oct/22 01:24
Worklog Time Spent: 10m 
  Work Description: dengzhhu653 commented on code in PR #3627:
URL: https://github.com/apache/hive/pull/3627#discussion_r1007509537


##
ql/src/test/queries/clientpositive/avro_extschema_insert.q:
##
@@ -7,7 +7,8 @@ create external table avro_extschema_insert1 (name string) 
partitioned by (p1 st
 
 describe avro_extschema_insert1;
 
-create external table avro_extschema_insert2 like avro_extschema_insert1;
+create external table avro_extschema_insert2 like avro_extschema_insert1 
stored as avro

Review Comment:
   nit: could we add `desc formatted avro_extschema_insert2` after creation?





Issue Time Tracking
---

Worklog Id: (was: 821230)
Time Spent: 3h  (was: 2h 50m)

> CREATE TABLE x LIKE storagehandler-based-source fails 
> --
>
> Key: HIVE-25813
> URL: https://issues.apache.org/jira/browse/HIVE-25813
> Project: Hive
>  Issue Type: Bug
>Reporter: Sai Hemanth Gantasala
>Assignee: Sai Hemanth Gantasala
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 3h
>  Remaining Estimate: 0h
>
> {code:java}
> CREATE EXTERNAL TABLE default.dbs (
>   DB_IDbigint,
>   DB_LOCATION_URI  string,
>   NAME string,
>   OWNER_NAME   string,
>   OWNER_TYPE   string )
> STORED BY 'org.apache.hive.storage.jdbc.JdbcStorageHandler'
> TBLPROPERTIES (
>   'hive.sql.database.type' = 'MYSQL',
>   'hive.sql.jdbc.driver'   = 'com.mysql.jdbc.Driver',
>   'hive.sql.jdbc.url'  = 'jdbc:mysql://localhost:3306/hive1',
>   'hive.sql.dbcp.username' = 'hive1',
>   'hive.sql.dbcp.password' = 'cloudera',
>   'hive.sql.query' = 'SELECT DB_ID, DB_LOCATION_URI, NAME, OWNER_NAME, 
> OWNER_TYPE FROM DBS'
> );
> CREATE TABLE default.dbscopy LIKE default.dbs;
> Caused by: java.lang.NullPointerException
>   at 
> org.apache.hadoop.hive.metastore.HiveMetaStoreUtils.getFieldsFromDeserializer(HiveMetaStoreUtils.java:186)
>  {code}
> With this patch, we don't want to copy over the table properties or any other 
> physical properties (storage handler e.t.c) of the source table when CREATE 
> TABLE LIKE TABLE command is executed. Only table schema (logical properties) 
> should be copied. This implementation is consistent with other SQL engines 
> like Mysql, Redshift etc.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (HIVE-25813) CREATE TABLE x LIKE storagehandler-based-source fails

2022-10-27 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on HIVE-25813:
-

Author: ASF GitHub Bot
Created on: 28/Oct/22 01:18
Start Date: 28/Oct/22 01:18
Worklog Time Spent: 10m 
  Work Description: dengzhhu653 commented on code in PR #3627:
URL: https://github.com/apache/hive/pull/3627#discussion_r1007505842


##
hbase-handler/src/test/results/positive/hbase_queries.q.out:
##
@@ -987,15 +992,17 @@ CREATE EXTERNAL TABLE `hbase_table_1_like`(
   `key` int COMMENT 'It is a column key', 
   `value` string COMMENT 'It is the column string value')
 ROW FORMAT SERDE 
-  'org.apache.hadoop.hive.hbase.HBaseSerDe' 
-STORED BY 
-  'org.apache.hadoop.hive.hbase.HBaseStorageHandler' 
+  'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' 
 WITH SERDEPROPERTIES ( 
-  'hbase.columns.mapping'='cf:string', 
-  'serialization.format'='1')
+  'hbase.columns.mapping'='cf:string') 

Review Comment:
   nit: do we need this serde properties after this?





Issue Time Tracking
---

Worklog Id: (was: 821227)
Time Spent: 2h 50m  (was: 2h 40m)

> CREATE TABLE x LIKE storagehandler-based-source fails 
> --
>
> Key: HIVE-25813
> URL: https://issues.apache.org/jira/browse/HIVE-25813
> Project: Hive
>  Issue Type: Bug
>Reporter: Sai Hemanth Gantasala
>Assignee: Sai Hemanth Gantasala
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 2h 50m
>  Remaining Estimate: 0h
>
> {code:java}
> CREATE EXTERNAL TABLE default.dbs (
>   DB_IDbigint,
>   DB_LOCATION_URI  string,
>   NAME string,
>   OWNER_NAME   string,
>   OWNER_TYPE   string )
> STORED BY 'org.apache.hive.storage.jdbc.JdbcStorageHandler'
> TBLPROPERTIES (
>   'hive.sql.database.type' = 'MYSQL',
>   'hive.sql.jdbc.driver'   = 'com.mysql.jdbc.Driver',
>   'hive.sql.jdbc.url'  = 'jdbc:mysql://localhost:3306/hive1',
>   'hive.sql.dbcp.username' = 'hive1',
>   'hive.sql.dbcp.password' = 'cloudera',
>   'hive.sql.query' = 'SELECT DB_ID, DB_LOCATION_URI, NAME, OWNER_NAME, 
> OWNER_TYPE FROM DBS'
> );
> CREATE TABLE default.dbscopy LIKE default.dbs;
> Caused by: java.lang.NullPointerException
>   at 
> org.apache.hadoop.hive.metastore.HiveMetaStoreUtils.getFieldsFromDeserializer(HiveMetaStoreUtils.java:186)
>  {code}
> With this patch, we don't want to copy over the table properties or any other 
> physical properties (storage handler e.t.c) of the source table when CREATE 
> TABLE LIKE TABLE command is executed. Only table schema (logical properties) 
> should be copied. This implementation is consistent with other SQL engines 
> like Mysql, Redshift etc.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (HIVE-25813) CREATE TABLE x LIKE storagehandler-based-source fails

2022-10-27 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on HIVE-25813:
-

Author: ASF GitHub Bot
Created on: 27/Oct/22 18:45
Start Date: 27/Oct/22 18:45
Worklog Time Spent: 10m 
  Work Description: sonarcloud[bot] commented on PR #3627:
URL: https://github.com/apache/hive/pull/3627#issuecomment-1293927281

   Kudos, SonarCloud Quality Gate passed!    [![Quality Gate 
passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png
 'Quality Gate 
passed')](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=3627)
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3627&resolved=false&types=BUG)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3627&resolved=false&types=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3627&resolved=false&types=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3627&resolved=false&types=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3627&resolved=false&types=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3627&resolved=false&types=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=3627&resolved=false&types=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=3627&resolved=false&types=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=3627&resolved=false&types=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3627&resolved=false&types=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3627&resolved=false&types=CODE_SMELL)
 [9 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3627&resolved=false&types=CODE_SMELL)
   
   [![No Coverage 
information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo-16px.png
 'No Coverage 
information')](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=3627&metric=coverage&view=list)
 No Coverage information  
   [![No Duplication 
information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/NoDuplicationInfo-16px.png
 'No Duplication 
information')](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=3627&metric=duplicated_lines_density&view=list)
 No Duplication information
   
   




Issue Time Tracking
---

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

> CREATE TABLE x LIKE storagehandler-based-source fails 
> --
>
> Key: HIVE-25813
> URL: https://issues.apache.org/jira/browse/HIVE-25813
> Project: Hive
>  Issue Type: Bug
>Reporter: Sai Hemanth Gantasala
>Assignee: Sai Hemanth Gantasala
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 2h 40m
>  Remaining Estimate: 0h
>
> {code:java}
> CREATE EXTERNAL TABLE default.dbs (
>   DB_IDbigint,
>   DB_LOCATION_URI  string,
>   NAME string,
>   OWNER_NAME   string,
>   OWNER_TYPE   string )
> STORED BY 'org.apache.hive.storage.jdbc.JdbcStorageHandler'
> TBLPROPERTIES (
>   'hive.sql.database.type' = 'MYSQL',
>   'hive.sql.jdbc.driver'   = 'com.mysql.jdbc.Driver',
>   'hive.sql.jdbc.url'  = 'jdbc:mysql://localhost:3306/hive1',
>   'hive.sql.dbcp.username' = 'hive1',
>   'hive.sql.dbcp.password' = 'cloudera',
>   'hive.sql.query' = 'SELECT DB_ID, DB_LOCATION_URI, NAME, OWNER_NAME,

[jira] [Work logged] (HIVE-25813) CREATE TABLE x LIKE storagehandler-based-source fails

2022-10-27 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on HIVE-25813:
-

Author: ASF GitHub Bot
Created on: 27/Oct/22 18:03
Start Date: 27/Oct/22 18:03
Worklog Time Spent: 10m 
  Work Description: saihemanth-cloudera commented on code in PR #3627:
URL: https://github.com/apache/hive/pull/3627#discussion_r1007203500


##
ql/src/java/org/apache/hadoop/hive/ql/ddl/table/create/like/CreateTableLikeOperation.java:
##
@@ -157,27 +158,12 @@ private void setTableParameters(Table tbl) throws 
HiveException {
 }
 // We should copy only those table parameters that are specified in the 
config.
 SerDeSpec spec = AnnotationUtils.getAnnotation(serdeClass, 
SerDeSpec.class);
-
-// for non-native table, property storage_handler should be retained
-retainer.add(META_TABLE_STORAGE);
-if (spec != null && spec.schemaProps() != null) {
-  retainer.addAll(Arrays.asList(spec.schemaProps()));
-}
-
-String paramsStr = HiveConf.getVar(context.getConf(), 
HiveConf.ConfVars.DDL_CTL_PARAMETERS_WHITELIST);
-if (paramsStr != null) {
-  retainer.addAll(Arrays.asList(paramsStr.split(",")));
-}
-
-Map params = tbl.getParameters();
-if (!retainer.isEmpty()) {
-  params.keySet().retainAll(retainer);
-} else {
-  params.clear();
-}
+//With Hive-25813, we'll not copy over table properties from the source.
+//CTLT should should copy column schema but not table properties. It is 
also consistent with other query engines like mysql, redshift.
+tbl.getParameters().clear();

Review Comment:
   Ack.





Issue Time Tracking
---

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

> CREATE TABLE x LIKE storagehandler-based-source fails 
> --
>
> Key: HIVE-25813
> URL: https://issues.apache.org/jira/browse/HIVE-25813
> Project: Hive
>  Issue Type: Bug
>Reporter: Sai Hemanth Gantasala
>Assignee: Sai Hemanth Gantasala
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 2.5h
>  Remaining Estimate: 0h
>
> {code:java}
> CREATE EXTERNAL TABLE default.dbs (
>   DB_IDbigint,
>   DB_LOCATION_URI  string,
>   NAME string,
>   OWNER_NAME   string,
>   OWNER_TYPE   string )
> STORED BY 'org.apache.hive.storage.jdbc.JdbcStorageHandler'
> TBLPROPERTIES (
>   'hive.sql.database.type' = 'MYSQL',
>   'hive.sql.jdbc.driver'   = 'com.mysql.jdbc.Driver',
>   'hive.sql.jdbc.url'  = 'jdbc:mysql://localhost:3306/hive1',
>   'hive.sql.dbcp.username' = 'hive1',
>   'hive.sql.dbcp.password' = 'cloudera',
>   'hive.sql.query' = 'SELECT DB_ID, DB_LOCATION_URI, NAME, OWNER_NAME, 
> OWNER_TYPE FROM DBS'
> );
> CREATE TABLE default.dbscopy LIKE default.dbs;
> Caused by: java.lang.NullPointerException
>   at 
> org.apache.hadoop.hive.metastore.HiveMetaStoreUtils.getFieldsFromDeserializer(HiveMetaStoreUtils.java:186)
>  {code}
> With this patch, we don't want to copy over the table properties or any other 
> physical properties (storage handler e.t.c) of the source table when CREATE 
> TABLE LIKE TABLE command is executed. Only table schema (logical properties) 
> should be copied. This implementation is consistent with other SQL engines 
> like Mysql, Redshift etc.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (HIVE-25813) CREATE TABLE x LIKE storagehandler-based-source fails

2022-10-20 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on HIVE-25813:
-

Author: ASF GitHub Bot
Created on: 21/Oct/22 02:05
Start Date: 21/Oct/22 02:05
Worklog Time Spent: 10m 
  Work Description: dengzhhu653 commented on code in PR #3627:
URL: https://github.com/apache/hive/pull/3627#discussion_r1001283149


##
ql/src/java/org/apache/hadoop/hive/ql/ddl/table/create/like/CreateTableLikeOperation.java:
##
@@ -157,27 +158,12 @@ private void setTableParameters(Table tbl) throws 
HiveException {
 }
 // We should copy only those table parameters that are specified in the 
config.
 SerDeSpec spec = AnnotationUtils.getAnnotation(serdeClass, 
SerDeSpec.class);
-
-// for non-native table, property storage_handler should be retained
-retainer.add(META_TABLE_STORAGE);
-if (spec != null && spec.schemaProps() != null) {
-  retainer.addAll(Arrays.asList(spec.schemaProps()));
-}
-
-String paramsStr = HiveConf.getVar(context.getConf(), 
HiveConf.ConfVars.DDL_CTL_PARAMETERS_WHITELIST);
-if (paramsStr != null) {
-  retainer.addAll(Arrays.asList(paramsStr.split(",")));
-}
-
-Map params = tbl.getParameters();
-if (!retainer.isEmpty()) {
-  params.keySet().retainAll(retainer);
-} else {
-  params.clear();
-}
+//With Hive-25813, we'll not copy over table properties from the source.
+//CTLT should should copy column schema but not table properties. It is 
also consistent with other query engines like mysql, redshift.
+tbl.getParameters().clear();

Review Comment:
   In `setTableParameters`, since we do not use `serdeClass` after changes, can 
we remove it as well?  and `hive.ddl.createtablelike.properties.whitelist` 
becomes noop, can we mark it `Deprecated` and add some descriptions about the 
fix?





Issue Time Tracking
---

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

> CREATE TABLE x LIKE storagehandler-based-source fails 
> --
>
> Key: HIVE-25813
> URL: https://issues.apache.org/jira/browse/HIVE-25813
> Project: Hive
>  Issue Type: Bug
>Reporter: Sai Hemanth Gantasala
>Assignee: Sai Hemanth Gantasala
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 2h 20m
>  Remaining Estimate: 0h
>
> {code:java}
> CREATE EXTERNAL TABLE default.dbs (
>   DB_IDbigint,
>   DB_LOCATION_URI  string,
>   NAME string,
>   OWNER_NAME   string,
>   OWNER_TYPE   string )
> STORED BY 'org.apache.hive.storage.jdbc.JdbcStorageHandler'
> TBLPROPERTIES (
>   'hive.sql.database.type' = 'MYSQL',
>   'hive.sql.jdbc.driver'   = 'com.mysql.jdbc.Driver',
>   'hive.sql.jdbc.url'  = 'jdbc:mysql://localhost:3306/hive1',
>   'hive.sql.dbcp.username' = 'hive1',
>   'hive.sql.dbcp.password' = 'cloudera',
>   'hive.sql.query' = 'SELECT DB_ID, DB_LOCATION_URI, NAME, OWNER_NAME, 
> OWNER_TYPE FROM DBS'
> );
> CREATE TABLE default.dbscopy LIKE default.dbs;
> Caused by: java.lang.NullPointerException
>   at 
> org.apache.hadoop.hive.metastore.HiveMetaStoreUtils.getFieldsFromDeserializer(HiveMetaStoreUtils.java:186)
>  {code}
> With this patch, we don't want to copy over the table properties or any other 
> physical properties (storage handler e.t.c) of the source table when CREATE 
> TABLE LIKE TABLE command is executed. Only table schema (logical properties) 
> should be copied. This implementation is consistent with other SQL engines 
> like Mysql, Redshift etc.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (HIVE-25813) CREATE TABLE x LIKE storagehandler-based-source fails

2022-10-20 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on HIVE-25813:
-

Author: ASF GitHub Bot
Created on: 20/Oct/22 23:09
Start Date: 20/Oct/22 23:09
Worklog Time Spent: 10m 
  Work Description: saihemanth-cloudera commented on code in PR #3627:
URL: https://github.com/apache/hive/pull/3627#discussion_r1001204480


##
ql/src/java/org/apache/hadoop/hive/ql/ddl/table/create/like/CreateTableLikeOperation.java:
##
@@ -157,27 +158,12 @@ private void setTableParameters(Table tbl) throws 
HiveException {
 }
 // We should copy only those table parameters that are specified in the 
config.
 SerDeSpec spec = AnnotationUtils.getAnnotation(serdeClass, 
SerDeSpec.class);
-
-// for non-native table, property storage_handler should be retained
-retainer.add(META_TABLE_STORAGE);
-if (spec != null && spec.schemaProps() != null) {
-  retainer.addAll(Arrays.asList(spec.schemaProps()));
-}
-
-String paramsStr = HiveConf.getVar(context.getConf(), 
HiveConf.ConfVars.DDL_CTL_PARAMETERS_WHITELIST);
-if (paramsStr != null) {
-  retainer.addAll(Arrays.asList(paramsStr.split(",")));
-}
-
-Map params = tbl.getParameters();
-if (!retainer.isEmpty()) {
-  params.keySet().retainAll(retainer);
-} else {
-  params.clear();
-}
+//With Hive-25813, we'll not copy over table properties from the source.
+//CTLT should should copy column schema but not table properties. It is 
also consistent with other query engines like mysql, redshift.
+tbl.getParameters().clear();

Review Comment:
   I tried that but if do sp we will end up not copying createtabledesc's table 
properties.





Issue Time Tracking
---

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

> CREATE TABLE x LIKE storagehandler-based-source fails 
> --
>
> Key: HIVE-25813
> URL: https://issues.apache.org/jira/browse/HIVE-25813
> Project: Hive
>  Issue Type: Bug
>Reporter: Sai Hemanth Gantasala
>Assignee: Sai Hemanth Gantasala
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 2h 10m
>  Remaining Estimate: 0h
>
> {code:java}
> CREATE EXTERNAL TABLE default.dbs (
>   DB_IDbigint,
>   DB_LOCATION_URI  string,
>   NAME string,
>   OWNER_NAME   string,
>   OWNER_TYPE   string )
> STORED BY 'org.apache.hive.storage.jdbc.JdbcStorageHandler'
> TBLPROPERTIES (
>   'hive.sql.database.type' = 'MYSQL',
>   'hive.sql.jdbc.driver'   = 'com.mysql.jdbc.Driver',
>   'hive.sql.jdbc.url'  = 'jdbc:mysql://localhost:3306/hive1',
>   'hive.sql.dbcp.username' = 'hive1',
>   'hive.sql.dbcp.password' = 'cloudera',
>   'hive.sql.query' = 'SELECT DB_ID, DB_LOCATION_URI, NAME, OWNER_NAME, 
> OWNER_TYPE FROM DBS'
> );
> CREATE TABLE default.dbscopy LIKE default.dbs;
> Caused by: java.lang.NullPointerException
>   at 
> org.apache.hadoop.hive.metastore.HiveMetaStoreUtils.getFieldsFromDeserializer(HiveMetaStoreUtils.java:186)
>  {code}
> With this patch, we don't want to copy over the table properties or any other 
> physical properties (storage handler e.t.c) of the source table when CREATE 
> TABLE LIKE TABLE command is executed. Only table schema (logical properties) 
> should be copied. This implementation is consistent with other SQL engines 
> like Mysql, Redshift etc.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (HIVE-25813) CREATE TABLE x LIKE storagehandler-based-source fails

2022-10-20 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on HIVE-25813:
-

Author: ASF GitHub Bot
Created on: 20/Oct/22 09:28
Start Date: 20/Oct/22 09:28
Worklog Time Spent: 10m 
  Work Description: dengzhhu653 commented on code in PR #3627:
URL: https://github.com/apache/hive/pull/3627#discussion_r1000384972


##
ql/src/java/org/apache/hadoop/hive/ql/ddl/table/create/like/CreateTableLikeOperation.java:
##
@@ -157,27 +158,12 @@ private void setTableParameters(Table tbl) throws 
HiveException {
 }
 // We should copy only those table parameters that are specified in the 
config.
 SerDeSpec spec = AnnotationUtils.getAnnotation(serdeClass, 
SerDeSpec.class);
-
-// for non-native table, property storage_handler should be retained
-retainer.add(META_TABLE_STORAGE);
-if (spec != null && spec.schemaProps() != null) {
-  retainer.addAll(Arrays.asList(spec.schemaProps()));
-}
-
-String paramsStr = HiveConf.getVar(context.getConf(), 
HiveConf.ConfVars.DDL_CTL_PARAMETERS_WHITELIST);
-if (paramsStr != null) {
-  retainer.addAll(Arrays.asList(paramsStr.split(",")));
-}
-
-Map params = tbl.getParameters();
-if (!retainer.isEmpty()) {
-  params.keySet().retainAll(retainer);
-} else {
-  params.clear();
-}
+//With Hive-25813, we'll not copy over table properties from the source.
+//CTLT should should copy column schema but not table properties. It is 
also consistent with other query engines like mysql, redshift.
+tbl.getParameters().clear();

Review Comment:
   cloud we merge this with `createViewLikeTable`?  since both of them only 
copy over the `logical` properties.





Issue Time Tracking
---

Worklog Id: (was: 818730)
Time Spent: 2h  (was: 1h 50m)

> CREATE TABLE x LIKE storagehandler-based-source fails 
> --
>
> Key: HIVE-25813
> URL: https://issues.apache.org/jira/browse/HIVE-25813
> Project: Hive
>  Issue Type: Bug
>Reporter: Sai Hemanth Gantasala
>Assignee: Sai Hemanth Gantasala
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 2h
>  Remaining Estimate: 0h
>
> {code:java}
> CREATE EXTERNAL TABLE default.dbs (
>   DB_IDbigint,
>   DB_LOCATION_URI  string,
>   NAME string,
>   OWNER_NAME   string,
>   OWNER_TYPE   string )
> STORED BY 'org.apache.hive.storage.jdbc.JdbcStorageHandler'
> TBLPROPERTIES (
>   'hive.sql.database.type' = 'MYSQL',
>   'hive.sql.jdbc.driver'   = 'com.mysql.jdbc.Driver',
>   'hive.sql.jdbc.url'  = 'jdbc:mysql://localhost:3306/hive1',
>   'hive.sql.dbcp.username' = 'hive1',
>   'hive.sql.dbcp.password' = 'cloudera',
>   'hive.sql.query' = 'SELECT DB_ID, DB_LOCATION_URI, NAME, OWNER_NAME, 
> OWNER_TYPE FROM DBS'
> );
> CREATE TABLE default.dbscopy LIKE default.dbs;
> Caused by: java.lang.NullPointerException
>   at 
> org.apache.hadoop.hive.metastore.HiveMetaStoreUtils.getFieldsFromDeserializer(HiveMetaStoreUtils.java:186)
>  {code}
> With this patch, we don't want to copy over the table properties or any other 
> physical properties (storage handler e.t.c) of the source table when CREATE 
> TABLE LIKE TABLE command is executed. Only table schema (logical properties) 
> should be copied. This implementation is consistent with other SQL engines 
> like Mysql, Redshift etc.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (HIVE-25813) CREATE TABLE x LIKE storagehandler-based-source fails

2022-09-28 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on HIVE-25813:
-

Author: ASF GitHub Bot
Created on: 28/Sep/22 19:00
Start Date: 28/Sep/22 19:00
Worklog Time Spent: 10m 
  Work Description: saihemanth-cloudera commented on code in PR #3627:
URL: https://github.com/apache/hive/pull/3627#discussion_r982764300


##
ql/src/java/org/apache/hadoop/hive/ql/ddl/table/create/like/CreateTableLikeOperation.java:
##
@@ -157,27 +158,12 @@ private void setTableParameters(Table tbl) throws 
HiveException {
 }
 // We should copy only those table parameters that are specified in the 
config.
 SerDeSpec spec = AnnotationUtils.getAnnotation(serdeClass, 
SerDeSpec.class);
-
-// for non-native table, property storage_handler should be retained
-retainer.add(META_TABLE_STORAGE);
-if (spec != null && spec.schemaProps() != null) {
-  retainer.addAll(Arrays.asList(spec.schemaProps()));
-}
-
-String paramsStr = HiveConf.getVar(context.getConf(), 
HiveConf.ConfVars.DDL_CTL_PARAMETERS_WHITELIST);
-if (paramsStr != null) {
-  retainer.addAll(Arrays.asList(paramsStr.split(",")));
-}
-
-Map params = tbl.getParameters();
-if (!retainer.isEmpty()) {
-  params.keySet().retainAll(retainer);
-} else {
-  params.clear();
-}
+//With Hive-25813, we'll not copy over table properties from the source.
+//CTLT should should copy column schema but not table properties. It is 
also consistent with other query engines like mysql, redshift.
+tbl.getParameters().clear();

Review Comment:
   Yeah, that is true. Going forward we don't want to copy over the physical 
properties like table parameters in CTLT command. This implementation is inline 
with other SQL engines like Mysql, Redshift e.t.c.
   Given that user can still have same tbl properties as that of source table 
by explicitly specifiying the TBL PROPERTIES(). Eg:  
https://github.com/apache/hive/pull/3627/files#diff-fac39ae652bb8a3e42e189a4efec47b5184ebbb4b7db52ce489dfc343844fd91R11





Issue Time Tracking
---

Worklog Id: (was: 813094)
Time Spent: 1h 50m  (was: 1h 40m)

> CREATE TABLE x LIKE storagehandler-based-source fails 
> --
>
> Key: HIVE-25813
> URL: https://issues.apache.org/jira/browse/HIVE-25813
> Project: Hive
>  Issue Type: Bug
>Reporter: Sai Hemanth Gantasala
>Assignee: Sai Hemanth Gantasala
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 1h 50m
>  Remaining Estimate: 0h
>
> {code:java}
> CREATE EXTERNAL TABLE default.dbs (
>   DB_IDbigint,
>   DB_LOCATION_URI  string,
>   NAME string,
>   OWNER_NAME   string,
>   OWNER_TYPE   string )
> STORED BY 'org.apache.hive.storage.jdbc.JdbcStorageHandler'
> TBLPROPERTIES (
>   'hive.sql.database.type' = 'MYSQL',
>   'hive.sql.jdbc.driver'   = 'com.mysql.jdbc.Driver',
>   'hive.sql.jdbc.url'  = 'jdbc:mysql://localhost:3306/hive1',
>   'hive.sql.dbcp.username' = 'hive1',
>   'hive.sql.dbcp.password' = 'cloudera',
>   'hive.sql.query' = 'SELECT DB_ID, DB_LOCATION_URI, NAME, OWNER_NAME, 
> OWNER_TYPE FROM DBS'
> );
> CREATE TABLE default.dbscopy LIKE default.dbs;
> Caused by: java.lang.NullPointerException
>   at 
> org.apache.hadoop.hive.metastore.HiveMetaStoreUtils.getFieldsFromDeserializer(HiveMetaStoreUtils.java:186)
>  {code}
> With this patch, we don't want to copy over the table properties or any other 
> physical properties (storage handler e.t.c) of the source table when CREATE 
> TABLE LIKE TABLE command is executed. Only table schema (logical properties) 
> should be copied. This implementation is consistent with other SQL engines 
> like Mysql, Redshift etc.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (HIVE-25813) CREATE TABLE x LIKE storagehandler-based-source fails

2022-09-27 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on HIVE-25813:
-

Author: ASF GitHub Bot
Created on: 28/Sep/22 06:43
Start Date: 28/Sep/22 06:43
Worklog Time Spent: 10m 
  Work Description: dengzhhu653 commented on code in PR #3627:
URL: https://github.com/apache/hive/pull/3627#discussion_r982004642


##
ql/src/java/org/apache/hadoop/hive/ql/ddl/table/create/like/CreateTableLikeOperation.java:
##
@@ -157,27 +158,12 @@ private void setTableParameters(Table tbl) throws 
HiveException {
 }
 // We should copy only those table parameters that are specified in the 
config.
 SerDeSpec spec = AnnotationUtils.getAnnotation(serdeClass, 
SerDeSpec.class);
-
-// for non-native table, property storage_handler should be retained
-retainer.add(META_TABLE_STORAGE);
-if (spec != null && spec.schemaProps() != null) {
-  retainer.addAll(Arrays.asList(spec.schemaProps()));
-}
-
-String paramsStr = HiveConf.getVar(context.getConf(), 
HiveConf.ConfVars.DDL_CTL_PARAMETERS_WHITELIST);
-if (paramsStr != null) {
-  retainer.addAll(Arrays.asList(paramsStr.split(",")));
-}
-
-Map params = tbl.getParameters();
-if (!retainer.isEmpty()) {
-  params.keySet().retainAll(retainer);
-} else {
-  params.clear();
-}
+//With Hive-25813, we'll not copy over table properties from the source.
+//CTLT should should copy column schema but not table properties. It is 
also consistent with other query engines like mysql, redshift.
+tbl.getParameters().clear();

Review Comment:
   I'm wondering this would introduce incompatibility, such as discovery 
partitions, compression etc.
   There is also a property `hive.ddl.createtablelike.properties.whitelist`, 
which select the table Properties to copy over in this case.





Issue Time Tracking
---

Worklog Id: (was: 812759)
Time Spent: 1h 40m  (was: 1.5h)

> CREATE TABLE x LIKE storagehandler-based-source fails 
> --
>
> Key: HIVE-25813
> URL: https://issues.apache.org/jira/browse/HIVE-25813
> Project: Hive
>  Issue Type: Bug
>Reporter: Sai Hemanth Gantasala
>Assignee: Sai Hemanth Gantasala
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 1h 40m
>  Remaining Estimate: 0h
>
> {code:java}
> CREATE EXTERNAL TABLE default.dbs (
>   DB_IDbigint,
>   DB_LOCATION_URI  string,
>   NAME string,
>   OWNER_NAME   string,
>   OWNER_TYPE   string )
> STORED BY 'org.apache.hive.storage.jdbc.JdbcStorageHandler'
> TBLPROPERTIES (
>   'hive.sql.database.type' = 'MYSQL',
>   'hive.sql.jdbc.driver'   = 'com.mysql.jdbc.Driver',
>   'hive.sql.jdbc.url'  = 'jdbc:mysql://localhost:3306/hive1',
>   'hive.sql.dbcp.username' = 'hive1',
>   'hive.sql.dbcp.password' = 'cloudera',
>   'hive.sql.query' = 'SELECT DB_ID, DB_LOCATION_URI, NAME, OWNER_NAME, 
> OWNER_TYPE FROM DBS'
> );
> CREATE TABLE default.dbscopy LIKE default.dbs;
> Caused by: java.lang.NullPointerException
>   at 
> org.apache.hadoop.hive.metastore.HiveMetaStoreUtils.getFieldsFromDeserializer(HiveMetaStoreUtils.java:186)
>  {code}
> With this patch, we don't want to copy over the table properties or any other 
> physical properties (storage handler e.t.c) of the source table when CREATE 
> TABLE LIKE TABLE command is executed. Only table schema (logical properties) 
> should be copied. This implementation is consistent with other SQL engines 
> like Mysql, Redshift etc.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (HIVE-25813) CREATE TABLE x LIKE storagehandler-based-source fails

2022-09-27 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on HIVE-25813:
-

Author: ASF GitHub Bot
Created on: 28/Sep/22 05:53
Start Date: 28/Sep/22 05:53
Worklog Time Spent: 10m 
  Work Description: saihemanth-cloudera commented on PR #3627:
URL: https://github.com/apache/hive/pull/3627#issuecomment-1260421969

   @dengzhhu653 Can you please review this patch?




Issue Time Tracking
---

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

> CREATE TABLE x LIKE storagehandler-based-source fails 
> --
>
> Key: HIVE-25813
> URL: https://issues.apache.org/jira/browse/HIVE-25813
> Project: Hive
>  Issue Type: Bug
>Reporter: Sai Hemanth Gantasala
>Assignee: Sai Hemanth Gantasala
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> {code:java}
> CREATE EXTERNAL TABLE default.dbs (
>   DB_IDbigint,
>   DB_LOCATION_URI  string,
>   NAME string,
>   OWNER_NAME   string,
>   OWNER_TYPE   string )
> STORED BY 'org.apache.hive.storage.jdbc.JdbcStorageHandler'
> TBLPROPERTIES (
>   'hive.sql.database.type' = 'MYSQL',
>   'hive.sql.jdbc.driver'   = 'com.mysql.jdbc.Driver',
>   'hive.sql.jdbc.url'  = 'jdbc:mysql://localhost:3306/hive1',
>   'hive.sql.dbcp.username' = 'hive1',
>   'hive.sql.dbcp.password' = 'cloudera',
>   'hive.sql.query' = 'SELECT DB_ID, DB_LOCATION_URI, NAME, OWNER_NAME, 
> OWNER_TYPE FROM DBS'
> );
> CREATE TABLE default.dbscopy LIKE default.dbs;
> Caused by: java.lang.NullPointerException
>   at 
> org.apache.hadoop.hive.metastore.HiveMetaStoreUtils.getFieldsFromDeserializer(HiveMetaStoreUtils.java:186)
>  {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (HIVE-25813) CREATE TABLE x LIKE storagehandler-based-source fails

2022-09-27 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on HIVE-25813:
-

Author: ASF GitHub Bot
Created on: 28/Sep/22 01:31
Start Date: 28/Sep/22 01:31
Worklog Time Spent: 10m 
  Work Description: sonarcloud[bot] commented on PR #3627:
URL: https://github.com/apache/hive/pull/3627#issuecomment-1260277282

   Kudos, SonarCloud Quality Gate passed!    [![Quality Gate 
passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png
 'Quality Gate 
passed')](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=3627)
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3627&resolved=false&types=BUG)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3627&resolved=false&types=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3627&resolved=false&types=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3627&resolved=false&types=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3627&resolved=false&types=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3627&resolved=false&types=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=3627&resolved=false&types=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=3627&resolved=false&types=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=3627&resolved=false&types=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3627&resolved=false&types=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3627&resolved=false&types=CODE_SMELL)
 [16 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3627&resolved=false&types=CODE_SMELL)
   
   [![No Coverage 
information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo-16px.png
 'No Coverage 
information')](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=3627&metric=coverage&view=list)
 No Coverage information  
   [![No Duplication 
information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/NoDuplicationInfo-16px.png
 'No Duplication 
information')](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=3627&metric=duplicated_lines_density&view=list)
 No Duplication information
   
   




Issue Time Tracking
---

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

> CREATE TABLE x LIKE storagehandler-based-source fails 
> --
>
> Key: HIVE-25813
> URL: https://issues.apache.org/jira/browse/HIVE-25813
> Project: Hive
>  Issue Type: Bug
>Reporter: Sai Hemanth Gantasala
>Assignee: Sai Hemanth Gantasala
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> {code:java}
> CREATE EXTERNAL TABLE default.dbs (
>   DB_IDbigint,
>   DB_LOCATION_URI  string,
>   NAME string,
>   OWNER_NAME   string,
>   OWNER_TYPE   string )
> STORED BY 'org.apache.hive.storage.jdbc.JdbcStorageHandler'
> TBLPROPERTIES (
>   'hive.sql.database.type' = 'MYSQL',
>   'hive.sql.jdbc.driver'   = 'com.mysql.jdbc.Driver',
>   'hive.sql.jdbc.url'  = 'jdbc:mysql://localhost:3306/hive1',
>   'hive.sql.dbcp.username' = 'hive1',
>   'hive.sql.dbcp.password' = 'cloudera',
>   'hive.sql.query' = 'SELECT DB_ID, DB_LOCATION_URI, NAME, OWNER_NA

[jira] [Work logged] (HIVE-25813) CREATE TABLE x LIKE storagehandler-based-source fails

2022-07-26 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on HIVE-25813:
-

Author: ASF GitHub Bot
Created on: 27/Jul/22 00:25
Start Date: 27/Jul/22 00:25
Worklog Time Spent: 10m 
  Work Description: github-actions[bot] closed pull request #3301: 
HIVE-25813: Create Table x Like commands based storage handlers fail …
URL: https://github.com/apache/hive/pull/3301




Issue Time Tracking
---

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

> CREATE TABLE x LIKE storagehandler-based-source fails 
> --
>
> Key: HIVE-25813
> URL: https://issues.apache.org/jira/browse/HIVE-25813
> Project: Hive
>  Issue Type: Bug
>Reporter: Sai Hemanth Gantasala
>Assignee: Sai Hemanth Gantasala
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> {code:java}
> CREATE EXTERNAL TABLE default.dbs (
>   DB_IDbigint,
>   DB_LOCATION_URI  string,
>   NAME string,
>   OWNER_NAME   string,
>   OWNER_TYPE   string )
> STORED BY 'org.apache.hive.storage.jdbc.JdbcStorageHandler'
> TBLPROPERTIES (
>   'hive.sql.database.type' = 'MYSQL',
>   'hive.sql.jdbc.driver'   = 'com.mysql.jdbc.Driver',
>   'hive.sql.jdbc.url'  = 'jdbc:mysql://localhost:3306/hive1',
>   'hive.sql.dbcp.username' = 'hive1',
>   'hive.sql.dbcp.password' = 'cloudera',
>   'hive.sql.query' = 'SELECT DB_ID, DB_LOCATION_URI, NAME, OWNER_NAME, 
> OWNER_TYPE FROM DBS'
> );
> CREATE TABLE default.dbscopy LIKE default.dbs;
> Caused by: java.lang.NullPointerException
>   at 
> org.apache.hadoop.hive.metastore.HiveMetaStoreUtils.getFieldsFromDeserializer(HiveMetaStoreUtils.java:186)
>  {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (HIVE-25813) CREATE TABLE x LIKE storagehandler-based-source fails

2022-07-19 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on HIVE-25813:
-

Author: ASF GitHub Bot
Created on: 20/Jul/22 00:19
Start Date: 20/Jul/22 00:19
Worklog Time Spent: 10m 
  Work Description: github-actions[bot] commented on PR #3301:
URL: https://github.com/apache/hive/pull/3301#issuecomment-1189670595

   This pull request has been automatically marked as stale because it has not 
had recent activity. It will be closed if no further activity occurs.
   Feel free to reach out on the d...@hive.apache.org list if the patch is in 
need of reviews.




Issue Time Tracking
---

Worklog Id: (was: 792967)
Time Spent: 1h  (was: 50m)

> CREATE TABLE x LIKE storagehandler-based-source fails 
> --
>
> Key: HIVE-25813
> URL: https://issues.apache.org/jira/browse/HIVE-25813
> Project: Hive
>  Issue Type: Bug
>Reporter: Sai Hemanth Gantasala
>Assignee: Sai Hemanth Gantasala
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 1h
>  Remaining Estimate: 0h
>
> {code:java}
> CREATE EXTERNAL TABLE default.dbs (
>   DB_IDbigint,
>   DB_LOCATION_URI  string,
>   NAME string,
>   OWNER_NAME   string,
>   OWNER_TYPE   string )
> STORED BY 'org.apache.hive.storage.jdbc.JdbcStorageHandler'
> TBLPROPERTIES (
>   'hive.sql.database.type' = 'MYSQL',
>   'hive.sql.jdbc.driver'   = 'com.mysql.jdbc.Driver',
>   'hive.sql.jdbc.url'  = 'jdbc:mysql://localhost:3306/hive1',
>   'hive.sql.dbcp.username' = 'hive1',
>   'hive.sql.dbcp.password' = 'cloudera',
>   'hive.sql.query' = 'SELECT DB_ID, DB_LOCATION_URI, NAME, OWNER_NAME, 
> OWNER_TYPE FROM DBS'
> );
> CREATE TABLE default.dbscopy LIKE default.dbs;
> Caused by: java.lang.NullPointerException
>   at 
> org.apache.hadoop.hive.metastore.HiveMetaStoreUtils.getFieldsFromDeserializer(HiveMetaStoreUtils.java:186)
>  {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (HIVE-25813) CREATE TABLE x LIKE storagehandler-based-source fails

2022-05-19 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on HIVE-25813:
-

Author: ASF GitHub Bot
Created on: 20/May/22 05:55
Start Date: 20/May/22 05:55
Worklog Time Spent: 10m 
  Work Description: saihemanth-cloudera opened a new pull request, #3301:
URL: https://github.com/apache/hive/pull/3301

   …over is fixed
   
   
   
   ### What changes were proposed in this pull request?
   CTLT commands based on external tables will not copy over table properties 
of the source table.
   
   
   
   ### Why are the changes needed?
   Because it is consistent with other Query engines like MySql and Redshift.
   
   
   
   ### Does this PR introduce _any_ user-facing change?
   Yes, When users execute CREATE TABLE  x LIKE command, we'll no more copy the 
table properties of source table to the destination table, we'll only copy the 
table/column schema of the source table.
   
   
   
   ### How was this patch tested?
   Local machine, Unit tests
   
   




Issue Time Tracking
---

Worklog Id: (was: 772672)
Time Spent: 50m  (was: 40m)

> CREATE TABLE x LIKE storagehandler-based-source fails 
> --
>
> Key: HIVE-25813
> URL: https://issues.apache.org/jira/browse/HIVE-25813
> Project: Hive
>  Issue Type: Bug
>Reporter: Sai Hemanth Gantasala
>Assignee: Sai Hemanth Gantasala
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 50m
>  Remaining Estimate: 0h
>
> {code:java}
> CREATE EXTERNAL TABLE default.dbs (
>   DB_IDbigint,
>   DB_LOCATION_URI  string,
>   NAME string,
>   OWNER_NAME   string,
>   OWNER_TYPE   string )
> STORED BY 'org.apache.hive.storage.jdbc.JdbcStorageHandler'
> TBLPROPERTIES (
>   'hive.sql.database.type' = 'MYSQL',
>   'hive.sql.jdbc.driver'   = 'com.mysql.jdbc.Driver',
>   'hive.sql.jdbc.url'  = 'jdbc:mysql://localhost:3306/hive1',
>   'hive.sql.dbcp.username' = 'hive1',
>   'hive.sql.dbcp.password' = 'cloudera',
>   'hive.sql.query' = 'SELECT DB_ID, DB_LOCATION_URI, NAME, OWNER_NAME, 
> OWNER_TYPE FROM DBS'
> );
> CREATE TABLE default.dbscopy LIKE default.dbs;
> Caused by: java.lang.NullPointerException
>   at 
> org.apache.hadoop.hive.metastore.HiveMetaStoreUtils.getFieldsFromDeserializer(HiveMetaStoreUtils.java:186)
>  {code}



--
This message was sent by Atlassian Jira
(v8.20.7#820007)


[jira] [Work logged] (HIVE-25813) CREATE TABLE x LIKE storagehandler-based-source fails

2022-04-05 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on HIVE-25813:
-

Author: ASF GitHub Bot
Created on: 06/Apr/22 06:39
Start Date: 06/Apr/22 06:39
Worklog Time Spent: 10m 
  Work Description: saihemanth-cloudera closed pull request #2884: 
HIVE-25813: CTLT query on JDBCStorageHandler fails with Null exception
URL: https://github.com/apache/hive/pull/2884




Issue Time Tracking
---

Worklog Id: (was: 753209)
Time Spent: 40m  (was: 0.5h)

> CREATE TABLE x LIKE storagehandler-based-source fails 
> --
>
> Key: HIVE-25813
> URL: https://issues.apache.org/jira/browse/HIVE-25813
> Project: Hive
>  Issue Type: Bug
>Reporter: Sai Hemanth Gantasala
>Assignee: Sai Hemanth Gantasala
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> {code:java}
> CREATE EXTERNAL TABLE default.dbs (
>   DB_IDbigint,
>   DB_LOCATION_URI  string,
>   NAME string,
>   OWNER_NAME   string,
>   OWNER_TYPE   string )
> STORED BY 'org.apache.hive.storage.jdbc.JdbcStorageHandler'
> TBLPROPERTIES (
>   'hive.sql.database.type' = 'MYSQL',
>   'hive.sql.jdbc.driver'   = 'com.mysql.jdbc.Driver',
>   'hive.sql.jdbc.url'  = 'jdbc:mysql://localhost:3306/hive1',
>   'hive.sql.dbcp.username' = 'hive1',
>   'hive.sql.dbcp.password' = 'cloudera',
>   'hive.sql.query' = 'SELECT DB_ID, DB_LOCATION_URI, NAME, OWNER_NAME, 
> OWNER_TYPE FROM DBS'
> );
> CREATE TABLE default.dbscopy LIKE default.dbs;
> Caused by: java.lang.NullPointerException
>   at 
> org.apache.hadoop.hive.metastore.HiveMetaStoreUtils.getFieldsFromDeserializer(HiveMetaStoreUtils.java:186)
>  {code}



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


[jira] [Work logged] (HIVE-25813) CREATE TABLE x LIKE storagehandler-based-source fails

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


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

ASF GitHub Bot logged work on HIVE-25813:
-

Author: ASF GitHub Bot
Created on: 04/Apr/22 00:17
Start Date: 04/Apr/22 00:17
Worklog Time Spent: 10m 
  Work Description: github-actions[bot] commented on PR #2884:
URL: https://github.com/apache/hive/pull/2884#issuecomment-1086983610

   This pull request has been automatically marked as stale because it has not 
had recent activity. It will be closed if no further activity occurs.
   Feel free to reach out on the d...@hive.apache.org list if the patch is in 
need of reviews.




Issue Time Tracking
---

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

> CREATE TABLE x LIKE storagehandler-based-source fails 
> --
>
> Key: HIVE-25813
> URL: https://issues.apache.org/jira/browse/HIVE-25813
> Project: Hive
>  Issue Type: Bug
>Reporter: Sai Hemanth Gantasala
>Assignee: Sai Hemanth Gantasala
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> {code:java}
> CREATE EXTERNAL TABLE default.dbs (
>   DB_IDbigint,
>   DB_LOCATION_URI  string,
>   NAME string,
>   OWNER_NAME   string,
>   OWNER_TYPE   string )
> STORED BY 'org.apache.hive.storage.jdbc.JdbcStorageHandler'
> TBLPROPERTIES (
>   'hive.sql.database.type' = 'MYSQL',
>   'hive.sql.jdbc.driver'   = 'com.mysql.jdbc.Driver',
>   'hive.sql.jdbc.url'  = 'jdbc:mysql://localhost:3306/hive1',
>   'hive.sql.dbcp.username' = 'hive1',
>   'hive.sql.dbcp.password' = 'cloudera',
>   'hive.sql.query' = 'SELECT DB_ID, DB_LOCATION_URI, NAME, OWNER_NAME, 
> OWNER_TYPE FROM DBS'
> );
> CREATE TABLE default.dbscopy LIKE default.dbs;
> Caused by: java.lang.NullPointerException
>   at 
> org.apache.hadoop.hive.metastore.HiveMetaStoreUtils.getFieldsFromDeserializer(HiveMetaStoreUtils.java:186)
>  {code}



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


[jira] [Work logged] (HIVE-25813) CREATE TABLE x LIKE storagehandler-based-source fails

2021-12-21 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on HIVE-25813:
-

Author: ASF GitHub Bot
Created on: 22/Dec/21 05:29
Start Date: 22/Dec/21 05:29
Worklog Time Spent: 10m 
  Work Description: shameersss1 commented on pull request #2884:
URL: https://github.com/apache/hive/pull/2884#issuecomment-999298411


   Can we add qtest to validate the same?


-- 
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: 699804)
Time Spent: 20m  (was: 10m)

> CREATE TABLE x LIKE storagehandler-based-source fails 
> --
>
> Key: HIVE-25813
> URL: https://issues.apache.org/jira/browse/HIVE-25813
> Project: Hive
>  Issue Type: Bug
>Reporter: Sai Hemanth Gantasala
>Assignee: Sai Hemanth Gantasala
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> {code:java}
> CREATE EXTERNAL TABLE default.dbs (
>   DB_IDbigint,
>   DB_LOCATION_URI  string,
>   NAME string,
>   OWNER_NAME   string,
>   OWNER_TYPE   string )
> STORED BY 'org.apache.hive.storage.jdbc.JdbcStorageHandler'
> TBLPROPERTIES (
>   'hive.sql.database.type' = 'MYSQL',
>   'hive.sql.jdbc.driver'   = 'com.mysql.jdbc.Driver',
>   'hive.sql.jdbc.url'  = 'jdbc:mysql://localhost:3306/hive1',
>   'hive.sql.dbcp.username' = 'hive1',
>   'hive.sql.dbcp.password' = 'cloudera',
>   'hive.sql.query' = 'SELECT DB_ID, DB_LOCATION_URI, NAME, OWNER_NAME, 
> OWNER_TYPE FROM DBS'
> );
> CREATE TABLE default.dbscopy LIKE default.dbs;
> Caused by: java.lang.NullPointerException
>   at 
> org.apache.hadoop.hive.metastore.HiveMetaStoreUtils.getFieldsFromDeserializer(HiveMetaStoreUtils.java:186)
>  {code}



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


[jira] [Work logged] (HIVE-25813) CREATE TABLE x LIKE storagehandler-based-source fails

2021-12-15 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on HIVE-25813:
-

Author: ASF GitHub Bot
Created on: 16/Dec/21 01:18
Start Date: 16/Dec/21 01:18
Worklog Time Spent: 10m 
  Work Description: saihemanth-cloudera opened a new pull request #2884:
URL: https://github.com/apache/hive/pull/2884


   
   
   ### What changes were proposed in this pull request?
   Fixed the null pointer exception for CTLT operation.
   
   
   
   ### Why are the changes needed?
   Otherwise, CTLT operation based on JDBC storage handler is failing
   
   
   
   ### Does this PR introduce _any_ user-facing change?
   No
   
   
   
   ### How was this patch tested?
   Local machine, Remote cluster
   
   


-- 
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: 696996)
Remaining Estimate: 0h
Time Spent: 10m

> CREATE TABLE x LIKE storagehandler-based-source fails 
> --
>
> Key: HIVE-25813
> URL: https://issues.apache.org/jira/browse/HIVE-25813
> Project: Hive
>  Issue Type: Bug
>Reporter: Sai Hemanth Gantasala
>Assignee: Sai Hemanth Gantasala
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> {code:java}
> CREATE EXTERNAL TABLE default.dbs (
>   DB_IDbigint,
>   DB_LOCATION_URI  string,
>   NAME string,
>   OWNER_NAME   string,
>   OWNER_TYPE   string )
> STORED BY 'org.apache.hive.storage.jdbc.JdbcStorageHandler'
> TBLPROPERTIES (
>   'hive.sql.database.type' = 'MYSQL',
>   'hive.sql.jdbc.driver'   = 'com.mysql.jdbc.Driver',
>   'hive.sql.jdbc.url'  = 'jdbc:mysql://localhost:3306/hive1',
>   'hive.sql.dbcp.username' = 'hive1',
>   'hive.sql.dbcp.password' = 'cloudera',
>   'hive.sql.query' = 'SELECT DB_ID, DB_LOCATION_URI, NAME, OWNER_NAME, 
> OWNER_TYPE FROM DBS'
> );
> CREATE TABLE default.dbscopy LIKE default.dbs;
> Caused by: java.lang.NullPointerException
>   at 
> org.apache.hadoop.hive.metastore.HiveMetaStoreUtils.getFieldsFromDeserializer(HiveMetaStoreUtils.java:186)
>  {code}



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