Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-44280

Add convertJavaTimestampToTimestamp in JDBCDialect API

    XMLWordPrintableJSON

Details

    Description

      A new method, convertJavaTimestampToTimestamp, is introduced to the JDBCDialects API, providing the capability for JDBC dialects to override the default Java timestamp conversion behavior. This enhancement is particularly beneficial for databases such as PostgreSQL, which feature special values for timestamps representing positive and negative infinity. 

      The pre-existing default behavior of timestamp conversion potentially triggers an overflow due to these special values (i.e. The executor would crash if you select a column that contains infinity timestamps in PostgreSQL.) By integrating this new function, we can mitigate such issues, enabling more versatile and robust timestamp value conversions across various JDBC-based connectors.

      Attachments

        Activity

          People

            mingkangli Mingkang Li
            mingkangli Mingkang Li
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: