-
Notifications
You must be signed in to change notification settings - Fork 60
feat: add output_schema parameter to ai.generate() #2139
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
Conversation
@pytest.mark.parametrize( | ||
("sql", "expected"), | ||
[ | ||
("x INT64", (pa.field("x", pa.int64()),)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we support lowercase dtype strings (e.g., "int64") for compatibility with pandas APIs like astype()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. Updated the parser to check the type strings in the case-insensitive way.
638037f
to
780ff9f
Compare
b/446974666
I decided to create a local parser for transforming SQL type strings to PyArrow types. The code turned out to be not too difficult to write.
Plus, both the BigFrames and Ibis operators can deduct dtypes locally.