Skip to content

expand custom value handling to more commands#17668

Merged
NotTheDr01ds merged 2 commits intonushell:mainfrom
fdncred:expand_sqlite_pushdown
Feb 28, 2026
Merged

expand custom value handling to more commands#17668
NotTheDr01ds merged 2 commits intonushell:mainfrom
fdncred:expand_sqlite_pushdown

Conversation

@fdncred
Copy link
Copy Markdown
Contributor

@fdncred fdncred commented Feb 28, 2026

This PR expands custom value handling like the one we use in sqlite into other commands.

The real question is do we want to take this route or do we want to make it a little more eager instead of the lazy pushdown sqlite approach.

Release notes summary - What our users need to know

Expand custom command value handling to other commands so that sqlite access is fast.

image

Tasks after submitting

N/A

@fdncred fdncred marked this pull request as draft February 28, 2026 01:54
@NotTheDr01ds NotTheDr01ds marked this pull request as ready for review February 28, 2026 13:42
@NotTheDr01ds NotTheDr01ds merged commit eb4058b into nushell:main Feb 28, 2026
16 checks passed
@github-actions github-actions bot added this to the v0.111.0 milestone Feb 28, 2026
@fdncred fdncred deleted the expand_sqlite_pushdown branch February 28, 2026 13:44
@fdncred fdncred added notes:fixes Include the release notes summary in the "Bug fixes" section notes:ready The "Release notes summary" section of this PR is ready to be included in our release notes. labels Feb 28, 2026
NotTheDr01ds pushed a commit that referenced this pull request Mar 7, 2026
This PR is a follow-on of these PRs to hopefully finish the last fixing of the sqlite pushdown. The biggest part of this fix is creating mini-sqlite-column-projection code for when sqlite column names are aliased in rust code like `command_line as command`. It's not a fully sql parser but it looks for column aliasing so it knows how to select the data properly. I've tried to comment the code verbosely to help us all remember what it's doing.

- #17415
- #17645
- #17680
- #17668

I also took the opportunity to refactor the push down calls from filter commands so that they're easier to understand by calling a new pipeline function that does the same thing but in a little cleaner way.

There's also a bunch of new tests around `open some_sqlite_file.db`.

Before this PR you would get this with `history | select command`
because `command` is an alias to `command_line`.
```nushell
❯ history | select command
Error: nu::shell::error

  × Failed to execute query
   ╭─[repl_entry #1:1:11]
 1 │ history | select command
   ·           ───┬──
   ·              ╰── no such column: command in SELECT command FROM [history] at offset 7
   ╰────
```
After, it just works (tm)

## Release notes summary - What our users need to know

Refactor sqlite push down and apply to (nearly) all filter commands.

## Tasks after submitting

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

Labels

notes:fixes Include the release notes summary in the "Bug fixes" section notes:ready The "Release notes summary" section of this PR is ready to be included in our release notes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants