Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught exception when using single cell ranges #62

Closed
mharrisb1 opened this issue Feb 6, 2025 · 1 comment · Fixed by #63
Closed

Uncaught exception when using single cell ranges #62

mharrisb1 opened this issue Feb 6, 2025 · 1 comment · Fixed by #63

Comments

@mharrisb1
Copy link
Contributor

Still tracking down the root cause. Will update this issue

Introduced from #57

@mharrisb1
Copy link
Contributor Author

Okay, I've found the issue.

In this snippet:

idx_t start_index = header ? 1 : 0;
if (start_index >= sheet_data.values.size()) {
return bind_data;
}

We return early if start_index >= sheet_data.values.size(). At this point the ReadSheetBindData attributes return_types and names are empty vectors.

When the bind method eventually gets called by DuckDB it will fail this check:

https://github.com/duckdb/duckdb/blob/19864453f7d0ed095256d848b46e7b8630989bac/src/planner/binder/tableref/bind_table_function.cpp#L220-L223

The fix would be to ensure that we have established the column name and types before exiting early so DuckDB does not throw the error we've observed.

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 a pull request may close this issue.

1 participant