Skip to content

fix(plugins): filter-bar BETWEEN is refused on Typesense and Weaviate and misrendered on BigQuery - #3193

Merged
datlechin merged 3 commits into
mainfrom
fix/between-filter-non-sql
Sep 30, 2026
Merged

datlechin merged 3 commits into
mainfrom
fix/between-filter-non-sql

Conversation

@datlechin

Copy link
Copy Markdown
Member

Summary

  • Filter-bar BETWEEN was refused on Typesense (year is not a numeric field) and Weaviate (5,10 is not a number), and rendered on BigQuery as `n` BETWEEN '1,9' AND 9. The app sends a BETWEEN as value: "lower,upper" plus secondValue: upper, and TypesenseFilterBuilder.range, WeaviateFilterBuilder.between and BigQueryQueryBuilder.betweenClause read the whole joined value as the lower bound; each now strips the trailing ,upper first, comparing Unicode scalars so a lower bound ending in a Prepend scalar such as U+0600 (which merges with the comma into one Character) is still recovered.
  • Cassandra's Match any refusal told the reader to "Use Match All", a control no one who can reach that refusal has. The filter bar hides Match any on Cassandra and ScyllaDB and rewrites a restored Match any to Match all, so only an MCP client sending logic: "or" gets the message; it now states the limit, "Cassandra filters can only require every condition to match.", and names no control.

Tests

Every BETWEEN test below builds the filter the way the app does, through TableFilter.asPluginQueryFilter, or feeds that joined shape literally where the package cannot see the app. Each one fails without the fix.

  • TypesenseFilterBuilderTests.buildsRangeFromAppEncoding
  • TypesenseFilterBuilderTests.buildsRangeAfterSearchTagRoundTrip
  • TypesenseFilterBuilderTests.buildsNumericComparisons (its BETWEEN line now feeds "1937,1965")
  • BigQueryQueryBuilderSQLTests.betweenFromAppEncoding
  • BigQueryQueryBuilderSQLTests.betweenFromAppEncodingWithComma
  • BigQueryQueryBuilderSQLTests.betweenFromAppEncodingWithPrependScalar
  • BigQueryQueryBuilderTagColumnTests.filterCarriesColumns
  • WeaviateFilterOperatorTests.betweenBounds
  • WeaviateFilterOperatorTests.betweenReadsLowerBoundOffJoinedValue
  • WeaviateFilterOperatorTests.betweenRefusesPrependScalarLowerBoundAlone
  • WeaviateSortTests.secondValueRoundTrips
  • CassandraBrowseStatementTests.matchAnyRefusalNamesNoControl

BigQueryQueryBuilderSQLTests.betweenFromJoinedValueAlone guards the existing fallback for a BETWEEN with no separate upper bound and passes with or without the fix.

Docs

The docs rewrite branch covers the user-facing text.

@datlechin
datlechin merged commit d4d65cd into main Sep 30, 2026
5 checks passed
@datlechin
datlechin deleted the fix/between-filter-non-sql branch September 30, 2026 03:04
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