You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "andygrove (via GitHub)" <gi...@apache.org> on 2026/07/28 02:08:20 UTC

Re: [PR] feat: support timestampadd, timestampdiff and make_interval via codegen dispatch [datafusion-comet]

andygrove commented on code in PR #5030:
URL: https://github.com/apache/datafusion-comet/pull/5030#discussion_r3662245000


##########
docs/source/user-guide/latest/expressions.md:
##########
@@ -284,6 +284,8 @@ The type-name conversion functions (`bigint`, `binary`, `boolean`, `date`, `deci
 | `timestamp_micros` | ✅ |  |
 | `timestamp_millis` | ✅ |  |
 | `timestamp_seconds` | ✅ |  |
+| `timestampadd` | ✅ | Runs through the JVM codegen dispatcher |

Review Comment:
   Corrected. All four rows now note that the `Native` implementation applies only to the two-argument form, and `timediff`, `timestampadd` and `timestampdiff` rows are added.
   
   Each fixture now proves the parse path. One caveat on the grammar: 3.4 has only `TIMESTAMPADD | DATEADD` and `TIMESTAMPDIFF | DATEDIFF`; `DATE_ADD` and `DATE_DIFF` joined the rule in 3.5. Keeping them inline failed 3.4 with `UNRESOLVED_COLUMN.WITH_SUGGESTION` on `DAY`, since `date_add` fell through to the registered two-argument function. So the coverage is split by introducing version: `dateadd`/`datediff` inline (3.4+), `date_add`/`date_diff` in `date_add_unit_alias.sql` (`MinSparkVersion: 3.5`), `timediff` in `timediff.sql` (4.0+).
   
   Noted on the string-literal unit form being a parse-time rejection; no fixture added for it.



-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org