Skip to content

include bound SQL values in the dataset cache key - #8881

Open
Chessing234 wants to merge 2 commits into
huggingface:mainfrom
Chessing234:fix/sql-bound-cache-key
Open

Chessing234 wants to merge 2 commits into
huggingface:mainfrom
Chessing234:fix/sql-bound-cache-key

Conversation

@Chessing234

@Chessing234 Chessing234 commented Oct 23, 2026 •

Copy link
Copy Markdown

fixes #8877

str(sql.compile()) drops the bound values, so two queries that differ only by a WHERE, LIMIT, or IN parameter reused one cache entry. the key now inlines those binds.

@lhoestq

two queries that differed only by a parameter were cached as the same dataset.
@HuggingFaceDocBuilderDev

Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@lhoestq

lhoestq commented Oct 23, 2026

Copy link
Copy Markdown
Member

hi ! can you run make style to fix code formatting ? thx !

@Chessing234

Copy link
Copy Markdown
Author

formatted the compile call

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.

Dataset.from_sql caches different SQLAlchemy queries under the same key when bound values change

3 participants