Skip to content

Conversation

@sunyuhan1998
Copy link
Contributor

As mentioned in the issue, the PgVectorFilterExpressionConverter had an operator precedence problem when processing nested And and Or expressions due to missing parentheses.

This PR fixes that issue by making the following two adjustments:

  1. Modified the PgVectorFilterExpressionConverter to add parentheses when handling And and Or operators.
  2. Added corresponding unit tests.

Fixed #3577

…verter when parsing nested `And` and `Or` expressions, and added corresponding unit tests.

Signed-off-by: Sun Yuhan <[email protected]>
@sunyuhan1998 sunyuhan1998 changed the title Fixed GH3577, Fixed the error in the PgVectorFilterExpressionConverter when parsing expressions. Fixed GH-3577, Fixed the error in the PgVectorFilterExpressionConverter when parsing expressions. Jun 18, 2025
@sunyuhan1998 sunyuhan1998 marked this pull request as draft June 18, 2025 02:51
@sunyuhan1998 sunyuhan1998 deleted the fix-issue-3577 branch June 18, 2025 02:55
@sunyuhan1998
Copy link
Contributor Author

It was my misunderstanding. We should use group to manually specify parentheses. This PR is invalid and has been closed.

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.

PgVectorStore does not handle ANDs and ORs together properly when using the FilterExpressionBuilder

1 participant