buraksenn commented on code in PR #13201:
URL: https://github.com/apache/datafusion/pull/13201#discussion_r1836543691
##########
datafusion/proto/tests/cases/roundtrip_physical_plan.rs:
##########
@@ -272,31 +269,34 @@ fn roundtrip_window() -> Result<()> {
let field_b = Field::new("b", DataType::Int64, false);
let schema = Arc::new(Schema::new(vec![field_a, field_b]));
- let window_frame = WindowFrame::new_bounds(
+ let _window_frame = WindowFrame::new_bounds(
datafusion_expr::WindowFrameUnits::Range,
WindowFrameBound::Preceding(ScalarValue::Int64(None)),
WindowFrameBound::CurrentRow,
);
- let builtin_window_expr = Arc::new(BuiltInWindowExpr::new(
- Arc::new(NthValue::first(
- "FIRST_VALUE(a) PARTITION BY [b] ORDER BY [a ASC NULLS LAST] RANGE
BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW",
- col("a", &schema)?,
- DataType::Int64,
- false,
- )),
- &[col("b", &schema)?],
- &LexOrdering{
- inner: vec![PhysicalSortExpr {
- expr: col("a", &schema)?,
- options: SortOptions {
- descending: false,
- nulls_first: false,
- },
- }]
- },
- Arc::new(window_frame),
- ));
+ // let udwf_window_expr = Expr::WindowFunction(WindowFunction::new(
+ // WindowFunctionDefinition::WindowUDF(first_value_udwf()),
+
+ // let builtin_window_expr = Arc::new(BuiltInWindowExpr::new(
+ // Arc::new(NthValue::first(
+ // "FIRST_VALUE(a) PARTITION BY [b] ORDER BY [a ASC NULLS LAST]
RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW",
+ // col("a", &schema)?,
+ // DataType::Int64,
+ // false,
+ // )),
+ // &[col("b", &schema)?],
+ // &LexOrdering{
+ // inner: vec![PhysicalSortExpr {
Review Comment:
This does not work because we can't convert to proto. The issue is that we
have the following definition:
```
/// Nested message and enum types in `PhysicalWindowExprNode`.
pub mod physical_window_expr_node {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum WindowFunction {
#[prost(enumeration = "super::BuiltInWindowFunction", tag = "2")]
BuiltInFunction(i32),
#[prost(string, tag = "3")]
UserDefinedAggrFunction(::prost::alloc::string::String),
}
}
```
It can be UDAF or BuiltinFunction. This deletion
https://github.com/apache/datafusion/pull/13201/files#r1836542435, causes the
issue. What should I do here? I think deleting BuiltinWindowExpr was ok but
there is nothing to replace here AFAIS
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]