[jira] [Work logged] (HIVE-26077) Implement CTAS for Iceberg tables with partition spec

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


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

ASF GitHub Bot logged work on HIVE-26077:
-

Author: ASF GitHub Bot
Created on: 29/Mar/22 09:01
Start Date: 29/Mar/22 09:01
Worklog Time Spent: 10m 
  Work Description: pvary merged pull request #3147:
URL: https://github.com/apache/hive/pull/3147


   


-- 
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: 749213)
Time Spent: 40m  (was: 0.5h)

> Implement CTAS for Iceberg tables with partition spec
> -
>
> Key: HIVE-26077
> URL: https://issues.apache.org/jira/browse/HIVE-26077
> Project: Hive
>  Issue Type: Task
>Reporter: Peter Vary
>Assignee: Peter Vary
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> We enabled CTAS for Iceberg tables, but currently only for unpartitioned 
> tables and tables where the partitioning schema uses the original HIVE 
> {{PARTITIONED BY}} syntax.
> We would like to use CTAS with the new syntax, like:
> {code}
> CREATE TABLE t PARTITIONED BY SPEC(day(ts)) AS SELECT ...
> {code}



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


[jira] [Work logged] (HIVE-26077) Implement CTAS for Iceberg tables with partition spec

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


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

ASF GitHub Bot logged work on HIVE-26077:
-

Author: ASF GitHub Bot
Created on: 29/Mar/22 09:01
Start Date: 29/Mar/22 09:01
Worklog Time Spent: 10m 
  Work Description: pvary commented on a change in pull request #3147:
URL: https://github.com/apache/hive/pull/3147#discussion_r837233568



##
File path: 
iceberg/iceberg-handler/src/test/java/org/apache/iceberg/mr/hive/HiveIcebergTestUtils.java
##
@@ -299,12 +300,14 @@ public static void validateDataWithSQL(TestHiveShell 
shell, String tableName, Li
   Assert.assertEquals(record.size(), row.length);
   for (int j = 0; j < record.size(); ++j) {
 Object field = record.get(j);
-if (field instanceof LocalDateTime) {
+if (field == null) {
+  Assert.assertNull(row[j]);
+} else if (field instanceof LocalDateTime) {
   Assert.assertEquals(((LocalDateTime) 
field).toInstant(ZoneOffset.UTC).toEpochMilli(),
   TimestampUtils.stringToTimestamp((String) 
row[j]).toEpochMilli());
 } else if (field instanceof OffsetDateTime) {
   Assert.assertEquals(((OffsetDateTime) 
field).toInstant().toEpochMilli(),
-  TimestampTZUtil.parse((String) row[j]).toEpochMilli());
+  TimestampTZUtil.parse((String) row[j], 
ZoneId.systemDefault()).toEpochMilli());

Review comment:
   Yeah. Without that, if the string does not contain the TZ, then 
`TimestampTZUtil.parse` does not know which TZ it should use in parsing




-- 
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: 749212)
Time Spent: 0.5h  (was: 20m)

> Implement CTAS for Iceberg tables with partition spec
> -
>
> Key: HIVE-26077
> URL: https://issues.apache.org/jira/browse/HIVE-26077
> Project: Hive
>  Issue Type: Task
>Reporter: Peter Vary
>Assignee: Peter Vary
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> We enabled CTAS for Iceberg tables, but currently only for unpartitioned 
> tables and tables where the partitioning schema uses the original HIVE 
> {{PARTITIONED BY}} syntax.
> We would like to use CTAS with the new syntax, like:
> {code}
> CREATE TABLE t PARTITIONED BY SPEC(day(ts)) AS SELECT ...
> {code}



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


[jira] [Work logged] (HIVE-26077) Implement CTAS for Iceberg tables with partition spec

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


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

ASF GitHub Bot logged work on HIVE-26077:
-

Author: ASF GitHub Bot
Created on: 29/Mar/22 08:48
Start Date: 29/Mar/22 08:48
Worklog Time Spent: 10m 
  Work Description: marton-bod commented on a change in pull request #3147:
URL: https://github.com/apache/hive/pull/3147#discussion_r837220839



##
File path: 
iceberg/iceberg-handler/src/test/java/org/apache/iceberg/mr/hive/HiveIcebergTestUtils.java
##
@@ -299,12 +300,14 @@ public static void validateDataWithSQL(TestHiveShell 
shell, String tableName, Li
   Assert.assertEquals(record.size(), row.length);
   for (int j = 0; j < record.size(); ++j) {
 Object field = record.get(j);
-if (field instanceof LocalDateTime) {
+if (field == null) {
+  Assert.assertNull(row[j]);
+} else if (field instanceof LocalDateTime) {
   Assert.assertEquals(((LocalDateTime) 
field).toInstant(ZoneOffset.UTC).toEpochMilli(),
   TimestampUtils.stringToTimestamp((String) 
row[j]).toEpochMilli());
 } else if (field instanceof OffsetDateTime) {
   Assert.assertEquals(((OffsetDateTime) 
field).toInstant().toEpochMilli(),
-  TimestampTZUtil.parse((String) row[j]).toEpochMilli());
+  TimestampTZUtil.parse((String) row[j], 
ZoneId.systemDefault()).toEpochMilli());

Review comment:
   Did you get a failure without specifying the the zone?




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

> Implement CTAS for Iceberg tables with partition spec
> -
>
> Key: HIVE-26077
> URL: https://issues.apache.org/jira/browse/HIVE-26077
> Project: Hive
>  Issue Type: Task
>Reporter: Peter Vary
>Assignee: Peter Vary
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> We enabled CTAS for Iceberg tables, but currently only for unpartitioned 
> tables and tables where the partitioning schema uses the original HIVE 
> {{PARTITIONED BY}} syntax.
> We would like to use CTAS with the new syntax, like:
> {code}
> CREATE TABLE t PARTITIONED BY SPEC(day(ts)) AS SELECT ...
> {code}



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


[jira] [Work logged] (HIVE-26077) Implement CTAS for Iceberg tables with partition spec

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


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

ASF GitHub Bot logged work on HIVE-26077:
-

Author: ASF GitHub Bot
Created on: 28/Mar/22 13:00
Start Date: 28/Mar/22 13:00
Worklog Time Spent: 10m 
  Work Description: pvary opened a new pull request #3147:
URL: https://github.com/apache/hive/pull/3147


   ### What changes were proposed in this pull request?
   Implements the following query:
   ```
   CREATE TABLE t PARTITIONED BY SPEC(day(ts)) AS SELECT ...
   ```
   
   ### Why are the changes needed?
   We need to have a way to create a table with the spec
   
   ### Does this PR introduce _any_ user-facing change?
   Implements a new syntax
   
   ### How was this patch tested?
   New unit test


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

> Implement CTAS for Iceberg tables with partition spec
> -
>
> Key: HIVE-26077
> URL: https://issues.apache.org/jira/browse/HIVE-26077
> Project: Hive
>  Issue Type: Task
>Reporter: Peter Vary
>Priority: Major
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> We enabled CTAS for Iceberg tables, but currently only for unpartitioned 
> tables and tables where the partitioning schema uses the original HIVE 
> {{PARTITIONED BY}} syntax.
> We would like to use CTAS with the new syntax, like:
> {code}
> CREATE TABLE t PARTITIONED BY SPEC(day(ts)) AS SELECT ...
> {code}



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