Skip to content
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion datafusion/proto/proto/datafusion.proto
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,7 @@ message AggregateUDFExprNode {
LogicalExprNode filter = 3;
repeated SortExprNode order_by = 4;
optional bytes fun_definition = 6;
optional NullTreatment null_treatment = 7;
}

message ScalarUDFExprNode {
Expand All @@ -538,6 +539,9 @@ message WindowExprNode {
// repeated LogicalExprNode filter = 7;
WindowFrame window_frame = 8;
optional bytes fun_definition = 10;
optional NullTreatment null_treatment = 11;
bool distinct = 12;
LogicalExprNode filter = 13;
}

message BetweenNode {
Expand Down Expand Up @@ -622,6 +626,12 @@ message WindowFrameBound {
datafusion_common.ScalarValue bound_value = 2;
}

enum NullTreatment {
NULL_TREATMENT_UNSPECIFIED = 0;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

As described in the issue, there should be a UNSPECIFIED field.
This is also noted here:
https://protobuf.dev/best-practices/dos-donts/#unspecified-enum

But I don't see we are doing it for other enums.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

e.g:

enum GenerateSeriesName {
GS_GENERATE_SERIES = 0;
GS_RANGE = 1;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I guess we never did it before because we don't try to maintain version compatibility:

//! # Version Compatibility
//!
//! The serialized form are not guaranteed to be compatible across
//! DataFusion versions. A plan serialized with one version of DataFusion
//! may not be able to deserialized with a different version.

RESPECT_NULLS = 1;
IGNORE_NULLS = 2;
}

///////////////////////////////////////////////////////////////////////////////////////////////////
// Arrow Data Types
///////////////////////////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -1365,4 +1375,4 @@ message SortMergeJoinExecNode {
JoinFilter filter = 5;
repeated SortExprNode sort_options = 6;
datafusion_common.NullEquality null_equality = 7;
}
}
148 changes: 148 additions & 0 deletions datafusion/proto/src/generated/pbjson.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 38 additions & 1 deletion datafusion/proto/src/generated/prost.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading