STET

agent_patch

runs/2026-02-28__18-27-22__gpt-5-1-codex-mini/flux-pr-2172/flux-pr-2172.1-of-1.2026-02-28__18-27-22__gpt-5-1-codex-mini/agent-logs/agent.patch

25661 bytes

Back to adjudication
diff --git a/tmp/agent-patch-flux-pr-2172.1-of-1.2026-02-28__18-27-22__gpt-5-1-codex-mini/app/src/ast/query.rs b/app/src/ast/query.rs
index 08448ca..13fd685 100644
--- a/tmp/agent-patch-flux-pr-2172.1-of-1.2026-02-28__18-27-22__gpt-5-1-codex-mini/app/src/ast/query.rs
+++ b/app/src/ast/query.rs
@@ -350,6 +350,8 @@ pub struct Select {
     pub optimizer_hint: Option<OptimizerHint>,
     /// `SELECT [DISTINCT] ...`
     pub distinct: Option<Distinct>,
+    /// MySQL-specific `SELECT` modifiers that appear between the keyword and the projection.
+    pub modifiers: Vec<SelectModifier>,
     /// MSSQL syntax: `TOP (<N>) [ PERCENT ] [ WITH TIES ]`
     pub top: Option<Top>,
     /// Whether the top was located before `ALL`/`DISTINCT`
@@ -425,6 +427,13 @@ impl fmt::Display for Select {
             value_table_mode.fmt(f)?;
         }
 
+        if !self.modifiers.is_empty() {
+            for modifier in &self.modifiers {
+                f.write_str(" ")?;
+                modifier.fmt(f)?;
+            }
+        }
+
         if let Some(ref top) = self.top {
             if self.top_before_distinct {
                 f.write_str(" ")?;
@@ -3351,10 +3360,14 @@ impl fmt::Display for NonBlock {
 #[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)]
 #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
 #[cfg_attr(feature = "visitor", derive(Visit, VisitMut))]
-/// `DISTINCT` or `DISTINCT ON (...)` modifiers for `SELECT` lists.
+/// `SELECT` quantifiers like `ALL`, `DISTINCT`, `DISTINCTROW`, or `DISTINCT ON (...)`.
 pub enum Distinct {
+    /// `ALL` (no duplicate elimination)
+    All,
     /// `DISTINCT` (remove duplicate rows)
     Distinct,
+    /// `DISTINCTROW` (synonym for DISTINCT in MySQL)
+    DistinctRow,
 
     /// `DISTINCT ON (...)` (Postgres extension)
     On(Vec<Expr>),
@@ -3362,16 +3375,54 @@ pub enum Distinct {
 
 impl fmt::Display for Distinct {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        match self {
+    match self {
+            Distinct::All => write!(f, "ALL"),
             Distinct::Distinct => write!(f, "DISTINCT"),
             Distinct::On(col_names) => {
                 let col_names = display_comma_separated(col_names);
                 write!(f, "DISTINCT ON ({col_names})")
             }
+            Distinct::DistinctRow => write!(f, "DISTINCTROW"),
         }
     }
 }
 
+#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)]
+#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
+#[cfg_attr(feature = "visitor", derive(Visit, VisitMut))]
+/// MySQL-specific modifiers that appear between `SELECT` and the projection.
+pub enum SelectModifier {
+    /// `HIGH_PRIORITY`
+    HighPriority,
+    /// `STRAIGHT_JOIN`
+    StraightJoin,
+    /// `SQL_SMALL_RESULT`
+    SqlSmallResult,
+    /// `SQL_BIG_RESULT`
+    SqlBigResult,
+    /// `SQL_BUFFER_RESULT`
+    SqlBufferResult,
+    /// `SQL_NO_CACHE`
+    SqlNoCache,
+    /// `SQL_CALC_FOUND_ROWS`
+    SqlCalcFoundRows,
+}
+
+impl fmt::Display for SelectModifier {
+    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+        let text = match self {
+            SelectModifier::HighPriority => "HIGH_PRIORITY",
+            SelectModifier::StraightJoin => "STRAIGHT_JOIN",
+            SelectModifier::SqlSmallResult => "SQL_SMALL_RESULT",
+            SelectModifier::SqlBigResult => "SQL_BIG_RESULT",
+            SelectModifier::SqlBufferResult => "SQL_BUFFER_RESULT",
+            SelectModifier::SqlNoCache => "SQL_NO_CACHE",
+            SelectModifier::SqlCalcFoundRows => "SQL_CALC_FOUND_ROWS",
+        };
+        write!(f, "{text}")
+    }
+}
+
 #[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)]
 #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
 #[cfg_attr(feature = "visitor", derive(Visit, VisitMut))]
diff --git a/tmp/agent-patch-flux-pr-2172.1-of-1.2026-02-28__18-27-22__gpt-5-1-codex-mini/app/src/ast/spans.rs b/app/src/ast/spans.rs
index 60c983f..7bd89b1 100644
--- a/tmp/agent-patch-flux-pr-2172.1-of-1.2026-02-28__18-27-22__gpt-5-1-codex-mini/app/src/ast/spans.rs
+++ b/app/src/ast/spans.rs
@@ -2238,6 +2238,7 @@ impl Spanned for Select {
             select_token,
             optimizer_hint: _,
             distinct: _, // todo
+            modifiers: _,
             top: _,      // todo, mysql specific
             projection,
             exclude: _,
diff --git a/tmp/agent-patch-flux-pr-2172.1-of-1.2026-02-28__18-27-22__gpt-5-1-codex-mini/app/src/keywords.rs b/app/src/keywords.rs
index 964e4b3..12d0b79 100644
--- a/tmp/agent-patch-flux-pr-2172.1-of-1.2026-02-28__18-27-22__gpt-5-1-codex-mini/app/src/keywords.rs
+++ b/app/src/keywords.rs
@@ -333,6 +333,7 @@ define_keywords!(
     DISCARD,
     DISCONNECT,
     DISTINCT,
+    DISTINCTROW,
     DISTRIBUTE,
     DIV,
     DO,
@@ -952,10 +953,15 @@ define_keywords!(
     SPECIFIC,
     SPECIFICTYPE,
     SPGIST,
+    SQL_BIG_RESULT,
+    SQL_BUFFER_RESULT,
+    SQL_CALC_FOUND_ROWS,
     SQL,
     SQLEXCEPTION,
     SQLSTATE,
     SQLWARNING,
+    SQL_NO_CACHE,
+    SQL_SMALL_RESULT,
     SQRT,
     SRID,
     STABLE,
diff --git a/tmp/agent-patch-flux-pr-2172.1-of-1.2026-02-28__18-27-22__gpt-5-1-codex-mini/app/src/parser/mod.rs b/app/src/parser/mod.rs
index 5fa224f..10a2d26 100644
--- a/tmp/agent-patch-flux-pr-2172.1-of-1.2026-02-28__18-27-22__gpt-5-1-codex-mini/app/src/parser/mod.rs
+++ b/app/src/parser/mod.rs
@@ -4923,32 +4923,95 @@ impl<'a> Parser<'a> {
         }
     }
 
-    /// Parse either `ALL`, `DISTINCT` or `DISTINCT ON (...)`. Returns [`None`] if `ALL` is parsed
-    /// and results in a [`ParserError`] if both `ALL` and `DISTINCT` are found.
-    pub fn parse_all_or_distinct(&mut self) -> Result<Option<Distinct>, ParserError> {
+    /// Parse `ALL`, `DISTINCT`, `DISTINCTROW`, and any MySQL select modifiers.
+    pub fn parse_select_modifiers(
+        &mut self,
+    ) -> Result<(Vec<SelectModifier>, Option<Distinct>), ParserError> {
         let loc = self.peek_token().span.start;
-        let all = self.parse_keyword(Keyword::ALL);
-        let distinct = self.parse_keyword(Keyword::DISTINCT);
-        if !distinct {
-            return Ok(None);
-        }
-        if all {
-            return parser_err!("Cannot specify both ALL and DISTINCT".to_string(), loc);
-        }
-        let on = self.parse_keyword(Keyword::ON);
-        if !on {
-            return Ok(Some(Distinct::Distinct));
+        let mut modifiers = Vec::new();
+        let mut distinct = None;
+
+        loop {
+            if dialect_of!(self is MySqlDialect) {
+                if self.parse_keyword(Keyword::HIGH_PRIORITY) {
+                    modifiers.push(SelectModifier::HighPriority);
+                    continue;
+                }
+                if self.parse_keyword(Keyword::STRAIGHT_JOIN) {
+                    modifiers.push(SelectModifier::StraightJoin);
+                    continue;
+                }
+                if self.parse_keyword(Keyword::SQL_SMALL_RESULT) {
+                    modifiers.push(SelectModifier::SqlSmallResult);
+                    continue;
+                }
+                if self.parse_keyword(Keyword::SQL_BIG_RESULT) {
+                    modifiers.push(SelectModifier::SqlBigResult);
+                    continue;
+                }
+                if self.parse_keyword(Keyword::SQL_BUFFER_RESULT) {
+                    modifiers.push(SelectModifier::SqlBufferResult);
+                    continue;
+                }
+                if self.parse_keyword(Keyword::SQL_NO_CACHE) {
+                    modifiers.push(SelectModifier::SqlNoCache);
+                    continue;
+                }
+                if self.parse_keyword(Keyword::SQL_CALC_FOUND_ROWS) {
+                    modifiers.push(SelectModifier::SqlCalcFoundRows);
+                    continue;
+                }
+            }
+
+            if self.parse_keyword(Keyword::ALL) {
+                if distinct.is_some() {
+                    return parser_err!(
+                        "Cannot specify more than one select quantifier".to_string(),
+                        loc,
+                    );
+                }
+                distinct = Some(Distinct::All);
+                continue;
+            }
+
+            if self.parse_keyword(Keyword::DISTINCTROW) {
+                if distinct.is_some() {
+                    return parser_err!(
+                        "Cannot specify more than one select quantifier".to_string(),
+                        loc,
+                    );
+                }
+                distinct = Some(Distinct::DistinctRow);
+                continue;
+            }
+
+            if self.parse_keyword(Keyword::DISTINCT) {
+                if distinct.is_some() {
+                    return parser_err!(
+                        "Cannot specify more than one select quantifier".to_string(),
+                        loc,
+                    );
+                }
+                if self.parse_keyword(Keyword::ON) {
+                    self.expect_token(&Token::LParen)?;
+                    let col_names = if self.consume_token(&Token::RParen) {
+                        self.prev_token();
+                        Vec::new()
+                    } else {
+                        self.parse_comma_separated(Parser::parse_expr)?
+                    };
+                    self.expect_token(&Token::RParen)?;
+                    distinct = Some(Distinct::On(col_names));
+                } else {
+                    distinct = Some(Distinct::Distinct);
+                }
+                continue;
+            }
+
+            break;
         }
 
-        self.expect_token(&Token::LParen)?;
-        let col_names = if self.consume_token(&Token::RParen) {
-            self.prev_token();
-            Vec::new()
-        } else {
-            self.parse_comma_separated(Parser::parse_expr)?
-        };
-        self.expect_token(&Token::RParen)?;
-        Ok(Some(Distinct::On(col_names)))
+        Ok((modifiers, distinct))
     }
 
     /// Parse a SQL CREATE statement
@@ -13861,6 +13924,7 @@ impl<'a> Parser<'a> {
                     select_token: AttachedToken(from_token),
                     optimizer_hint: None,
                     distinct: None,
+                    modifiers: vec![],
                     top: None,
                     top_before_distinct: false,
                     projection: vec![],
@@ -13896,7 +13960,7 @@ impl<'a> Parser<'a> {
             top = Some(self.parse_top()?);
             top_before_distinct = true;
         }
-        let distinct = self.parse_all_or_distinct()?;
+        let (modifiers, distinct) = self.parse_select_modifiers()?;
         if !self.dialect.supports_top_before_distinct() && self.parse_keyword(Keyword::TOP) {
             top = Some(self.parse_top()?);
         }
@@ -14044,6 +14108,7 @@ impl<'a> Parser<'a> {
             select_token: AttachedToken(select_token),
             optimizer_hint,
             distinct,
+            modifiers,
             top,
             top_before_distinct,
             projection,
diff --git a/tmp/agent-patch-flux-pr-2172.1-of-1.2026-02-28__18-27-22__gpt-5-1-codex-mini/app/tests/sqlparser_bigquery.rs b/app/tests/sqlparser_bigquery.rs
index fb28b4d..5556f90 100644
--- a/tmp/agent-patch-flux-pr-2172.1-of-1.2026-02-28__18-27-22__gpt-5-1-codex-mini/app/tests/sqlparser_bigquery.rs
+++ b/app/tests/sqlparser_bigquery.rs
@@ -2683,6 +2683,7 @@ fn test_export_data() {
                     )),
                     optimizer_hint: None,
                     distinct: None,
+                    modifiers: vec![],
                     top: None,
                     top_before_distinct: false,
                     projection: vec![
@@ -2788,6 +2789,7 @@ fn test_export_data() {
                     )),
                     optimizer_hint: None,
                     distinct: None,
+                    modifiers: vec![],
                     top: None,
                     top_before_distinct: false,
                     projection: vec![
diff --git a/tmp/agent-patch-flux-pr-2172.1-of-1.2026-02-28__18-27-22__gpt-5-1-codex-mini/app/tests/sqlparser_clickhouse.rs b/app/tests/sqlparser_clickhouse.rs
index ac31a27..e93c091 100644
--- a/tmp/agent-patch-flux-pr-2172.1-of-1.2026-02-28__18-27-22__gpt-5-1-codex-mini/app/tests/sqlparser_clickhouse.rs
+++ b/app/tests/sqlparser_clickhouse.rs
@@ -41,6 +41,7 @@ fn parse_map_access_expr() {
     assert_eq!(
         Select {
             distinct: None,
+            modifiers: vec![],
             optimizer_hint: None,
             select_token: AttachedToken::empty(),
             top: None,
diff --git a/tmp/agent-patch-flux-pr-2172.1-of-1.2026-02-28__18-27-22__gpt-5-1-codex-mini/app/tests/sqlparser_common.rs b/app/tests/sqlparser_common.rs
index e6a48c7..392d49a 100644
--- a/tmp/agent-patch-flux-pr-2172.1-of-1.2026-02-28__18-27-22__gpt-5-1-codex-mini/app/tests/sqlparser_common.rs
+++ b/app/tests/sqlparser_common.rs
@@ -473,6 +473,7 @@ fn parse_update_set_from() {
                             select_token: AttachedToken::empty(),
                             optimizer_hint: None,
                             distinct: None,
+                            modifiers: vec![],
                             top: None,
                             top_before_distinct: false,
                             projection: vec![
@@ -1074,7 +1075,10 @@ fn parse_select_distinct_missing_paren() {
 
 #[test]
 fn parse_select_all() {
-    one_statement_parses_to("SELECT ALL name FROM customer", "SELECT name FROM customer");
+    let sql = "SELECT ALL name FROM customer";
+    one_statement_parses_to(sql, "SELECT name FROM customer");
+    let select = verified_only_select(sql);
+    assert_eq!(select.distinct, Some(Distinct::All));
 }
 
 #[test]
@@ -5809,6 +5813,7 @@ fn test_parse_named_window() {
         select_token: AttachedToken::empty(),
         optimizer_hint: None,
         distinct: None,
+        modifiers: vec![],
         top: None,
         top_before_distinct: false,
         projection: vec![
@@ -6540,6 +6545,7 @@ fn parse_interval_and_or_xor() {
             select_token: AttachedToken::empty(),
             optimizer_hint: None,
             distinct: None,
+            modifiers: vec![],
             top: None,
             top_before_distinct: false,
             projection: vec![UnnamedExpr(Expr::Identifier(Ident {
@@ -8917,6 +8923,7 @@ fn lateral_function() {
         select_token: AttachedToken::empty(),
         optimizer_hint: None,
         distinct: None,
+        modifiers: vec![],
         top: None,
         projection: vec![SelectItem::Wildcard(WildcardAdditionalOptions::default())],
         exclude: None,
@@ -9919,6 +9926,7 @@ fn parse_merge() {
                             select_token: AttachedToken::empty(),
                             optimizer_hint: None,
                             distinct: None,
+                            modifiers: vec![],
                             top: None,
                             top_before_distinct: false,
                             projection: vec![SelectItem::Wildcard(
@@ -12323,6 +12331,7 @@ fn parse_unload() {
                     select_token: AttachedToken::empty(),
                     optimizer_hint: None,
                     distinct: None,
+                    modifiers: vec![],
                     top: None,
                     top_before_distinct: false,
                     projection: vec![UnnamedExpr(Expr::Identifier(Ident::new("cola"))),],
@@ -12632,6 +12641,7 @@ fn parse_connect_by() {
         select_token: AttachedToken::empty(),
         optimizer_hint: None,
         distinct: None,
+        modifiers: vec![],
         top: None,
         top_before_distinct: false,
         projection: vec![
@@ -12715,6 +12725,7 @@ fn parse_connect_by() {
             select_token: AttachedToken::empty(),
             optimizer_hint: None,
             distinct: None,
+            modifiers: vec![],
             top: None,
             top_before_distinct: false,
             projection: vec![
@@ -13649,6 +13660,7 @@ fn test_extract_seconds_ok() {
             select_token: AttachedToken::empty(),
             optimizer_hint: None,
             distinct: None,
+            modifiers: vec![],
             top: None,
             top_before_distinct: false,
             projection: vec![UnnamedExpr(Expr::Extract {
@@ -15789,6 +15801,7 @@ fn test_select_from_first() {
                 select_token: AttachedToken::empty(),
                 optimizer_hint: None,
                 distinct: None,
+                modifiers: vec![],
                 top: None,
                 projection,
                 exclude: None,
diff --git a/tmp/agent-patch-flux-pr-2172.1-of-1.2026-02-28__18-27-22__gpt-5-1-codex-mini/app/tests/sqlparser_duckdb.rs b/app/tests/sqlparser_duckdb.rs
index 7cc710d..3304a76 100644
--- a/tmp/agent-patch-flux-pr-2172.1-of-1.2026-02-28__18-27-22__gpt-5-1-codex-mini/app/tests/sqlparser_duckdb.rs
+++ b/app/tests/sqlparser_duckdb.rs
@@ -268,6 +268,7 @@ fn test_select_union_by_name() {
                 select_token: AttachedToken::empty(),
                 optimizer_hint: None,
                 distinct: None,
+                modifiers: vec![],
                 top: None,
                 projection: vec![SelectItem::Wildcard(WildcardAdditionalOptions::default())],
                 exclude: None,
@@ -300,6 +301,7 @@ fn test_select_union_by_name() {
                 select_token: AttachedToken::empty(),
                 optimizer_hint: None,
                 distinct: None,
+                modifiers: vec![],
                 top: None,
                 projection: vec![SelectItem::Wildcard(WildcardAdditionalOptions::default())],
                 exclude: None,
diff --git a/tmp/agent-patch-flux-pr-2172.1-of-1.2026-02-28__18-27-22__gpt-5-1-codex-mini/app/tests/sqlparser_mssql.rs b/app/tests/sqlparser_mssql.rs
index d770008..7c4282a 100644
--- a/tmp/agent-patch-flux-pr-2172.1-of-1.2026-02-28__18-27-22__gpt-5-1-codex-mini/app/tests/sqlparser_mssql.rs
+++ b/app/tests/sqlparser_mssql.rs
@@ -143,6 +143,7 @@ fn parse_create_procedure() {
                         select_token: AttachedToken::empty(),
                         optimizer_hint: None,
                         distinct: None,
+                        modifiers: vec![],
                         top: None,
                         top_before_distinct: false,
                         projection: vec![SelectItem::UnnamedExpr(Expr::Value(
@@ -1351,6 +1352,7 @@ fn parse_substring_in_select() {
                         select_token: AttachedToken::empty(),
                         optimizer_hint: None,
                         distinct: Some(Distinct::Distinct),
+                        modifiers: vec![],
                         top: None,
                         top_before_distinct: false,
                         projection: vec![SelectItem::UnnamedExpr(Expr::Substring {
@@ -1509,6 +1511,7 @@ fn parse_mssql_declare() {
                     select_token: AttachedToken::empty(),
                     optimizer_hint: None,
                     distinct: None,
+                    modifiers: vec![],
                     top: None,
                     top_before_distinct: false,
                     projection: vec![SelectItem::UnnamedExpr(Expr::BinaryOp {
diff --git a/tmp/agent-patch-flux-pr-2172.1-of-1.2026-02-28__18-27-22__gpt-5-1-codex-mini/app/tests/sqlparser_mysql.rs b/app/tests/sqlparser_mysql.rs
index 2c94279..6ed37d8 100644
--- a/tmp/agent-patch-flux-pr-2172.1-of-1.2026-02-28__18-27-22__gpt-5-1-codex-mini/app/tests/sqlparser_mysql.rs
+++ b/app/tests/sqlparser_mysql.rs
@@ -1437,6 +1437,7 @@ fn parse_escaped_quote_identifiers_with_escape() {
                 select_token: AttachedToken::empty(),
                 optimizer_hint: None,
                 distinct: None,
+                modifiers: vec![],
                 top: None,
                 top_before_distinct: false,
                 projection: vec![SelectItem::UnnamedExpr(Expr::Identifier(Ident {
@@ -1493,6 +1494,7 @@ fn parse_escaped_quote_identifiers_with_no_escape() {
                 select_token: AttachedToken::empty(),
                 optimizer_hint: None,
                 distinct: None,
+                modifiers: vec![],
                 top: None,
                 top_before_distinct: false,
                 projection: vec![SelectItem::UnnamedExpr(Expr::Identifier(Ident {
@@ -1541,6 +1543,7 @@ fn parse_escaped_backticks_with_escape() {
                 select_token: AttachedToken::empty(),
                 optimizer_hint: None,
                 distinct: None,
+                modifiers: vec![],
                 top: None,
                 top_before_distinct: false,
                 projection: vec![SelectItem::UnnamedExpr(Expr::Identifier(Ident {
@@ -1593,6 +1596,7 @@ fn parse_escaped_backticks_with_no_escape() {
                 select_token: AttachedToken::empty(),
                 optimizer_hint: None,
                 distinct: None,
+                modifiers: vec![],
                 top: None,
                 top_before_distinct: false,
                 projection: vec![SelectItem::UnnamedExpr(Expr::Identifier(Ident {
@@ -2413,6 +2417,7 @@ fn parse_select_with_numeric_prefix_column_name() {
                     select_token: AttachedToken::empty(),
                     optimizer_hint: None,
                     distinct: None,
+                    modifiers: vec![],
                     top: None,
                     top_before_distinct: false,
                     projection: vec![SelectItem::UnnamedExpr(Expr::Identifier(Ident::new(
@@ -2588,6 +2593,7 @@ fn parse_select_with_concatenation_of_exp_number_and_numeric_prefix_column() {
                     select_token: AttachedToken::empty(),
                     optimizer_hint: None,
                     distinct: None,
+                    modifiers: vec![],
                     top: None,
                     top_before_distinct: false,
                     projection: vec![
@@ -2623,6 +2629,25 @@ fn parse_select_with_concatenation_of_exp_number_and_numeric_prefix_column() {
     }
 }
 
+#[test]
+fn parse_mysql_select_modifiers_and_distinctrow() {
+    let sql = "SELECT HIGH_PRIORITY SQL_SMALL_RESULT STRAIGHT_JOIN SQL_BIG_RESULT SQL_BUFFER_RESULT SQL_NO_CACHE SQL_CALC_FOUND_ROWS DISTINCTROW * FROM foo";
+    let select = mysql().verified_only_select(sql);
+    assert_eq!(
+        select.modifiers,
+        vec![
+            SelectModifier::HighPriority,
+            SelectModifier::SqlSmallResult,
+            SelectModifier::StraightJoin,
+            SelectModifier::SqlBigResult,
+            SelectModifier::SqlBufferResult,
+            SelectModifier::SqlNoCache,
+            SelectModifier::SqlCalcFoundRows,
+        ],
+    );
+    assert_eq!(select.distinct, Some(Distinct::DistinctRow));
+}
+
 #[test]
 fn parse_insert_with_numeric_prefix_column_name() {
     let sql = "INSERT INTO s1.t1 (123col_$@length123) VALUES (67.654)";
@@ -3222,6 +3247,7 @@ fn parse_substring_in_select() {
                         select_token: AttachedToken::empty(),
                         optimizer_hint: None,
                         distinct: Some(Distinct::Distinct),
+                        modifiers: vec![],
                         top: None,
                         top_before_distinct: false,
                         projection: vec![SelectItem::UnnamedExpr(Expr::Substring {
@@ -3544,9 +3570,10 @@ fn parse_hex_string_introducer() {
             with: None,
             body: Box::new(SetExpr::Select(Box::new(Select {
                 select_token: AttachedToken::empty(),
-                optimizer_hint: None,
-                distinct: None,
-                top: None,
+                    optimizer_hint: None,
+                    distinct: None,
+                    modifiers: vec![],
+                    top: None,
                 top_before_distinct: false,
                 projection: vec![SelectItem::UnnamedExpr(Expr::Prefixed {
                     prefix: Ident::from("_latin1"),
diff --git a/tmp/agent-patch-flux-pr-2172.1-of-1.2026-02-28__18-27-22__gpt-5-1-codex-mini/app/tests/sqlparser_postgres.rs b/app/tests/sqlparser_postgres.rs
index 1f91bff..d3d36f8 100644
--- a/tmp/agent-patch-flux-pr-2172.1-of-1.2026-02-28__18-27-22__gpt-5-1-codex-mini/app/tests/sqlparser_postgres.rs
+++ b/app/tests/sqlparser_postgres.rs
@@ -1293,6 +1293,7 @@ fn parse_copy_to() {
                     select_token: AttachedToken::empty(),
                     optimizer_hint: None,
                     distinct: None,
+                    modifiers: vec![],
                     top: None,
                     top_before_distinct: false,
                     projection: vec![
@@ -3074,6 +3075,7 @@ fn parse_array_subquery_expr() {
                         select_token: AttachedToken::empty(),
                         optimizer_hint: None,
                         distinct: None,
+                        modifiers: vec![],
                         top: None,
                         top_before_distinct: false,
                         projection: vec![SelectItem::UnnamedExpr(Expr::Value(
@@ -3101,6 +3103,7 @@ fn parse_array_subquery_expr() {
                         select_token: AttachedToken::empty(),
                         optimizer_hint: None,
                         distinct: None,
+                        modifiers: vec![],
                         top: None,
                         top_before_distinct: false,
                         projection: vec![SelectItem::UnnamedExpr(Expr::Value(