-
Notifications
You must be signed in to change notification settings - Fork 20
Add early support for nested types (like struct and list<struct>) #69
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
This reverts commit 4313e41.
@sunng87 Current integration test is not good enough to make sure this feature works. Do you have any ideas on how we can improve tests for this ? Specifically testing for binary/text encoding and other features like information schema |
@trueleo Can we retrieve the return value and do assertion on it? |
@sunng87 I think the following can work out here. In extended query doc, there is this note.
If a postgres client's can pick what format to return query data in, then the assertions can be done inside the integration test. This seems possible with python psycopg3 I will test this out and add it to current integration test if this works out. |
[date(2012, 1, 1), None, date(2012, 1, 2)], | ||
[datetime(2012, 1, 1), None, datetime(2012, 1, 2)], | ||
( | ||
(1, 1.0, "a", True, date(2012, 1, 1), datetime(2012, 1, 1)) |
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.
@sunng87 I added an integration test. This test passes for both binary and text format but with some hiccups. In binary format, it seems psycopg3 stringifies fields inside struct type.
@sunng87 Awaiting you review on this. I think this can be merged as it is but no hurries if you're busy. This PR does not cover list<list> types and beyond. Will like to know your thoughts and nitpicks. |
Sorry for the delay. I'm running low with my bandwidth. I will try time in this weekend or next week for this. Thank you! |
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.
I think this looks quite good to me. There may be some minor clones can be eliminated but I will take over and refactor it by myself. Thank you for patch!
Summary
This PR introduces early support for nested types, such as Struct and List, similar to those found in DataFusion. The primary goal is to explore and validate an approach for encoding these complex types.
Changes
Note
I couldn't find any official information about what client's are suppose to accept. Struct binary encoding is based on the logic found here