USE 449 - Update for DuckDB 1.5 compatibility#185
Merged
Conversation
Why these changes are being introduced: DuckDB was updated from 1.4 to 1.5, introducing breaking changes that affect this library. DuckDB 1.5 now strictly requires a home_directory to be set when the HOME env var is unset or empty (e.g. AWS Lambda cold starts), and fetch_record_batch() has been deprecated in favor of to_arrow_reader(). How this addresses that need: * Set home_directory in the _install_extensions fallback block before installing extensions, fixing IOException in Lambda environments * Replace deprecated fetch_record_batch() with to_arrow_reader() in dataset.py and embeddings.py (param renamed rows_per_batch to batch_size) Side effects of this change: * None expected; to_arrow_reader() returns the same RecordBatchReader interface Relevant ticket(s): * https://mitlibraries.atlassian.net/browse/USE-449
ehanson8
approved these changes
Mar 16, 2026
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.
Purpose and background context
Why these changes are being introduced:
duckdbwas updated from 1.4 to 1.5 (release notes), introducing breaking changes that affect this library.duckdb1.5 now strictly requires ahome_directoryto be set when theHOMEenv var is unset or empty (e.g. AWS Lambda cold starts), andfetch_record_batch()has been deprecated in favor ofto_arrow_reader().How this addresses that need:
home_directoryin the_install_extensionsfallback block before installing extensions, fixing IOException in Lambda environmentsfetch_record_batch()withto_arrow_reader()indataset.pyandembeddings.py(param renamedrows_per_batchtobatch_size)How can a reviewer manually see the effects of these changes?
Nothing to see!
make testis sufficient, which was failing after upgrade toduckdb == 1.5.Includes new or updated dependencies?
YES | NO
Changes expectations for external applications?
NO
What are the relevant tickets?
Code review