alamb commented on code in PR #8842:
URL: https://github.com/apache/arrow-datafusion/pull/8842#discussion_r1453301756
##########
datafusion/expr/src/window_frame.rs:
##########
@@ -23,32 +23,76 @@
//! - An ending frame boundary,
//! - An EXCLUDE clause.
+use std::convert::{From, TryFrom};
+use std::fmt::{self, Formatter};
+use std::hash::Hash;
+
use crate::expr::Sort;
use crate::Expr;
+
use datafusion_common::{plan_err, sql_err, DataFusionError, Result,
ScalarValue};
use sqlparser::ast;
use sqlparser::parser::ParserError::ParserError;
-use std::convert::{From, TryFrom};
-use std::fmt;
-use std::fmt::Formatter;
-use std::hash::Hash;
-/// The frame-spec determines which output rows are read by an aggregate
window function.
-///
-/// The ending frame boundary can be omitted (if the BETWEEN and AND keywords
that surround the
-/// starting frame boundary are also omitted), in which case the ending frame
boundary defaults to
-/// CURRENT ROW.
+/// The frame specification determines which output rows are read by an
aggregate
+/// window function. The ending frame boundary can be omitted if the `BETWEEN`
+/// and `AND` keywords that surround the starting frame boundary are also
omitted,
+/// in which case the ending frame boundary defaults to `CURRENT ROW`.
#[derive(Clone, PartialEq, Eq, Hash)]
pub struct WindowFrame {
- /// A frame type - either ROWS, RANGE or GROUPS
+ /// Frame type - either `ROWS`, `RANGE` or `GROUPS`
pub units: WindowFrameUnits,
- /// A starting frame boundary
+ /// Starting frame boundary
pub start_bound: WindowFrameBound,
- /// An ending frame boundary
+ /// Ending frame boundary
pub end_bound: WindowFrameBound,
- /// Flag indicates whether window frame is causal
- /// See documentation for [is_frame_causal] for what causal means in this
context and how it is calculated.
- is_causal: bool,
+ /// Flag indicating whether the frame is causal (i.e. computing the result
Review Comment:
👍
--
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]