[jira] [Updated] (HIVE-28208) WITH column list doesn't work with CTE materialization

2024-05-02 Thread Shohei Okumiya (Jira)


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

Shohei Okumiya updated HIVE-28208:
--
Status: Patch Available  (was: Open)

> WITH column list doesn't work with CTE materialization
> --
>
> Key: HIVE-28208
> URL: https://issues.apache.org/jira/browse/HIVE-28208
> Project: Hive
>  Issue Type: Bug
>  Components: Query Planning
>Affects Versions: 4.0.0
>Reporter: Shohei Okumiya
>Assignee: Shohei Okumiya
>Priority: Major
>  Labels: pull-request-available
>
> I found materialized CTEs with column labels don't work as expected.
> {code:java}
> create table src (key string, value string);
> -- Without materialization
> with q1(srcKey, srcValue) as (select key, value from src where key= '5')
> select a.srcKey
> from q1 a join q1 b
> on a.srcKey=b.srcKey;
> +---+
> | a.srckey  |
> +---+
> +---+
> -- With materialization
> set hive.optimize.cte.materialize.threshold=2;
> set hive.optimize.cte.materialize.full.aggregate.only=false;
> with q1(srcKey, srcValue) as (select key, value from src where key= '5')
> select a.srcKey
> from q1 a join q1 b
> on a.srcKey=b.srcKey;
> Error: Error while compiling statement: FAILED: SemanticException [Error 
> 10002]: Line 4:5 Invalid column reference 'srcKey' (state=42000,code=10002) 
> {code}
> This is the stack trace on HiveServer2.
> {code:java}
> Caused by: org.apache.hadoop.hive.ql.parse.SemanticException: Line 4:5 
> Invalid column reference 'srcKey'
>     at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner.genAllRexNode(CalcitePlanner.java:5435)
>  ~[hive-exec-4.1.0-SNAPSHOT.jar:4.1.0-SNAPSHOT]
>     at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner.access$800(CalcitePlanner.java:361)
>  ~[hive-exec-4.1.0-SNAPSHOT.jar:4.1.0-SNAPSHOT]
>     at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.genJoinRelNode(CalcitePlanner.java:2658)
>  ~[hive-exec-4.1.0-SNAPSHOT.jar:4.1.0-SNAPSHOT]
>     at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.genJoinLogicalPlan(CalcitePlanner.java:2892)
>  ~[hive-exec-4.1.0-SNAPSHOT.jar:4.1.0-SNAPSHOT]
>     at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.genLogicalPlan(CalcitePlanner.java:5052)
>  ~[hive-exec-4.1.0-SNAPSHOT.jar:4.1.0-SNAPSHOT]
>     at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.apply(CalcitePlanner.java:1629)
>  ~[hive-exec-4.1.0-SNAPSHOT.jar:4.1.0-SNAPSHOT]
>     at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.apply(CalcitePlanner.java:1572)
>  ~[hive-exec-4.1.0-SNAPSHOT.jar:4.1.0-SNAPSHOT]
>     at 
> org.apache.calcite.tools.Frameworks.lambda$withPlanner$0(Frameworks.java:131) 
> ~[hive-exec-4.1.0-SNAPSHOT.jar:4.1.0-SNAPSHOT]
>     at 
> org.apache.calcite.prepare.CalcitePrepareImpl.perform(CalcitePrepareImpl.java:914)
>  ~[hive-exec-4.1.0-SNAPSHOT.jar:4.1.0-SNAPSHOT]
>     at org.apache.calcite.tools.Frameworks.withPrepare(Frameworks.java:180) 
> ~[hive-exec-4.1.0-SNAPSHOT.jar:4.1.0-SNAPSHOT]
>     at org.apache.calcite.tools.Frameworks.withPlanner(Frameworks.java:126) 
> ~[hive-exec-4.1.0-SNAPSHOT.jar:4.1.0-SNAPSHOT]
>     at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner.logicalPlan(CalcitePlanner.java:1324)
>  ~[hive-exec-4.1.0-SNAPSHOT.jar:4.1.0-SNAPSHOT]
>     at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner.genOPTree(CalcitePlanner.java:572)
>  ~[hive-exec-4.1.0-SNAPSHOT.jar:4.1.0-SNAPSHOT]
>     at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:13178)
>  ~[hive-exec-4.1.0-SNAPSHOT.jar:4.1.0-SNAPSHOT] {code}



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


[jira] [Updated] (HIVE-28209) Allow Proxy Users in Hive Metastore Client

2024-05-02 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot updated HIVE-28209:
--
Labels: pull-request-available  (was: )

> Allow Proxy Users in Hive Metastore Client
> --
>
> Key: HIVE-28209
> URL: https://issues.apache.org/jira/browse/HIVE-28209
> Project: Hive
>  Issue Type: Improvement
>  Components: Metastore
>Reporter: Steve Vaughan
>Assignee: Steve Vaughan
>Priority: Minor
>  Labels: pull-request-available
>
> We should allow proxy users in the Hive Metastore client.  Proxy user 
> impersonation should work for Hive just as it is working for HDFS
> Currently the client uses
> {code:java}
> UserGroupInformation.getLoginUser().getRealUser().doAs{code}
> which results in a NullPointerException when a proxy user is used, as 
> `getRealUser()` returns `null`. 
>  
> Allowing the current user to only requires dropping `getRealUser()` for the 
> `doAs()`. foo 
> {code:java}
> UserGroupInformation.getLoginUser().doAs{code}
>  



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


[jira] [Updated] (HIVE-28208) WITH column list doesn't work with CTE materialization

2024-05-02 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot updated HIVE-28208:
--
Labels: pull-request-available  (was: )

> WITH column list doesn't work with CTE materialization
> --
>
> Key: HIVE-28208
> URL: https://issues.apache.org/jira/browse/HIVE-28208
> Project: Hive
>  Issue Type: Bug
>  Components: Query Planning
>Affects Versions: 4.0.0
>Reporter: Shohei Okumiya
>Assignee: Shohei Okumiya
>Priority: Major
>  Labels: pull-request-available
>
> I found materialized CTEs with column labels don't work as expected.
> {code:java}
> create table src (key string, value string);
> -- Without materialization
> with q1(srcKey, srcValue) as (select key, value from src where key= '5')
> select a.srcKey
> from q1 a join q1 b
> on a.srcKey=b.srcKey;
> +---+
> | a.srckey  |
> +---+
> +---+
> -- With materialization
> set hive.optimize.cte.materialize.threshold=2;
> set hive.optimize.cte.materialize.full.aggregate.only=false;
> with q1(srcKey, srcValue) as (select key, value from src where key= '5')
> select a.srcKey
> from q1 a join q1 b
> on a.srcKey=b.srcKey;
> Error: Error while compiling statement: FAILED: SemanticException [Error 
> 10002]: Line 4:5 Invalid column reference 'srcKey' (state=42000,code=10002) 
> {code}
> This is the stack trace on HiveServer2.
> {code:java}
> Caused by: org.apache.hadoop.hive.ql.parse.SemanticException: Line 4:5 
> Invalid column reference 'srcKey'
>     at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner.genAllRexNode(CalcitePlanner.java:5435)
>  ~[hive-exec-4.1.0-SNAPSHOT.jar:4.1.0-SNAPSHOT]
>     at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner.access$800(CalcitePlanner.java:361)
>  ~[hive-exec-4.1.0-SNAPSHOT.jar:4.1.0-SNAPSHOT]
>     at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.genJoinRelNode(CalcitePlanner.java:2658)
>  ~[hive-exec-4.1.0-SNAPSHOT.jar:4.1.0-SNAPSHOT]
>     at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.genJoinLogicalPlan(CalcitePlanner.java:2892)
>  ~[hive-exec-4.1.0-SNAPSHOT.jar:4.1.0-SNAPSHOT]
>     at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.genLogicalPlan(CalcitePlanner.java:5052)
>  ~[hive-exec-4.1.0-SNAPSHOT.jar:4.1.0-SNAPSHOT]
>     at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.apply(CalcitePlanner.java:1629)
>  ~[hive-exec-4.1.0-SNAPSHOT.jar:4.1.0-SNAPSHOT]
>     at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner$CalcitePlannerAction.apply(CalcitePlanner.java:1572)
>  ~[hive-exec-4.1.0-SNAPSHOT.jar:4.1.0-SNAPSHOT]
>     at 
> org.apache.calcite.tools.Frameworks.lambda$withPlanner$0(Frameworks.java:131) 
> ~[hive-exec-4.1.0-SNAPSHOT.jar:4.1.0-SNAPSHOT]
>     at 
> org.apache.calcite.prepare.CalcitePrepareImpl.perform(CalcitePrepareImpl.java:914)
>  ~[hive-exec-4.1.0-SNAPSHOT.jar:4.1.0-SNAPSHOT]
>     at org.apache.calcite.tools.Frameworks.withPrepare(Frameworks.java:180) 
> ~[hive-exec-4.1.0-SNAPSHOT.jar:4.1.0-SNAPSHOT]
>     at org.apache.calcite.tools.Frameworks.withPlanner(Frameworks.java:126) 
> ~[hive-exec-4.1.0-SNAPSHOT.jar:4.1.0-SNAPSHOT]
>     at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner.logicalPlan(CalcitePlanner.java:1324)
>  ~[hive-exec-4.1.0-SNAPSHOT.jar:4.1.0-SNAPSHOT]
>     at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner.genOPTree(CalcitePlanner.java:572)
>  ~[hive-exec-4.1.0-SNAPSHOT.jar:4.1.0-SNAPSHOT]
>     at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:13178)
>  ~[hive-exec-4.1.0-SNAPSHOT.jar:4.1.0-SNAPSHOT] {code}



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


[jira] [Updated] (HIVE-28230) Query Plan Cache

2024-05-02 Thread Ramesh Kumar Thangarajan (Jira)


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

Ramesh Kumar Thangarajan updated HIVE-28230:

Attachment: Query Plan Cache.docx

> Query Plan Cache
> 
>
> Key: HIVE-28230
> URL: https://issues.apache.org/jira/browse/HIVE-28230
> Project: Hive
>  Issue Type: New Feature
>Reporter: Ramesh Kumar Thangarajan
>Assignee: Ramesh Kumar Thangarajan
>Priority: Major
> Attachments: Query Plan Cache.docx
>
>




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


[jira] [Updated] (HIVE-28215) Signalling CONDITION HANDLER is not working in HPLSQL.

2024-05-02 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot updated HIVE-28215:
--
Labels: pull-request-available  (was: )

> Signalling CONDITION HANDLER is not working in HPLSQL.
> --
>
> Key: HIVE-28215
> URL: https://issues.apache.org/jira/browse/HIVE-28215
> Project: Hive
>  Issue Type: Bug
>  Components: hpl/sql
>Reporter: Dayakar M
>Assignee: Dayakar M
>Priority: Major
>  Labels: pull-request-available
>
> Signalling CONDITION HANDLER is not working in HPLSQL.
> Steps to Reproduce:
> {noformat}
> jdbc:hive2://ccycloud-1.nightly-71x-oq.roo> DECLARE cnt INT DEFAULT 0; 
> . . . . . . . . . . . . . . . . . . . . . . .> DECLARE wrong_cnt_condition 
> CONDITION;
> . . . . . . . . . . . . . . . . . . . . . . .> 
> . . . . . . . . . . . . . . . . . . . . . . .> DECLARE EXIT HANDLER FOR 
> wrong_cnt_condition
> . . . . . . . . . . . . . . . . . . . . . . .>   PRINT 'Wrong number of 
> rows'; 
> . . . . . . . . . . . . . . . . . . . . . . .> 
> . . . . . . . . . . . . . . . . . . . . . . .> EXECUTE IMMEDIATE 'SELECT 
> COUNT(*) FROM sys.tbls' INTO cnt;
> . . . . . . . . . . . . . . . . . . . . . . .> 
> . . . . . . . . . . . . . . . . . . . . . . .> IF cnt <> 0 THEN
> . . . . . . . . . . . . . . . . . . . . . . .>   SIGNAL wrong_cnt_condition;
> . . . . . . . . . . . . . . . . . . . . . . .> END IF;
> . . . . . . . . . . . . . . . . . . . . . . .> /
> INFO  : Compiling 
> command(queryId=hive_20240424171747_7f22fef6-70d5-483a-af67-7a6b9f17ac8b): 
> SELECT COUNT(*) FROM sys.tbls
> INFO  : Semantic Analysis Completed (retrial = false)
> INFO  : Created Hive schema: Schema(fieldSchemas:[FieldSchema(name:_c0, 
> type:bigint, comment:null)], properties:null)
> INFO  : Completed compiling 
> command(queryId=hive_20240424171747_7f22fef6-70d5-483a-af67-7a6b9f17ac8b); 
> Time taken: 0.995 seconds 
> INFO  : Completed executing 
> command(queryId=hive_20240424171747_7f22fef6-70d5-483a-af67-7a6b9f17ac8b); 
> Time taken: 8.479 seconds
> INFO  : OK
> ERROR : wrong_cnt_condition
> No rows affected (9.559 seconds)
> 0: jdbc:hive2://localhost>{noformat}



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


[jira] [Created] (HIVE-28243) Implement user/group deny policy with kerberos auth

2024-05-02 Thread Manish Maheshwari (Jira)
Manish Maheshwari created HIVE-28243:


 Summary: Implement user/group deny policy with kerberos auth
 Key: HIVE-28243
 URL: https://issues.apache.org/jira/browse/HIVE-28243
 Project: Hive
  Issue Type: Improvement
Reporter: Manish Maheshwari


Any user can access HS2 and submit a query today if a user has access to any 
tables via ranger. Customers want to be able to block certain users and groups 
access to hs2 but its not possible today.



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


[jira] [Commented] (HIVE-28213) Incorrect results after insert-select from similar bucketed source & target table

2024-05-02 Thread Krisztian Kasa (Jira)


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

Krisztian Kasa commented on HIVE-28213:
---

IMHO {{hive.tez.bucket.pruning}} shouldn't be allowed while scanning external 
tables. It relies on the filenames:
[https://github.com/apache/hive/blob/636b0d3abf00afbe2cf71dc89f762acca48867ca/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/HiveSplitGenerator.java#L339]
[https://github.com/apache/hive/blob/636b0d3abf00afbe2cf71dc89f762acca48867ca/ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java#L2077]
Datafiles belongs to external tables are allowed to changed without Hive hence 
this optimization can lead to data correctness issues.
 

> Incorrect results after insert-select from similar bucketed source & target 
> table
> -
>
> Key: HIVE-28213
> URL: https://issues.apache.org/jira/browse/HIVE-28213
> Project: Hive
>  Issue Type: Bug
>Reporter: Naresh P R
>Assignee: Zoltán Rátkai
>Priority: Major
> Attachments: test.q
>
>
> Insert-select is not honoring bucketing if both source & target are bucketed 
> on same column.
> eg., 
> {code:java}
> CREATE EXTERNAL TABLE bucketing_table1 (id INT)
> CLUSTERED BY (id)
> SORTED BY (id ASC)
> INTO 32 BUCKETS stored as textfile;
> INSERT INTO TABLE bucketing_table1 VALUES (1), (2), (3), (4), (5);
> CREATE EXTERNAL TABLE bucketing_table2 like bucketing_table1;
> INSERT INTO TABLE bucketing_table2 select * from bucketing_table1;{code}
> id=1 => murmur_hash(1) %32 should go to 29th bucket file.
> bucketing_table1 has id=1 at 29th file,
> but bucketing_table2 doesn't have 29th file because Insert-select dint honor 
> the bucketing.
> {code:java}
> SELECT count(*) FROM bucketing_table1 WHERE id = 1;
> ===
> 1 //correct result
> SELECT count(*) FROM bucketing_table2 WHERE id = 1;   
> === 
> 0 // incorrect result
> select *, INPUT__FILE__NAME from bucketing_table1;
> +--++
> | bucketing_table1.id  |                 input__file__name                  |
> +--++
> | 2                    | /bucketing_table1/04_0 |
> | 3                    | /bucketing_table1/06_0 |
> | 5                    | /bucketing_table1/15_0 |
> | 4                    | /bucketing_table1/21_0 |
> | 1                    | /bucketing_table1/29_0 |
> +--++
> select *, INPUT__FILE__NAME from bucketing_table2;
> +-++
> | bucketing_table2.id  |                 input__file__name                  |
> +-++
> | 2           | /bucketing_table2/00_0 |
> | 3           | /bucketing_table2/01_0 |
> | 5           | /bucketing_table2/02_0 |
> | 4           | /bucketing_table2/03_0 |
> | 1           | /bucketing_table2/04_0 |
> +--++{code}
> Workaround for read: hive.tez.bucket.pruning=false;
> PS: Attaching repro file [^test.q]



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


[jira] (HIVE-24893) Download data from Thriftserver through JDBC

2024-05-02 Thread Manish Maheshwari (Jira)


[ https://issues.apache.org/jira/browse/HIVE-24893 ]


Manish Maheshwari deleted comment on HIVE-24893:
--

was (Author: mylogi...@gmail.com):
[~yumwang] - Can you please raise a PR for this feature. I think the community 
will benefit from this implemented.

> Download data from Thriftserver through JDBC
> 
>
> Key: HIVE-24893
> URL: https://issues.apache.org/jira/browse/HIVE-24893
> Project: Hive
>  Issue Type: New Feature
>  Components: HiveServer2, JDBC
>Affects Versions: 4.0.0
>Reporter: Yuming Wang
>Assignee: Yuming Wang
>Priority: Major
>  Labels: pull-request-available
> Fix For: 4.0.0-alpha-1
>
>  Time Spent: 2.5h
>  Remaining Estimate: 0h
>
> It is very useful to support downloading large amounts of data (such as more 
> than 50GB) through JDBC.
> Snowflake has similar support :
> https://docs.snowflake.com/en/user-guide/jdbc-using.html#label-jdbc-download-from-stage-to-stream
> https://github.com/snowflakedb/snowflake-jdbc/blob/95a7d8a03316093430dc3960df6635643208b6fd/src/main/java/net/snowflake/client/jdbc/SnowflakeConnectionV1.java#L886



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


[jira] [Commented] (HIVE-24893) Download data from Thriftserver through JDBC

2024-05-02 Thread Manish Maheshwari (Jira)


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

Manish Maheshwari commented on HIVE-24893:
--

[~yumwang] - Can you please raise a PR for this feature. I think the community 
will benefit from this implemented.

> Download data from Thriftserver through JDBC
> 
>
> Key: HIVE-24893
> URL: https://issues.apache.org/jira/browse/HIVE-24893
> Project: Hive
>  Issue Type: New Feature
>  Components: HiveServer2, JDBC
>Affects Versions: 4.0.0
>Reporter: Yuming Wang
>Assignee: Yuming Wang
>Priority: Major
>  Labels: pull-request-available
> Fix For: 4.0.0-alpha-1
>
>  Time Spent: 2.5h
>  Remaining Estimate: 0h
>
> It is very useful to support downloading large amounts of data (such as more 
> than 50GB) through JDBC.
> Snowflake has similar support :
> https://docs.snowflake.com/en/user-guide/jdbc-using.html#label-jdbc-download-from-stage-to-stream
> https://github.com/snowflakedb/snowflake-jdbc/blob/95a7d8a03316093430dc3960df6635643208b6fd/src/main/java/net/snowflake/client/jdbc/SnowflakeConnectionV1.java#L886



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


[jira] [Resolved] (HIVE-28173) Issues with staging dirs with materialized views on HDFS encrypted table

2024-05-02 Thread Krisztian Kasa (Jira)


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

Krisztian Kasa resolved HIVE-28173.
---
Fix Version/s: 4.1.0
   Resolution: Fixed

Merged to master. Thanks [~scarlin] for the patch and [~dkuzmenko] for review.

> Issues with staging dirs with materialized views on HDFS encrypted table
> 
>
> Key: HIVE-28173
> URL: https://issues.apache.org/jira/browse/HIVE-28173
> Project: Hive
>  Issue Type: Bug
>  Components: HiveServer2
>Affects Versions: 4.0.0
>Reporter: Steve Carlin
>Assignee: Steve Carlin
>Priority: Major
>  Labels: pull-request-available
> Fix For: 4.1.0
>
>
> In the materialized view registry thread which runs in the background, there 
> are 2 issues involving staging directories on hdfs encrypted tables
> 1) The staging directory is created at compile time.  For non hdfs encrypted 
> tables, the "mkdir" flag is set to false.  There is no such flag for hdfs 
> encrypted tables.
> 2) The "FileSystem.deleteOnFileExit()" method is not called from the 
> HiveMaterializedViewRegistry thread.



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


[jira] [Commented] (HIVE-28167) Full table deletion fails when converting to truncate for Iceberg and ACID tables

2024-05-02 Thread Stamatis Zampetakis (Jira)


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

Stamatis Zampetakis commented on HIVE-28167:


When deprecating code, properties, etc., it is useful to document the reason 
for the deprecation and how users should deal with it. The comment above is 
good for that purpose, thanks for the clarification! 

> Full table deletion fails when converting to truncate for Iceberg and ACID 
> tables
> -
>
> Key: HIVE-28167
> URL: https://issues.apache.org/jira/browse/HIVE-28167
> Project: Hive
>  Issue Type: Bug
>Reporter: Sourabh Badhya
>Assignee: Sourabh Badhya
>Priority: Major
>  Labels: pull-request-available
> Fix For: 4.1.0
>
>
> A simple repro - 
> {code:java}
> create table ice01 (id int, key int) stored by iceberg stored as orc 
> tblproperties ('format-version'='2', 'write.delete.mode'='copy-on-write');
> insert into ice01 values (1,1),(2,1),(3,1),(4,1);
> insert into ice01 values (1,2),(2,2),(3,2),(4,2);
> insert into ice01 values (1,3),(2,3),(3,3),(4,3);
> insert into ice01 values (1,4),(2,4),(3,4),(4,4);
> insert into ice01 values (1,5),(2,5),(3,5),(4,5);
> explain analyze delete from ice01;
> delete from ice01;
> select count(*) from ice01;
> select * from ice01;
> describe formatted ice01; {code}
> The solution is to convert full table deletion to a truncate operation on the 
> table.



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


[jira] [Resolved] (HIVE-28214) HPLSQL not using the hive variables passed through beeline using --hivevar option

2024-05-02 Thread Krisztian Kasa (Jira)


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

Krisztian Kasa resolved HIVE-28214.
---
Fix Version/s: 4.1.0
   Resolution: Fixed

Merged to master. Thanks [~Dayakar]  for the patch.

> HPLSQL not using the hive variables passed through beeline using --hivevar 
> option
> -
>
> Key: HIVE-28214
> URL: https://issues.apache.org/jira/browse/HIVE-28214
> Project: Hive
>  Issue Type: Bug
>  Components: hpl/sql
>Reporter: Dayakar M
>Assignee: Dayakar M
>Priority: Major
>  Labels: pull-request-available
> Fix For: 4.1.0
>
>
> HPLSQL not using the hive variables passed through beeline using --hivevar 
> option.
> Steps to reproduce:
> {noformat}
> beeline -u 
> 'jdbc:hive2://localhost:1/default;user=hive;password=hive;mode=hplsql' 
> --hivevar hivedb=sys --hivevar hivetbl=tbls{noformat}
> {noformat}
> 0: jdbc:hive2://localhost> DECLARE hivedb_tbl string;
>  . . . . . . . . . . . . . . . . . . . . . . .> SELECT hivedb || '.' || 
> hivetbl into hivedb_tbl;
>  . . . . . . . . . . . . . . . . . . . . . . .> PRINT hivedb_tbl;
>  . . . . . . . . . . . . . . . . . . . . . . .> /
> INFO  : Compiling 
> command(queryId=hive_20240424145826_617acb79-0b27-46eb-aa05-1332703c94fb): 
> SELECT CONCAT(hivedb, '.', hivetbl) 
> ERROR : FAILED: SemanticException [Error 10004]: Line 1:14 Invalid table 
> alias or column reference 'hivedb': (possible column names are: ) 
> org.apache.hadoop.hive.ql.parse.SemanticException: Line 1:14 Invalid table 
> alias or column reference 'hivedb': (possible column names are: )
>  
> INFO  : Completed compiling 
> command(queryId=hive_20240424145826_617acb79-0b27-46eb-aa05-1332703c94fb); 
> Time taken: 3.976 seconds 
> ERROR : Unhandled exception in HPL/SQL 
> No rows affected (4.901 seconds)
> 0: jdbc:hive2://localhost>
> {noformat}



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