Skip to content

Add scalar functions in SELECT: UPPER, LOWER, LENGTH, ABS #1

Description

@Maniarasan-zuper

Add scalar string/number functions in SELECT: UPPER, LOWER, LENGTH, ABS.

Today SELECT projects columns and aggregates but has no scalar functions. Add a handful of pure, single-argument functions usable in the select list: UPPER(s), LOWER(s), LENGTH(s), ABS(n).

Where

  • Parser: v2/src/sql.cpp — recognize func(expr) in the select list.
  • Projection: v2/src/exec.cpp — the materialize/project path.

Acceptance criteria

  • SELECT UPPER(name), LENGTH(name) FROM users returns correct values.
  • An unknown function gives a clear parse error.
  • Add a bench2 correctness check that compares against SQLite.
  • Document the supported list in README/ROADMAP.

Scope note: scalar-in-projection only — no nesting inside WHERE yet (that's the larger "expression engine" roadmap item).

See CONTRIBUTING.md and comment here to claim it.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions