Repository navigation
Conversation
antiguru
added this pull request to stack #38942
September 24, 2026 08:52
antiguru
force-pushed
the
sqlfunc-convert-time
branch
from
September 24, 2026 10:14
f9edeb7 to
f65b9ea
Compare
antiguru
force-pushed
the
sqlfunc-convert-array
branch
from
September 24, 2026 10:14
03ab635 to
aee4830
Compare
antiguru
force-pushed
the
sqlfunc-convert-time
branch
from
September 24, 2026 14:29
f65b9ea to
85c03fd
Compare
antiguru
force-pushed
the
sqlfunc-convert-array
branch
from
September 24, 2026 14:29
aee4830 to
1b2596d
Compare
antiguru
force-pushed
the
sqlfunc-convert-time
branch
from
September 25, 2026 16:00
85c03fd to
a5999db
Compare
antiguru
force-pushed
the
sqlfunc-convert-array
branch
from
September 25, 2026 16:00
1b2596d to
735e42b
Compare
antiguru
force-pushed
the
sqlfunc-convert-time
branch
from
October 14, 2026 09:11
a5999db to
a95413f
Compare
antiguru
force-pushed
the
sqlfunc-convert-array
branch
from
October 14, 2026 09:11
735e42b to
940e58a
Compare
The impl was hand-written because it allocates its result, which the eager trait now covers: a `String` output is pushed into the arena by `OutputDatumType::into_result`, exactly as the body did by hand. The body also checked NULL itself, and under the macro that check has to come from the input type. The input is `ExcludeNull<Datum<'a>>`, because `stringify_datum` takes a raw `Datum` and a bare `Datum` accepts NULL. `ExcludeNull` reports `nullable() == false`, so the derived `propagates_nulls` is true, matching the impl's declaration, and its `try_from_result` turns `Datum::Null` into `Err(Ok(Datum::Null))`, which the evaluation layer returns as `Ok(Datum::Null)`. That is the manual check, so the manual check is gone. `introduces_nulls` derives false from the non-`Option` `String` inside the `Result`, matching the declaration. Per-override accounting: `eval` becomes the function body minus the NULL check. `output_sql_type` returned `String.nullable(input_type.nullable)`, which is what the derived `String` output plus the unary tail gives for a non-nullable input, so no output modifier is needed. `preserves_uniqueness = true` carries over. `propagates_nulls` and `introduces_nulls` are derived as above. `could_error` was not overridden and inherited `LazyUnaryFunc`'s conservative `true`, which the fallible `Result` output derives. `is_monotone` and `is_eliminable_cast` returned the trait defaults and are dropped, as is `inverse`, whose `TODO?` about moving `typeconv` into `expr` now sits on the function. `Display` wrote a fixed string, so `sqlname` reproduces it. The registry reports only `sqlfunc_signature` moving, on the one record. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
antiguru
force-pushed
the
sqlfunc-convert-array
branch
from
October 14, 2026 15:18
940e58a to
f8baffe
Compare
antiguru
force-pushed
the
sqlfunc-convert-time
branch
from
October 14, 2026 15:18
a95413f to
a2e032f
Compare
antiguru
removed this pull request from stack #38942
October 14, 2026 15:45
Member
Author
|
Folded into #39062, which now carries all twenty file conversions as separate commits, per review feedback to land them as one PR. Posted by Claude Code. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Converts
CastArrayToStringto#[sqlfunc]. It was a hand-writtenLazyUnaryFuncbecause it allocates its result, which the arena passed toEagerUnaryFunc::callnow covers. Its NULL check moves into the input type:ExcludeNull<Datum<'a>>keepspropagates_nullstrue and returns NULL for a NULL input, as before.The registry reports only
sqlfunc_signaturemoving, on the one record.Based on #39090.
🤖 Generated with Claude Code