Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

proposed changes

note

Support function  TO_TIMESTAMP_LTZ(numeric_expr, [,scale])

return type: TIMESTAMP(p) WITH LOCAL TIME ZONE

#session timezone: UTC

TO_TIMESTAMP_LTZ(44)

1970-01-01 00:00:44 

#session timezone: UTC+8

TO_TIMESTAMP_LTZ(-28756)

1970-01-01 00:00:44

TO_TIMESTAMP_LTZ(numeric_expr [,scale])

TO_TIMESTAMP_LTZ(seconds, 0)

TO_TIMESTAMP_LTZ(millsmilliseconds, 3)

TO_TIMESTAMP_LTZ(microSeconds, 6)

TO_TIMESTAMP_LTZ(nanoSeconds, 9)

...

8. Introduce 'table.exec.time-function-evaluation' config to control when the time function should be evaluated.

an option table.exec.time-function-evaluation to control the materialize time point of time function value. The time function includes

  • LOCALTIME
  • LOCALTIMESTAMP
  • CURRENT_DATE
  • CURRENT_TIME
  • CURRENT_TIMESTAMP
  • NOW()

The default value of table.exec.time-function-evaluation includes 'auto', 'per-record', 'query-start'.

  • 'auto', the default value which means Flink evaluates above time function values according to execution mode, i.e. Flink evaluates time function value for per record in Streaming mode, evaluates the time function value at query start for batch mode.
  • 'per-record', Flink evaluates time function value for per record.
  • 'query-start', Flink evaluate above time function value at query-start, the time function always returns same value in a query.

General Implementations

1.Change the codegen implementations for above five functions/cast conversions according to the value of introduced table option: table.exec.fallback-legacy-time-function

...