Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
9efb417
Move `lead-lag` to `functions-window` package
jcsherin Oct 2, 2024
6f05a9c
Builds with warnings
jcsherin Oct 2, 2024
d2ebd3a
Adds `PartitionEvaluatorArgs`
jcsherin Oct 2, 2024
e5e5ab9
Extracts `shift_offset` from input expressions
jcsherin Oct 3, 2024
303b74b
Computes shift offset
jcsherin Oct 3, 2024
689ed3a
Get default value from input expression
jcsherin Oct 3, 2024
0774a58
Implements `partition_evaluator`
jcsherin Oct 3, 2024
009a1be
Fixes compiler warnings
jcsherin Oct 3, 2024
8dc161f
Comments out failing tests
jcsherin Oct 3, 2024
45e259e
Fixes `cargo test` errors and warnings
jcsherin Oct 3, 2024
0d2aa99
Minor: taplo formatting
jcsherin Oct 3, 2024
5ccb795
Delete code
jcsherin Oct 3, 2024
7d8b3e6
Define `lead`, `lag` user-defined window functions
jcsherin Oct 3, 2024
ba9d24a
Fixes `cargo build` errors
jcsherin Oct 3, 2024
402dcac
Export udwf and expression public APIs
jcsherin Oct 3, 2024
2ce0883
Mark result field as nullable
jcsherin Oct 3, 2024
95e8f87
Delete `return_type` tests for `lead` and `lag`
jcsherin Oct 3, 2024
04f30ec
Disables test: window function case insensitive
jcsherin Oct 3, 2024
d034082
Fixes: lowercase name in logical plan
jcsherin Oct 3, 2024
513df2a
Reverts to old methods for computing `shift_offset`, `default_value`
jcsherin Oct 3, 2024
bb0bd8b
Implements expression reversal
jcsherin Oct 3, 2024
0e576bb
Fixes: lowercase name in logical plans
jcsherin Oct 3, 2024
5490860
Fixes: doc test compilation errors
jcsherin Oct 3, 2024
f0c0e72
Temporarily quite clippy errors
jcsherin Oct 3, 2024
9051d2f
Fixes proto defintion
jcsherin Oct 3, 2024
b4cdc10
Merge branch 'main' into convert-lead-lag-udwf
jcsherin Oct 3, 2024
be74322
Minor: fixes formatting
jcsherin Oct 3, 2024
c9ac517
Fixes: doc tests
jcsherin Oct 4, 2024
e37752f
Uses macro for defining `lag_udwf()` and `leag_udwf()`
jcsherin Oct 4, 2024
6fb12e6
Fixes: window fuzz test cases
jcsherin Oct 7, 2024
ae26cb6
Copies doc comments verbatim from `BuiltInWindowFunction` enum
jcsherin Oct 7, 2024
51652d7
Deletes from window function case insensitive test
jcsherin Oct 7, 2024
723ca68
Deletes `BuiltInWindowFunction` expression APIs
jcsherin Oct 7, 2024
742c196
Delete from `create_built_in_window_expr`
jcsherin Oct 7, 2024
99093f5
Deletes proto serialization
jcsherin Oct 7, 2024
0925785
Delete from `BuiltInWindowFunction` enum
jcsherin Oct 7, 2024
6f05818
Deletes test for finding built-in window function
jcsherin Oct 7, 2024
0be8500
Merge branch 'main' into convert-lead-lag-udwf
jcsherin Oct 8, 2024
5854f77
Merge branch 'main' into convert-lead-lag-udwf
jcsherin Oct 10, 2024
e69463f
Fixes build errors + deletes redundant code
jcsherin Oct 10, 2024
d0baa94
Deletes more code
jcsherin Oct 10, 2024
9199943
Delete unnecessary structs
jcsherin Oct 10, 2024
000ceb7
Refactors shift offset computation
jcsherin Oct 10, 2024
ae0b91b
Passes range unit test
jcsherin Oct 10, 2024
a0973f9
Fixes: clippy::get-first error
jcsherin Oct 10, 2024
9ddf1c9
Rewrite unit tests for WindowUDF
jcsherin Oct 10, 2024
3a084ed
Fixes: unit test for lag with default value
jcsherin Oct 10, 2024
82abc5c
Consistent input expressions and data types in unit tests
jcsherin Oct 10, 2024
d1a35d7
Merge branch 'main' into convert-lead-lag-udwf
jcsherin Oct 10, 2024
e648033
Minor: fixes formatting
jcsherin Oct 10, 2024
ea811c6
Restore original helper method for unit tests
jcsherin Oct 11, 2024
3b6bc5d
Revert "Refactors shift offset computation"
jcsherin Oct 11, 2024
ab8a83c
Moves helper functions into `functions-window-common` package
jcsherin Oct 11, 2024
66c4f5e
Uses common helper functions in `{lead, lag}`
jcsherin Oct 11, 2024
c25ba86
Minor: formatting
jcsherin Oct 11, 2024
5f3df05
Revert "Moves helper functions into `functions-window-common` package"
jcsherin Oct 11, 2024
6b16550
Moves common functions to utils
jcsherin Oct 11, 2024
a65ef26
Merge branch 'main' into convert-lead-lag-udwf
jcsherin Oct 11, 2024
072d748
Minor: formatting fixes
jcsherin Oct 11, 2024
952dee0
Update lowercase names in explain output
jcsherin Oct 11, 2024
4ba4a62
Adds doc for `lead()` and `lag()` expression functions
jcsherin Oct 11, 2024
873736a
Add doc for `WindowShiftKind::shift_offset`
jcsherin Oct 11, 2024
3eb0985
Remove `arrow` dev dependency
jcsherin Oct 11, 2024
0f9ad76
Minor: formatting
jcsherin Oct 11, 2024
df7cff4
Update inner doc comment
jcsherin Oct 11, 2024
5550015
Serialize 1 or more window function arguments
jcsherin Oct 12, 2024
9e5916d
Adds logical plan roundtrip test cases
jcsherin Oct 12, 2024
c6e8235
Refactor: readability of unit tests
jcsherin Oct 12, 2024
d7ee287
Minor: rename variable bindings
jcsherin Oct 12, 2024
4fe2135
Minor: copy edit
jcsherin Oct 12, 2024
7dbb7e8
Revert "Remove `arrow` dev dependency"
jcsherin Oct 12, 2024
7892e05
Merge branch 'main' into convert-lead-lag-udwf
jcsherin Oct 14, 2024
7d00e3a
Merge remote-tracking branch 'apache/main' into convert-lead-lag-udwf
alamb Oct 16, 2024
47c2b9c
Merge branch 'main' into convert-lead-lag-udwf
jcsherin Oct 16, 2024
4385f21
Move null argument handling helper to utils
jcsherin Oct 16, 2024
270a203
Disable failing sqllogic tests for handling NULL input
jcsherin Oct 16, 2024
93569ed
Revert "Disable failing sqllogic tests for handling NULL input"
jcsherin Oct 17, 2024
814a9b7
Fixes: incorrect NULL handling in `lead`/`lag` window function
jcsherin Oct 17, 2024
c4b8840
Adds more tests cases
jcsherin Oct 17, 2024
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
Prev Previous commit
Next Next commit
Fixes cargo build errors
  • Loading branch information
jcsherin committed Oct 3, 2024
commit ba9d24a0aac0812e4cc9ea910d2e3333ed6274c5
3 changes: 1 addition & 2 deletions datafusion/functions-window/src/lead_lag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ use datafusion_expr::{
};
use datafusion_functions_window_common::field::WindowUDFFieldArgs;
use datafusion_functions_window_common::partition::PartitionEvaluatorArgs;
use datafusion_physical_expr::expressions::Literal;
use std::any::Any;
use std::cmp::min;
use std::collections::VecDeque;
Expand Down Expand Up @@ -186,7 +185,7 @@ fn try_get_literal<'a>(
) -> Result<&'a ScalarValue> {
partition_evaluator_args
.input_expr_at(index)
.and_then(|expr| expr.as_any().downcast_ref::<Literal>())
.and_then(|expr| expr.as_any().downcast_ref::<datafusion_physical_expr::expressions::Literal>())
.ok_or_else(|| DataFusionError::NotImplemented(
format!("There is only support for Literal types at field idx: {index} in Window Function")
)).map(|lit| lit.value())
Expand Down