You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2021/02/16 21:44:00 UTC

[GitHub] [iceberg] RussellSpitzer opened a new issue #2244: Missing handling of Timestamp Without Timezone type

RussellSpitzer opened a new issue #2244:
URL: https://github.com/apache/iceberg/issues/2244


   Spark currently possess no readers for the Timestamp.withoutZone() type but is able to create tables with this schema. These tables if you attempt to read them from Spark will error out.
   
   Currently in master the only reader for this type that I can see is for the generic case
   https://github.com/apache/iceberg/blob/631efec2f9ce1f0526d6613c81ac8fd0ccb95b5e/data/src/main/java/org/apache/iceberg/data/orc/GenericOrcReader.java#L116-L117
   
   Other systems if they hit a table with this type will fail immediately since they do not have valid readers.
   
   This is a bit troubling because this column type is used by default when non-iceberg ORC writers make new files, for example:
   
   ```scala
   spark.sql("CREATE EXTERNAL TABLE mytable (foo timestamp) location '/Users/russellspitzer/Temp/foo'")
   
spark.sql("INSERT INTO mytable VALUES (now())")

   ```
   
   Creates files 
   ```
   File Version: 0.12 with ORC_135
   Rows: 1
   Compression: SNAPPY
   Compression size: 262144
   Calendar: Julian/Gregorian
   Type: struct<foo:timestamp>
   ```
   
   The non-iceberg Spark and Hive Orc readers and writers have no problem dealing with these files but, if an iceberg table is created and these files are added to it then they are unreadable by Iceberg's orc readers and writers.
   
   There is also a related problem with Migrate -- @RussellSpitzer Add Link Here
   
    
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] RussellSpitzer commented on issue #2244: Missing handling of Timestamp Without Timezone type

Posted by GitBox <gi...@apache.org>.
RussellSpitzer commented on issue #2244:
URL: https://github.com/apache/iceberg/issues/2244#issuecomment-786378195


   We decided in the last Sync that a reasonable solution here would be for Spark to read both timezone types as timestamp with timezone with a flag disabling this behavior by default. If the flag is disabled an error message would alert the user that Spark cannot handle the two different types and will always display the local timezone, but the underlying data would be correct.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] RussellSpitzer commented on issue #2244: Missing handling of Timestamp Without Timezone type

Posted by GitBox <gi...@apache.org>.
RussellSpitzer commented on issue #2244:
URL: https://github.com/apache/iceberg/issues/2244#issuecomment-793866614


   There is an active pr to fix this, please help with the review if you are interested. Basically everywhere we currently have handling for timestamp with timezone we add in handling for timestamp without timezone with the same code except we gate it with a flag.
   
   https://github.com/apache/iceberg/pull/2282
   
   Sent from my iPhone
   
   > On Mar 9, 2021, at 4:40 AM, Javier Sánchez Beltrán <no...@github.com> wrote:
   > 
   > 
   > Hello @RussellSpitzer! I am having a similar issue and I agree to your solution as well. Did you continue working on this? I would like to know more about your approach. How would this work in practice?
   > 
   > —
   > You are receiving this because you were mentioned.
   > Reply to this email directly, view it on GitHub, or unsubscribe.
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] javsanbel2 commented on issue #2244: Missing handling of Timestamp Without Timezone type

Posted by GitBox <gi...@apache.org>.
javsanbel2 commented on issue #2244:
URL: https://github.com/apache/iceberg/issues/2244#issuecomment-793695370


   Hello @RussellSpitzer! I am having a similar issue and I agree to your solution as well. Did you continue working on this? I would like to know more about your approach. How would this work in practice?


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] RussellSpitzer closed issue #2244: Missing handling of Timestamp Without Timezone type

Posted by GitBox <gi...@apache.org>.
RussellSpitzer closed issue #2244:
URL: https://github.com/apache/iceberg/issues/2244


   


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org