Skip to content

Conversation

@federicocaccialanzaabb
Copy link
Contributor

Description

Small change to fix odata filters being passed as kwargs to azure document client

Fixes # (issue)
refers to #19370

New Package?

Did I fill in the tool.llamahub section in the pyproject.toml and provide a detailed README.md for my new integration or package?

  • Yes
  • No

Version Bump?

Did I bump the version in the pyproject.toml file of the package I am updating? (Except for the llama-index-core package)

  • Yes
  • No

from version 0.4.0 to version 0.4.1

Type of Change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Your pull-request will likely not be merged unless it is covered by some form of impactful unit testing.

  • I added new unit tests to cover this change
  • I believe this change is already covered by existing unit tests

Suggested Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added Google Colab support for the newly added notebooks.
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I ran uv run make format; uv run make lint to appease the lint gods

@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Sep 5, 2025
@Jash271
Copy link
Contributor

Jash271 commented Sep 5, 2025

While you're at it, mind making another minor change ?

The def aquery ( line 1270)

odata_filters = kwargs.get("odata_filters")

Can we update it to :

kwargs.get("odata_filters") or kwargs.get("odata_filter")

To make it consistent with def query ?


search_params.pop("odata_filter", None)
search_params.pop("odata_filters", None)

Copy link
Contributor

@Jash271 Jash271 Sep 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @federicocaccialanzaabb
Instead of popping these kwargs in multiple create_query_result function
I feel it's worth maybe popping them in here line : 1219

def query function, once we have loaded the odata_filter kwargs and then pop those 2 fields from the Kwargs that's initializing the downstream Azure classes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ciao @Jash271,

you are right it was a little bit a lazy commit,

I improved the code and run the tests,

check the aquery function too, I found what could have been a typo in with odata_filter being set equal to odata_filter and not odata_filters,

let me know if the new code proposal looks good to you

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me !

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @federicocaccialanzaabb
Can you update code to make sure the tests are passing ?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests are passing, just a check for code coverage is failing

Copy link
Contributor Author

@federicocaccialanzaabb federicocaccialanzaabb Sep 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @logan-markewich,

can you advise me on how to test the code coverage ?

(I can't seem to find the test script to run in order to check the coverage, or any information on how to do so in the contributing file, nor the uv run --pytest include this test)

The commit is also small, I was not expecting it to impact code coverage percentage

I have run the following uv run pytest --cov tests/

and the results were higher than 50%:

tests/test_azureaisearch.py ........ [ 88%]
tests/test_vector_stores_cogsearch.py . [100%]

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@federicocaccialanzaabb I'm not concerned about code coverage. But unit tests are failing -- but now they aren't, thanks!

@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels Sep 8, 2025
@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. and removed size:XS This PR changes 0-9 lines, ignoring generated files. labels Sep 8, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Sep 18, 2025
@logan-markewich logan-markewich merged commit a3927df into run-llama:main Sep 18, 2025
9 of 10 checks passed
frankiekim5 pushed a commit to frankiekim5/bedrock-agentcore-memory that referenced this pull request Sep 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants