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

silently accept an empty array? #327

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

silently accept an empty array? #327

wants to merge 1 commit into from

Conversation

Fil
Copy link
Contributor

@Fil Fil commented Nov 24, 2022

even though Arrow doesn't know what to do with the empty array, it seems to me that

a = DuckDBClient.of({ name: [] })

should not throw an error. I'm not sure if this is enough, though (do we want to create an empty table with no columns; possibly respect a .columns property on the empty array)?

A related case is when the array contains tricky objects, for example:

DuckDBClient.of({ name: [{ a: {} }, {}] })

this currently fails with the Arrow error: TypeError: Cannot read properties of undefined (reading 'constructor'), when we could maybe cast to strings (?).

🤔

@Fil Fil added enhancement New feature or request question Further information is requested labels Nov 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant