rainerschamm opened a new issue, #15761:
URL: https://github.com/apache/iceberg/issues/15761

   ### Feature Request / Improvement
   
   Athena throws the following error for CTAS statements that use Timestamp 
(with time zone) columns:
   
   > Unsupported Hive type: timestamp(6) with time zone
   
   See the below list of supported types:
   
https://docs.aws.amazon.com/athena/latest/ug/querying-iceberg-supported-data-types.html
   
   > Only Iceberg timestamp (without time zone) is supported for Athena Iceberg 
DDL statements like CREATE TABLE, but all timestamp types can be queried 
through Athena.
   
   We suggest adding a config option that allows for timestamp columns to be 
created without timezone.
   
   ```
     private static final String 
TABLES_SCHEMA_LOGICAL_TIMESTAMP_WITHOUT_ZONE_PROP =
         "iceberg.tables.schema-logical-timestamp-without-zone";
   ```
   
   Currently in SchemaUtils.java:
   
   ```
           case INT64:
             if (Timestamp.LOGICAL_NAME.equals(valueSchema.name())) {
                 return TimestampType.withZone();
             }
             return LongType.get();
   
   ```
   
   One could change it to something like this:
   
   ```
           case INT64:
             if (Timestamp.LOGICAL_NAME.equals(valueSchema.name())) {
               if (config.schemaLogicalTimestampWithoutZone()) {
                 return TimestampType.withoutZone();
               } else {
                 return TimestampType.withZone();
               }
             }
             return LongType.get();
   ```
   
   
   ### Query engine
   
   None
   
   ### Willingness to contribute
   
   - [x] I can contribute this improvement/feature independently
   - [x] I would be willing to contribute this improvement/feature with 
guidance from the Iceberg community
   - [ ] I cannot contribute this improvement/feature at this time


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to