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

Infer array type when first value is null #408

Closed
andreamatte-smartpricing opened this issue Jun 29, 2022 · 2 comments
Closed

Infer array type when first value is null #408

andreamatte-smartpricing opened this issue Jun 29, 2022 · 2 comments

Comments

@andreamatte-smartpricing
Copy link

andreamatte-smartpricing commented Jun 29, 2022

I'm trying to follow the solution from #72 (comment).
There are 3 columns of type timestamptz. 2 of them work fine, but one of them gets infered as type string instead of date.
This happens because the first row has value null in that column.
How should I proceed? Is there any way to force the type inferred by sql.array(...)?

@porsager
Copy link
Owner

porsager commented Jul 3, 2022

sql.array should not be necessary since v3. What happens if you pass the array directly instead? If that's still an issue the change in this PR might help #392

@andreamatte-smartpricing
Copy link
Author

Removing the sql.array() call fixed the issue, thanks

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

No branches or pull requests

2 participants