-
-
Notifications
You must be signed in to change notification settings - Fork 40
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
feat: support array #130
feat: support array #130
Conversation
Thank you so much for this patch!
The reason behind this is there is no unsigned integer in postgresql. ( |
@@ -64,7 +64,7 @@ impl SimpleQueryHandler for DfSessionService { | |||
Ok(vec![Response::Error(Box::new(ErrorInfo::new( | |||
"ERROR".to_owned(), | |||
"XX000".to_owned(), | |||
"Datafusion is a readonly execution engine. To load data, call\nLOAD csv_file_path table_name;".to_owned(), | |||
"Datafusion is a readonly execution engine. To load data, call\nLOAD json_file_path table_name;".to_owned(), |
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.
By the way, could you please include a JSON sample file as reference?
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.
like this
{"a":[1,2,3],"b":[2.0,1.3,-6.1],"c":[false, true]}
{"a":[4,5,7],"b":[1.6,6.9,2.34],"c":[true, true]}
{"a":[2,5,2],"b":[0.1,1.9,-2.3],"c":[false, false]}
I think we should add comment doc to guide users to convert when they need unsigned types. When we use |
I see. That's fair reason for u8 implementation removal. By the way, I sent an email to you for your use-case of pgwire. Remember to check. Thank you. |
Array Support
This PR introduces support
Array
type, specifically validated withDataFusion
. While I'm uncertain whether this qualifies as a formal PR, it has proven beneficial for my use case. I modify thedatafusion.rs
example to facilitate the validation of this PR.Additionally, I removed the
ToSqlText
impl foru8
,u16
, andu64
. In my view, implToSqlText
should align with the correspondingToSql
types in thepostgres-types
crate, and providingToSqlText
for these three types could be misleading. I would appreciate your thoughts on this matter.If there are unfinished tasks to be addressed or if you have any suggestions, please let me know. I am willing to collaborate to complete the support for
Array
type.