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

[ballista] support date_part and date_turnc ser/de, pass tpch 7 #840

Merged
merged 1 commit into from
Aug 9, 2021

Conversation

houqp
Copy link
Member

@houqp houqp commented Aug 9, 2021

Rationale for this change

Add date_part and date_trunc ser/de to support tpch 7 in ballista

What changes are included in this PR?

  • Add date_part and date_trunc function expr node ser/de to ballista.
  • Enable tpch 7 in ballista integration test

Are there any user-facing changes?

  • Renamed ScalarFunctionNode's expr field to args to be more consistent with the rest of the code base
  • Reordered ScalarFunction enum in protobuf

@houqp houqp added enhancement New feature or request ballista labels Aug 9, 2021
@houqp houqp requested review from andygrove and alamb August 9, 2021 05:09
@github-actions github-actions bot added the datafusion Changes in the datafusion crate label Aug 9, 2021
Comment on lines +280 to +281
"date_part" | "datepart" => BuiltinScalarFunction::DatePart,
"date_trunc" | "datetrunc" => BuiltinScalarFunction::DateTrunc,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ballista physical plan ser/de uses function.to_string() to serialize the name, which uses the enum name and resulted in function name without _.

@houqp houqp changed the title [ballista] support date_part and date_turnc, pass tpch 7 [ballista] support date_part and date_turnc ser/de, pass tpch 7 Aug 9, 2021
SHA384 = 31;
SHA512 = 32;
LN = 33;
DATEPART = 27;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes it a breaking change? Not that it matters much now I guess, but would be good to know when it starts mattering.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, there is another breaking change in ScalarFunctionNode where i renamed expr field to args. Both of these changes are done purely for improving readability of the code base.

I think we should start to be careful about breaking change when we start to receive interests in using ballista for production PoC. But if any one thinks we shouldn't introduce breaking change for readability even at current stage, I am more than happy to revert these changes.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think until we know someone is using the ballista codebase in a way that such a change will affect them, we should not spend extra time striving for backwards compatibility (aka in my opinion this change is fine).

Ballista also looks to me like more of an overall system (aka something people could use directly rather than as a library) which is different than DataFusion. I wonder if internal changes such as these enum values changes are less of an issue with such a system.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that we don't need to worry too much about breaking changes at this point given the early and experimental nature of Ballista.

Copy link
Contributor

@Dandandan Dandandan Aug 9, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@@ -1140,6 +1140,7 @@ mod tests {
test_round_trip!(q3, 3);
test_round_trip!(q5, 5);
test_round_trip!(q6, 6);
test_round_trip!(q7, 7);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the status of query 8,9,13,14,19 in Ballista?
Those are now included in the DataFusion CI

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are all broken in ballista due to different ser/de errors, my plan is to fix them one at a time so we are on par with datafusion.

@houqp houqp added api change Changes the API exposed to users of the crate and removed datafusion Changes in the datafusion crate labels Aug 9, 2021
@houqp houqp requested a review from Dandandan August 9, 2021 07:31
@Dandandan Dandandan merged commit 0125451 into apache:master Aug 9, 2021
@Dandandan
Copy link
Contributor

Thanks @houqp

@houqp houqp deleted the qp_tpch7 branch August 9, 2021 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api change Changes the API exposed to users of the crate enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants