fix: preserve '=' inside --filter values - #442
Open
jacalata wants to merge 2 commits into
Open
Conversation
Previously `apply_filter_value` called `value.split("=")`, so a filter
like `Notes=x=y` silently truncated to name=Notes, value=x. Split on the
first '=' only (maxsplit=1) so multi-'=' values round-trip intact, and
raise a clear error when the input isn't in name=value form.
Verified end-to-end against a real workbook: `Product Name=x=y Config Kit`
now filters correctly instead of returning empty results.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
3 tasks
Dataset with product names containing '=', '&', ',', backslashes, and metacharacter samples for exercising --filter parsing edge cases against a real server. Also includes columns whose names contain '&', '#', and '\' so future tests can exercise special characters on both sides of the name=value pair. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
apply_filter_valuesplit on every=, so--filter "Notes=x=y"silently became name=Notes, value=x. Values that legitimately contain=(config strings, formulas, part numbers, etc.) were being truncated.=only (maxsplit=1), and raise a clear error when the input isn't inname=valueform.=inside the value, multiple=inside the value, and a trailing=(empty value).Verification
Verified end-to-end against a live workbook containing product names with
=characters:Product Name=Widget Plain(baseline)Product Name=x=y Config KitTest plan
pytest tests/commands/test_datasources_and_workbooks_command.py— 28 passedtabcmd export --csv --filter "Product Name=x=y Config Kit"against a real Tableau Cloud site returns the expected single row🤖 Generated with Claude Code