Repository navigation
Conversation
genezhang
left a comment
There was a problem hiding this comment.
Thanks for #1487. Part of this is a clear improvement and I'd like to land it. I ran this head against main on ClickHouse 26.7.1 and 25.8.33.
Works (both versions): RETURN datetime() (main: Code 43), RETURN localdatetime('2020-01-15T10:30:00') (main: Code 43). localdatetime(), datetime('…Z'), date('…') are unchanged.
Concerns about the new time mapping
RETURN time('10:30:00+01:00')now returns09:30:00on 26.7: the offset is dropped and the clock shifted to UTC. Neo4j keeps the offset (10:30:00+01:00). The query used to fail loudly, so it now silently answers with a different value.- On 25.8,
toTimeis the older function that returns a DateTime:time('10:30:00')gives1970-01-02 10:30:00. localtime('10:30:00')fails on 25.8 withtoTime("Illegal type String"). That is the same function as onmain, so it is not new.
Suggestions
- Split the PR. Keep the
datetime()andlocaldatetime(...)changes, and leavetimeout until it can keep the offset (or keep it loud). - Add lowering tests for the cases that now work. None are included, and each of them fails on
main. - The description says the map forms still fail loudly; if those remain open, please use
Refs #1487rather thanCloses.
Stacking. This branch also carries the commits from #1555 and #1556 (1e1c1b09, 3635ddfc, deec51e1). Please rebase so it holds only its own change. Please also drop the osv-scanner.toml hunk, which replaces the reason text on main with an older wording.
If it's easier, we're happy to take the datetime()/localdatetime() part ourselves. Just say.
…s (no-arg + string)
36f9195 to
7b99694
Compare
|
Reworked per review: split out the #1490 (any_non_null complex) and #1436 (chdb quoting) changes and the osv-scanner hunk; this PR now carries only the #1487 datetime()/localdatetime() constructor fix. Verified live on CH 25.8/26.7: |
What
Fixes #1487: several Cypher temporal constructors fail in ClickHouse:
localdatetime('str')rendered asnow64(parseDateTime64BestEffort(...))(now64 takes precision, not a value) → Code 43. Fixed:parseDateTime64BestEffort(str, 3).localdatetime()rendered asparseDateTime64BestEffort(now64(3))→ Code 43. Fixed: special case returnsnow64(3).datetime()rendered asparseDateTime64BestEffort(now64(3))→ Code 43. Fixed: special case returnsnow64(3).time('str')had no mapping → Code 46 (no functiontime). Fixed: addedtime→toTime(parseDateTime64BestEffort(concat('1970-01-01T', arg), 3)).time()with no args →toTime(now()).Map-argument forms (
date({map}),datetime({map}),localdatetime({map})) still fail loudly (Code 43) — the component form (makeDate/makeDateTime64) is a follow-up.Gates (local, 1.94.1,
--no-default-features)Spec-driven
Backward-compatible (only wrong-today queries change). Corpus goldens byte-identical (ratchet green).
Closes #1487