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

Replacing current time prior to inline table eval

    XMLWordPrintableJSON

Details

    Description

      When current time/date specific functions are being used as part of inline tables each invocation will be evaluated. Instead, proper behaviour would be to replace time expressions with current time/date and always return single value. Example

      SELECT COUNT(DISTINCT ct) FROM VALUES
      (CURRENT_TIMESTAMP()),
      (CURRENT_TIMESTAMP()),
      (CURRENT_TIMESTAMP()) as data(ct)
       
      Is supposed to return 1, while currently it returns 3.

      Attachments

        Activity

          People

            dbatomic Aleksandar Tomic
            dbatomic Aleksandar Tomic
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: