You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/06/04 21:38:49 UTC

[GitHub] [beam] damccorm opened a new issue, #21115: JdbcIO date conversion is sensitive to OS

damccorm opened a new issue, #21115:
URL: https://github.com/apache/beam/issues/21115

   Time handling varies between OSes:
   
   for e.g.
   ```
   
   // DB Init script
   CREATE TABLE SimpleFlatRecords
   (
       id                    INTEGER AUTO_INCREMENT
   PRIMARY KEY,
       birth_date            DATE
   );
   INSERT INTO SimpleFlatRecords(id, birth_date)
   VALUES
   (1, '2000-05-11'),
          (2, '2001-06-12'),
          (3, '2002-07-13');
   ```
   
   The Beam Row contains different dates based on OS:
   
   MacOS:
   
   1: '2000-05-10'
   2: '2001-06-11'
   3: '2002-07-12'
   
   Linux:
   
   1: '2000-05-11'
   2: '2001-06-12'
   3: '2002-07-13'
   
   Imported from Jira [BEAM-12484](https://issues.apache.org/jira/browse/BEAM-12484). Original Jira may contain additional context.
   Reported by: anant.damle.


-- 
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: github-unsubscribe@beam.apache.org.apache.org

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


[GitHub] [beam] Abacn commented on issue #21115: JdbcIO date conversion is sensitive to OS

Posted by "Abacn (via GitHub)" <gi...@apache.org>.
Abacn commented on issue #21115:
URL: https://github.com/apache/beam/issues/21115#issuecomment-1468654350

   DATE type is fixed by switching to use java.time.LocalDate object. However I realize `rs.getObject(i, java.time.LocalDate.class)` may not be supported,
    https://github.com/apache/beam/blob/385d662a4e6000ba1315f7d14c5a699263d51a60/sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/SchemaUtil.java#L315
   
   depending on the jdbc driver used:
   - derby (used in unit test), unsupported and get error `Caused by: java.sql.SQLFeatureNotSupportedException: The data type '0' is not supported`
   - postgressql, supported


-- 
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: github-unsubscribe@beam.apache.org

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


[GitHub] [beam] Abacn commented on issue #21115: JdbcIO date conversion is sensitive to OS

Posted by "Abacn (via GitHub)" <gi...@apache.org>.
Abacn commented on issue #21115:
URL: https://github.com/apache/beam/issues/21115#issuecomment-1468655667

   Also, createTimeExtractor and createTimestampExtractor has similar issue, found when testing #25819


-- 
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: github-unsubscribe@beam.apache.org

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


[GitHub] [beam] johnjcasey closed issue #21115: JdbcIO date conversion is sensitive to OS

Posted by GitBox <gi...@apache.org>.
johnjcasey closed issue #21115: JdbcIO date conversion is sensitive to OS
URL: https://github.com/apache/beam/issues/21115


-- 
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: github-unsubscribe@beam.apache.org

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


[GitHub] [beam] Abacn commented on issue #21115: JdbcIO date conversion is sensitive to OS

Posted by "Abacn (via GitHub)" <gi...@apache.org>.
Abacn commented on issue #21115:
URL: https://github.com/apache/beam/issues/21115#issuecomment-1470241508

   set to P2 as macOS merely used in production


-- 
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: github-unsubscribe@beam.apache.org

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