uros-b commented on code in PR #59795: URL: https://github.com/apache/spark/pull/59795#discussion_r4600632718
########## docs/sql-migration-guide.md: ########## @@ -31,6 +31,10 @@ license: | - Since Spark 4.4, a predicate evaluated through generated code outside of whole-stage codegen, such as a filter condition with whole-stage codegen disabled or a join condition, evaluates a subexpression common to its top-level conjuncts, whether several of them share it or one of them repeats it, just before the first conjunct that references it, instead of before the whole condition. So a `FALSE` conjunct before them stops the evaluation, as `AND` does when evaluated directly, and an error the subexpression raises on the row, such as `ARITHMETIC_OVERFLOW` in ANSI mode, is no longer raised. For example, `SELECT a FROM t WHERE b < 0 AND y + 1 > 0 AND y + 1 > -1` no longer fails on a row where `b` is `1` and `y` is `2147483647`. A subexpression whose first occurrence is in a conditional branch of a conjunct, such as a branch of `CASE WHEN`, is still evaluated before that conjunct. - Since Spark 4.4, `make_timestamp`, `make_timestamp_ltz` and `make_timestamp_ntz` return `NULL` for a seconds value above 2147.483647 or below -2147.483648, or raise `DATETIME_FIELD_OUT_OF_BOUNDS` when `spark.sql.ansi.enabled` is `true`, as they do for other out-of-range seconds such as 61; `try_make_timestamp`, `try_make_timestamp_ltz` and `try_make_timestamp_ntz` return `NULL`. Previously, such a value wrapped around modulo 2^32 microseconds and could return a wrong timestamp, for example `make_timestamp_ntz(2020, 1, 1, 0, 0, 4324.967296)` returned `2020-01-01 00:00:30`. +- Since Spark 4.4, `FROM STREAM(table) changes` interprets bare `changes` as an unbounded `CHANGES` + clause, matching `FROM STREAM table changes`. Previously, the parenthesized form treated + `changes` as an implicit table alias. To retain the alias, use `AS changes` or a backquoted alias + such as `` `changes` ``. Review Comment: ```suggestion - Since Spark 4.4, `FROM STREAM(table) changes` interprets bare `changes` as an unbounded `CHANGES` clause, matching `FROM STREAM table changes`. Previously, the parenthesized form treated `changes` as an implicit table alias. To retain the alias, use `AS changes` or a backquoted alias such as `` `changes` ``. ``` -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
