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

DateTimeUtils.timestampDiff and DateTimeUtils.timestampAdd should not throw INTERNAL_ERROR exception

    XMLWordPrintableJSON

Details

    Description

      https://github.com/apache/spark/pull/44263 converted `IllegalStateException` to `InternalError` when a unit for DateTimeUtils.timestampDiff and DateTimeUtils.timestampAdd is not from a sanctioned list.

      Originally incorrect unit should have been caught in parser before an expression is constructed. However, PySpark introduced PythonSQLUtils that creates expressions without validation. Since then the `INTERNAL_ERROR` is incorrect error class and should be converted to execution error with correct error class instead.

      Attachments

        Issue Links

          Activity

            People

              vli-databricks Vitalii Li
              vli-databricks Vitalii Li
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: