Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
ggevay committed Dec 22, 2023
1 parent da51b62 commit 7ed1020
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 1 addition & 3 deletions src/sql-parser/src/ast/defs/statement.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3210,9 +3210,7 @@ pub struct RefreshAtOptionValue<T: AstInfo> {

#[derive(Debug, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct RefreshEveryOptionValue<T: AstInfo> {
// The following is a String and not an IntervalValue, because that starts with the keyword
// INTERVAL, but that is not needed here, since the only thing that can come here is an
// interval, so no need to indicate this with an extra keyword.
// The refresh interval.
pub interval: IntervalValue,
// We need an Expr because we want to support `mz_now()`.
pub aligned_to: Option<Expr<T>>,
Expand Down
1 change: 1 addition & 0 deletions src/sql/src/plan/with_options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,7 @@ impl<V: TryFromValue<Value>, T: AstInfo + std::fmt::Debug> TryFromValue<WithOpti
| WithOptionValue::Refresh(_) => sql_bail!(
"incompatible value types: cannot convert {} to {}",
match v {
// The first few are unreachable because they are handled at the top of the outer match.
WithOptionValue::Value(_) => unreachable!(),
WithOptionValue::Ident(_) => unreachable!(),
WithOptionValue::RetainHistoryFor(_) => unreachable!(),
Expand Down
3 changes: 3 additions & 0 deletions src/sql/src/pure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1488,6 +1488,9 @@ const MZ_NOW_SCHEMA: &str = "mz_catalog";

/// Purifies a CREATE MATERIALIZED VIEW statement. Additionally, it adjusts `resolved_ids` if
/// references to ids appear or disappear during the purification.
///
/// Note that in contrast with [`purify_statement`], this doesn't need to be async, because
/// this function is not making any network calls.
pub fn purify_create_materialized_view_options(
catalog: impl SessionCatalog,
mz_now: Option<Timestamp>,
Expand Down

0 comments on commit 7ed1020

Please sign in to comment.