GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [SQL] Implement LPAD and RPAD by mihaibudiu · Pull Request #7940 · feldera/feldera

Conversation

@mihaibudiu

@mihaibudiu mihaibudiu commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

There are 3 commits, two of them fix bugs in the docs and the implementation of type inference.
The third one implements two string functions LPAD and RPAD.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@mihaibudiu
mihaibudiu requested a review from anandbraman November 11, 2026 19:35
mythical-fred-oss[bot]
mythical-fred-oss Bot reviewed Nov 11, 2026
View reviewed changes
Comment thread ...compiler/SQL-compiler/src/main/java/org/dbsp/sqlCompiler/compiler/frontend/TypeCompiler.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

mythical-fred-oss[bot]
mythical-fred-oss Bot reviewed Nov 11, 2026
View reviewed changes
Comment thread ...compiler/SQL-compiler/src/main/java/org/dbsp/sqlCompiler/compiler/frontend/TypeCompiler.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

mythical-fred-oss[bot]
mythical-fred-oss Bot reviewed Nov 11, 2026
View reviewed changes
Comment thread ...n/java/org/dbsp/sqlCompiler/compiler/frontend/calciteCompiler/functions/CustomFunctions.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

@mythical-fred-oss

mythical-fred-oss Bot commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

What I ran

Check Result
cargo check --locked -p feldera-sqllib ✅
./build.sh + mvn test -Dtest=StringTests ✅ 9/9
pre-commit run --files <changed> ✅
Ad-hoc QA: LPAD on a CHAR(3) column, CASE over CHAR(3)/CHAR(2) columns ran; CHAR output differs from Postgres (inline comment)
Ad-hoc QA: LPAD('a', n) with BIGINT n = 3000000000 runtime error "Error converting 3000000000 to INTEGER". Postgres rejects this too (int4 arg), so it's acceptable

I also reverted the TypeCompiler hunk to compare. CHAR(3)-vs-CHAR(2) column CASE results are the same before and after, so only literal and mixed-length combinations change.

Gaps (medium)

  • Behaviour change: the type-inference fix changes view output types and values (CHAR(n) → VARCHAR(n), padding dropped). It needs a release-notes entry and a commit body explaining the why (see inline).
  • Missing tests: no test for the BINARY half of the type-inference change, and no LPAD/RPAD test on CHAR(n) columns.

The rest looks good: the docs are updated and LPAD/RPAD work on literals, NULLs and non-BMP characters.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

mihaibudiu added 3 commits November 11, 2026 16:38
@mihaibudiu
[SQL] Add LPAD and RPAD functions
f0ce03c
Signed-off-by: Mihai Budiu <[email protected]>
@mihaibudiu
docs: Remove incorrect statements about CHAR(n)
53265d5
Signed-off-by: Mihai Budiu <[email protected]>
@mihaibudiu
[SQL] Fix bug in type inference to match Calcite behavior
ee2ec33
Our reduceType() now matches Calcite's leastRestrictive()
with shouldConvertRaggedUnionTypesToVarying.

Signed-off-by: Mihai Budiu <[email protected]>
@mihaibudiu
mihaibudiu force-pushed the lpad-rpad branch from 6f8cf6c to ee2ec33 Compare November 12, 2026 00:44

This branch has not been deployed

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

Reviewers

@mythical-fred-oss mythical-fred-oss[bot] mythical-fred-oss[bot] left review comments
@anandbraman anandbraman Awaiting requested review from anandbraman

At least 1 approving review is required to merge this pull request.

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@mihaibudiu
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.