Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
st1page committed Apr 18, 2023
1 parent 32b9976 commit 507c92f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/frontend/src/expr/pure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,9 @@ impl ExprVisitor<bool> for ImpureAnalyzer {
| expr_node::Type::Sind
| expr_node::Type::Cosd
| expr_node::Type::Tand
| expr_node::Type::ArrayPositions => {
| expr_node::Type::ArrayPositions =>
// expression output is deterministic(same result for the same input)
{
let x = func_call
.inputs()
.iter()
Expand All @@ -158,6 +160,7 @@ impl ExprVisitor<bool> for ImpureAnalyzer {
.unwrap_or_default();
x
}
// expression output is not deterministic
expr_node::Type::Vnode
| expr_node::Type::Now
| expr_node::Type::Proctime
Expand All @@ -173,6 +176,7 @@ pub fn is_impure(expr: &ExprImpl) -> bool {
let mut a = ImpureAnalyzer {};
a.visit_expr(expr)
}

#[cfg(test)]
mod tests {
use risingwave_common::types::DataType;
Expand Down

0 comments on commit 507c92f

Please sign in to comment.