-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Fix sort node deserialization from proto #12626
Fix sort node deserialization from proto #12626
Conversation
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 catch. Thanks @palaska
LogicalPlanBuilder::from(input).sort(sort_expr)?.build() | ||
let fetch: usize = sort.fetch.try_into().map_err(|_| { | ||
DataFusionError::Internal(String::from( | ||
"Protobuf deserialization error, invalid limit value'", |
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.
It would be good to show the invalid value and/or the error message to ease debugging
Also, could you add/update a unit test so that we prevent future regressions? |
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.
Thanks @palaska and @andygrove
@@ -341,6 +341,32 @@ async fn roundtrip_logical_plan_aggregation() -> Result<()> { | |||
Ok(()) | |||
} | |||
|
|||
#[tokio::test] | |||
async fn roundtrip_logical_plan_sort() -> Result<()> { |
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 took the liberty of fixing the |
I guess when no |
@@ -704,6 +730,7 @@ async fn roundtrip_logical_plan_distinct_on() -> Result<()> { | |||
let plan = ctx.sql(query).await?.into_optimized_plan()?; | |||
|
|||
let bytes = logical_plan_to_bytes(&plan)?; | |||
println!("plan {:?}", plan); |
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.
nit: could you remove this debug println?
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.
oops
Which issue does this PR close?
Closes #.
Rationale for this change
What changes are included in this PR?
Are these changes tested?
Are there any user-facing changes?