Skip to content

refactor: rename L3Scalar to ScalarValue - #215

Merged
zzylol merged 1 commit into
mainfrom
rename-l3scalar-to-scalarvalue
Aug 18, 2026
Merged

zzylol merged 1 commit into
mainfrom
rename-l3scalar-to-scalarvalue

Conversation

@zzylol

@zzylol zzylol commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

What

Renames L3Scalar to ScalarValue (raised during review of #214).
L3Scalar's name was a holdover from the pre-#205 L2Expr/L3Expr
split, where the L2/L3 prefix distinguished a scalar expression
tree's unresolved-vs-resolved column-reference state. That distinction
never actually applied to the literal-value type itself (a literal has
no column reference to resolve), and it stopped meaning anything once
#205 folded the scalar variants directly into QueryExpr<C>.
ScalarValue names what it is without the stale prefix.

Wrinkle

asap-frontend-sql's sql/mod.rs and sql/types.rs both already
import datafusion::common::ScalarValue unqualified, so renaming
asap_types's type to the same name collided in those two files.
Resolved by aliasing the DataFusion import to DfScalarValue in both
(matching the file's existing DataType as ArrowDataType convention)
rather than renaming the asap-types type — this crate is
asap-types's own vocabulary, DataFusion's is the guest here.

Verification

cargo build / clippy --all-targets --all-features --locked -- -D warnings / fmt --all -- --check / test --workspace --locked /
doc --workspace --no-deps all clean. Same test counts as before
(61 asap-types, 180 asap-frontend-promql, 68 asap-frontend-sql, 81
asap-integration-tests, 26 asap-aware-mapping), no doc warnings beyond
the pre-existing baseline. Pure rename — no behavior change.

🤖 Generated with Claude Code

L3Scalar's name was a holdover from the pre-#205 L2Expr/L3Expr split
(where the "L2"/"L3" prefix distinguished unresolved-vs-resolved
column-reference state); that distinction never applied to the literal
type itself, and it no longer means anything now that scalar variants
live directly in QueryExpr<C>. ScalarValue says what it is without the
stale prefix.

Mechanical rename across every crate that names it. One real wrinkle:
asap-frontend-sql's sql/mod.rs and sql/types.rs both already import
datafusion::common::ScalarValue unqualified — aliased that import to
DfScalarValue in both files (matching the file's existing `DataType as
ArrowDataType` convention) rather than renaming the asap type, since
this crate is asap-types' own vocabulary.

Verified: cargo build/clippy(--all-targets --all-features --locked --
-D warnings)/fmt --check/test(--locked)/doc --workspace all clean.
Same test counts as before (61+180+68+81+26+0), no doc warnings beyond
the pre-existing baseline.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@zzylol zzylol changed the title rename: L3Scalar -> ScalarValue refactor: rename L3Scalar to ScalarValue Aug 18, 2026
@zzylol
zzylol merged commit 3d52e71 into main Aug 18, 2026
3 of 4 checks passed
@zzylol
zzylol deleted the rename-l3scalar-to-scalarvalue branch August 18, 2026 22:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant