[
https://issues.apache.org/jira/browse/HIVE-27253?focusedWorklogId=856458&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-856458
]
ASF GitHub Bot logged work on HIVE-27253:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 12/Apr/23 14:21
Start Date: 12/Apr/23 14:21
Worklog Time Spent: 10m
Work Description: amansinha100 commented on code in PR #4223:
URL: https://github.com/apache/hive/pull/4223#discussion_r1164211860
##########
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/translator/ASTConverter.java:
##########
@@ -218,6 +218,13 @@ private static ASTNode createNullField(RelDataType
fieldType) {
return mapCallNode.node();
}
+ if (fieldType.getSqlTypeName() == SqlTypeName.ARRAY) {
Review Comment:
What about other complex types .. STRUCT and MAP ?
e.g create table t1 (c3 struct <name: string, age: int>);
CREATE TABLE t2 (c1 int, c2 map<c2:string, c3:int>);
A struct can also appear within an array but that might be handled by this
code change.
Issue Time Tracking
-------------------
Worklog Id: (was: 856458)
Time Spent: 50m (was: 40m)
> Support array type when query does not produce any rows
> -------------------------------------------------------
>
> Key: HIVE-27253
> URL: https://issues.apache.org/jira/browse/HIVE-27253
> Project: Hive
> Issue Type: Improvement
> Components: CBO
> Reporter: Krisztian Kasa
> Assignee: Krisztian Kasa
> Priority: Major
> Labels: pull-request-available
> Time Spent: 50m
> Remaining Estimate: 0h
>
> {code}
> CREATE TABLE T1 (c1 int, c2 array<int>);
> CREATE TABLE T2 AS SELECT * FROM T1 LIMIT 0;
> describe formatted t2;
> {code}
> The new {{t2}} table schema should be
> {code}
> POSTHOOK: Input: default@t2
> # col_name data_type comment
> c1 int
> c2 array<int>
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)