agent_patch
runs/2026-02-28__18-27-22__gpt-5-4/flux-pr-1534/flux-pr-1534.1-of-1.2026-02-28__18-27-22__gpt-5-4/agent-logs/agent.patch
36868 bytes
diff --git a/tmp/agent-patch-flux-pr-1534.1-of-1.2026-02-28__18-27-22__gpt-5-4/app/src/ast/query.rs b/app/src/ast/query.rs
index 078bbc8..113585f 100644
--- a/tmp/agent-patch-flux-pr-1534.1-of-1.2026-02-28__18-27-22__gpt-5-4/app/src/ast/query.rs
+++ b/app/src/ast/query.rs
@@ -954,6 +954,10 @@ pub enum TableFactor {
Table {
#[cfg_attr(feature = "visitor", visit(with = "visit_relation"))]
name: ObjectName,
+ /// PartiQL-style path navigation attached to the base relation.
+ /// For example, `foo.bar[0]` is represented as `name = foo.bar`
+ /// and `partiql_path = [ [0] ]`.
+ partiql_path: Vec<MapAccessKey>,
alias: Option<TableAlias>,
/// Arguments of a table-valued function, as supported by Postgres
/// and MSSQL. Note that deprecated MSSQL `FROM foo (NOLOCK)` syntax
@@ -1369,6 +1373,7 @@ impl fmt::Display for TableFactor {
match self {
TableFactor::Table {
name,
+ partiql_path,
alias,
args,
with_hints,
@@ -1377,6 +1382,9 @@ impl fmt::Display for TableFactor {
with_ordinality,
} => {
write!(f, "{name}")?;
+ for key in partiql_path {
+ write!(f, "{key}")?;
+ }
if !partitions.is_empty() {
write!(f, "PARTITION ({})", display_comma_separated(partitions))?;
}
diff --git a/tmp/agent-patch-flux-pr-1534.1-of-1.2026-02-28__18-27-22__gpt-5-4/app/src/dialect/mod.rs b/app/src/dialect/mod.rs
index 985cad7..5574033 100644
--- a/tmp/agent-patch-flux-pr-1534.1-of-1.2026-02-28__18-27-22__gpt-5-4/app/src/dialect/mod.rs
+++ b/app/src/dialect/mod.rs
@@ -226,6 +226,12 @@ pub trait Dialect: Debug + Any {
false
}
+ /// Returns true if the dialect supports PartiQL-style path navigation
+ /// using `.` and `[]` after identifiers in expressions and table clauses.
+ fn supports_partiql_pathing(&self) -> bool {
+ false
+ }
+
/// Returns true if the dialect supports `BEGIN {DEFERRED | IMMEDIATE | EXCLUSIVE} [TRANSACTION]` statements
fn supports_start_transaction_modifier(&self) -> bool {
false
diff --git a/tmp/agent-patch-flux-pr-1534.1-of-1.2026-02-28__18-27-22__gpt-5-4/app/src/dialect/redshift.rs b/app/src/dialect/redshift.rs
index 4d07738..05ba407 100644
--- a/tmp/agent-patch-flux-pr-1534.1-of-1.2026-02-28__18-27-22__gpt-5-4/app/src/dialect/redshift.rs
+++ b/app/src/dialect/redshift.rs
@@ -69,6 +69,10 @@ impl Dialect for RedshiftSqlDialect {
true
}
+ fn supports_partiql_pathing(&self) -> bool {
+ true
+ }
+
/// Redshift expects the `TOP` option before the `ALL/DISTINCT` option:
/// <https://docs.aws.amazon.com/redshift/latest/dg/r_SELECT_list.html#r_SELECT_list-parameters>
fn supports_top_before_distinct(&self) -> bool {
diff --git a/tmp/agent-patch-flux-pr-1534.1-of-1.2026-02-28__18-27-22__gpt-5-4/app/src/parser/mod.rs b/app/src/parser/mod.rs
index c835876..2f43757 100644
--- a/tmp/agent-patch-flux-pr-1534.1-of-1.2026-02-28__18-27-22__gpt-5-4/app/src/parser/mod.rs
+++ b/app/src/parser/mod.rs
@@ -3101,7 +3101,10 @@ impl<'a> Parser<'a> {
})
}
- pub fn parse_map_access(&mut self, expr: Expr) -> Result<Expr, ParserError> {
+ fn parse_access_keys(
+ &mut self,
+ allow_period_for_non_bigquery: bool,
+ ) -> Result<Vec<MapAccessKey>, ParserError> {
let key = self.parse_expr()?;
self.expect_token(&Token::RBracket)?;
@@ -3123,7 +3126,9 @@ impl<'a> Parser<'a> {
// Access on BigQuery nested and repeated expressions can
// mix notations in the same expression.
// https://cloud.google.com/bigquery/docs/nested-repeated#query_nested_and_repeated_columns
- Token::Period if dialect_of!(self is BigQueryDialect) => {
+ Token::Period
+ if dialect_of!(self is BigQueryDialect) || allow_period_for_non_bigquery =>
+ {
self.next_token(); // consume `.`
MapAccessKey {
key: self.parse_expr()?,
@@ -3135,6 +3140,12 @@ impl<'a> Parser<'a> {
keys.push(key);
}
+ Ok(keys)
+ }
+
+ pub fn parse_map_access(&mut self, expr: Expr) -> Result<Expr, ParserError> {
+ let keys = self.parse_access_keys(self.dialect.supports_partiql_pathing())?;
+
Ok(Expr::MapAccess {
column: Box::new(expr),
keys,
@@ -10337,6 +10348,13 @@ impl<'a> Parser<'a> {
self.parse_open_json_table_factor()
} else {
let name = self.parse_object_name(true)?;
+ let partiql_path = if self.dialect.supports_partiql_pathing()
+ && self.consume_token(&Token::LBracket)
+ {
+ self.parse_access_keys(true)?
+ } else {
+ vec![]
+ };
let partitions: Vec<Ident> = if dialect_of!(self is MySqlDialect | GenericDialect)
&& self.parse_keyword(Keyword::PARTITION)
@@ -10374,6 +10392,7 @@ impl<'a> Parser<'a> {
let mut table = TableFactor::Table {
name,
+ partiql_path,
alias,
args,
with_hints,
diff --git a/tmp/agent-patch-flux-pr-1534.1-of-1.2026-02-28__18-27-22__gpt-5-4/app/src/test_utils.rs b/app/src/test_utils.rs
index b35fc45..eacf00d 100644
--- a/tmp/agent-patch-flux-pr-1534.1-of-1.2026-02-28__18-27-22__gpt-5-4/app/src/test_utils.rs
+++ b/app/src/test_utils.rs
@@ -339,7 +339,8 @@ pub fn table_alias(name: impl Into<String>) -> Option<TableAlias> {
pub fn table(name: impl Into<String>) -> TableFactor {
TableFactor::Table {
name: ObjectName(vec![Ident::new(name.into())]),
- alias: None,
+ partiql_path: vec![],
+ alias: None,
args: None,
with_hints: vec![],
version: None,
@@ -351,6 +352,7 @@ pub fn table(name: impl Into<String>) -> TableFactor {
pub fn table_with_alias(name: impl Into<String>, alias: impl Into<String>) -> TableFactor {
TableFactor::Table {
name: ObjectName(vec![Ident::new(name)]),
+ partiql_path: vec![],
alias: Some(TableAlias {
name: Ident::new(alias),
columns: vec![],
diff --git a/tmp/agent-patch-flux-pr-1534.1-of-1.2026-02-28__18-27-22__gpt-5-4/app/tests/sqlparser_bigquery.rs b/app/tests/sqlparser_bigquery.rs
index 2bf470f..cb6e12e 100644
--- a/tmp/agent-patch-flux-pr-1534.1-of-1.2026-02-28__18-27-22__gpt-5-4/app/tests/sqlparser_bigquery.rs
+++ b/app/tests/sqlparser_bigquery.rs
@@ -223,7 +223,8 @@ fn parse_delete_statement() {
assert_eq!(
TableFactor::Table {
name: ObjectName(vec![Ident::with_quote('"', "table")]),
- alias: None,
+ partiql_path: vec![],
+ alias: None,
args: None,
with_hints: vec![],
version: None,
@@ -1367,7 +1368,8 @@ fn parse_table_identifiers() {
vec![TableWithJoins {
relation: TableFactor::Table {
name: ObjectName(expected),
- alias: None,
+ partiql_path: vec![],
+ alias: None,
args: None,
with_hints: vec![],
version: None,
@@ -1538,7 +1540,8 @@ fn parse_table_time_travel() {
vec![TableWithJoins {
relation: TableFactor::Table {
name: ObjectName(vec![Ident::new("t1")]),
- alias: None,
+ partiql_path: vec![],
+ alias: None,
args: None,
with_hints: vec![],
version: Some(TableVersion::ForSystemTimeAsOf(Expr::Value(
@@ -1635,7 +1638,8 @@ fn parse_merge() {
assert_eq!(
TableFactor::Table {
name: ObjectName(vec![Ident::new("inventory")]),
- alias: Some(TableAlias {
+ partiql_path: vec![],
+ alias: Some(TableAlias {
name: Ident::new("T"),
columns: vec![],
}),
@@ -1650,7 +1654,8 @@ fn parse_merge() {
assert_eq!(
TableFactor::Table {
name: ObjectName(vec![Ident::new("newArrivals")]),
- alias: Some(TableAlias {
+ partiql_path: vec![],
+ alias: Some(TableAlias {
name: Ident::new("S"),
columns: vec![],
}),
diff --git a/tmp/agent-patch-flux-pr-1534.1-of-1.2026-02-28__18-27-22__gpt-5-4/app/tests/sqlparser_common.rs b/app/tests/sqlparser_common.rs
index 3d9ba5d..9871ee1 100644
--- a/tmp/agent-patch-flux-pr-1534.1-of-1.2026-02-28__18-27-22__gpt-5-4/app/tests/sqlparser_common.rs
+++ b/app/tests/sqlparser_common.rs
@@ -358,7 +358,8 @@ fn parse_update_set_from() {
table: TableWithJoins {
relation: TableFactor::Table {
name: ObjectName(vec![Ident::new("t1")]),
- alias: None,
+ partiql_path: vec![],
+ alias: None,
args: None,
with_hints: vec![],
version: None,
@@ -388,7 +389,8 @@ fn parse_update_set_from() {
from: vec![TableWithJoins {
relation: TableFactor::Table {
name: ObjectName(vec![Ident::new("t1")]),
- alias: None,
+ partiql_path: vec![],
+ alias: None,
args: None,
with_hints: vec![],
version: None,
@@ -464,7 +466,8 @@ fn parse_update_with_table_alias() {
TableWithJoins {
relation: TableFactor::Table {
name: ObjectName(vec![Ident::new("users")]),
- alias: Some(TableAlias {
+ partiql_path: vec![],
+ alias: Some(TableAlias {
name: Ident::new("u"),
columns: vec![],
}),
@@ -551,7 +554,8 @@ fn parse_select_with_table_alias() {
vec![TableWithJoins {
relation: TableFactor::Table {
name: ObjectName(vec![Ident::new("lineitem")]),
- alias: Some(TableAlias {
+ partiql_path: vec![],
+ alias: Some(TableAlias {
name: Ident::new("l"),
columns: vec![
TableAliasColumnDef::from_name("A"),
@@ -595,7 +599,8 @@ fn parse_delete_statement() {
assert_eq!(
TableFactor::Table {
name: ObjectName(vec![Ident::with_quote('"', "table")]),
- alias: None,
+ partiql_path: vec![],
+ alias: None,
args: None,
with_hints: vec![],
version: None,
@@ -642,7 +647,8 @@ fn parse_delete_statement_for_multi_tables() {
assert_eq!(
TableFactor::Table {
name: ObjectName(vec![Ident::new("schema1"), Ident::new("table1")]),
- alias: None,
+ partiql_path: vec![],
+ alias: None,
args: None,
with_hints: vec![],
version: None,
@@ -654,7 +660,8 @@ fn parse_delete_statement_for_multi_tables() {
assert_eq!(
TableFactor::Table {
name: ObjectName(vec![Ident::new("schema2"), Ident::new("table2")]),
- alias: None,
+ partiql_path: vec![],
+ alias: None,
args: None,
with_hints: vec![],
version: None,
@@ -680,7 +687,8 @@ fn parse_delete_statement_for_multi_tables_with_using() {
assert_eq!(
TableFactor::Table {
name: ObjectName(vec![Ident::new("schema1"), Ident::new("table1")]),
- alias: None,
+ partiql_path: vec![],
+ alias: None,
args: None,
with_hints: vec![],
version: None,
@@ -692,7 +700,8 @@ fn parse_delete_statement_for_multi_tables_with_using() {
assert_eq!(
TableFactor::Table {
name: ObjectName(vec![Ident::new("schema2"), Ident::new("table2")]),
- alias: None,
+ partiql_path: vec![],
+ alias: None,
args: None,
with_hints: vec![],
version: None,
@@ -704,7 +713,8 @@ fn parse_delete_statement_for_multi_tables_with_using() {
assert_eq!(
TableFactor::Table {
name: ObjectName(vec![Ident::new("schema1"), Ident::new("table1")]),
- alias: None,
+ partiql_path: vec![],
+ alias: None,
args: None,
with_hints: vec![],
version: None,
@@ -716,7 +726,8 @@ fn parse_delete_statement_for_multi_tables_with_using() {
assert_eq!(
TableFactor::Table {
name: ObjectName(vec![Ident::new("schema2"), Ident::new("table2")]),
- alias: None,
+ partiql_path: vec![],
+ alias: None,
args: None,
with_hints: vec![],
version: None,
@@ -747,7 +758,8 @@ fn parse_where_delete_statement() {
assert_eq!(
TableFactor::Table {
name: ObjectName(vec![Ident::new("foo")]),
- alias: None,
+ partiql_path: vec![],
+ alias: None,
args: None,
with_hints: vec![],
version: None,
@@ -789,7 +801,8 @@ fn parse_where_delete_with_alias_statement() {
assert_eq!(
TableFactor::Table {
name: ObjectName(vec![Ident::new("basket")]),
- alias: Some(TableAlias {
+ partiql_path: vec![],
+ alias: Some(TableAlias {
name: Ident::new("a"),
columns: vec![],
}),
@@ -805,7 +818,8 @@ fn parse_where_delete_with_alias_statement() {
Some(vec![TableWithJoins {
relation: TableFactor::Table {
name: ObjectName(vec![Ident::new("basket")]),
- alias: Some(TableAlias {
+ partiql_path: vec![],
+ alias: Some(TableAlias {
name: Ident::new("b"),
columns: vec![],
}),
@@ -4712,6 +4726,7 @@ fn test_parse_named_window() {
value: "aggregate_test_100".to_string(),
quote_style: None,
}]),
+ partiql_path: vec![],
alias: None,
args: None,
with_hints: vec![],
@@ -5295,6 +5310,7 @@ fn parse_interval_and_or_xor() {
value: "test".to_string(),
quote_style: None,
}]),
+ partiql_path: vec![],
alias: None,
args: None,
with_hints: vec![],
@@ -5906,7 +5922,8 @@ fn parse_implicit_join() {
TableWithJoins {
relation: TableFactor::Table {
name: ObjectName(vec!["t1".into()]),
- alias: None,
+ partiql_path: vec![],
+ alias: None,
args: None,
with_hints: vec![],
version: None,
@@ -5918,7 +5935,8 @@ fn parse_implicit_join() {
TableWithJoins {
relation: TableFactor::Table {
name: ObjectName(vec!["t2".into()]),
- alias: None,
+ partiql_path: vec![],
+ alias: None,
args: None,
with_hints: vec![],
version: None,
@@ -5938,7 +5956,8 @@ fn parse_implicit_join() {
TableWithJoins {
relation: TableFactor::Table {
name: ObjectName(vec!["t1a".into()]),
- alias: None,
+ partiql_path: vec![],
+ alias: None,
args: None,
with_hints: vec![],
version: None,
@@ -5948,6 +5967,7 @@ fn parse_implicit_join() {
joins: vec![Join {
relation: TableFactor::Table {
name: ObjectName(vec!["t1b".into()]),
+ partiql_path: vec![],
alias: None,
args: None,
with_hints: vec![],
@@ -5962,7 +5982,8 @@ fn parse_implicit_join() {
TableWithJoins {
relation: TableFactor::Table {
name: ObjectName(vec!["t2a".into()]),
- alias: None,
+ partiql_path: vec![],
+ alias: None,
args: None,
with_hints: vec![],
version: None,
@@ -5972,6 +5993,7 @@ fn parse_implicit_join() {
joins: vec![Join {
relation: TableFactor::Table {
name: ObjectName(vec!["t2b".into()]),
+ partiql_path: vec![],
alias: None,
args: None,
with_hints: vec![],
@@ -5996,7 +6018,8 @@ fn parse_cross_join() {
Join {
relation: TableFactor::Table {
name: ObjectName(vec![Ident::new("t2")]),
- alias: None,
+ partiql_path: vec![],
+ alias: None,
args: None,
with_hints: vec![],
version: None,
@@ -6142,6 +6165,7 @@ fn parse_joins_on() {
fn parse_joins_using() {
fn join_with_constraint(
relation: impl Into<String>,
+ partiql_path: vec![],
alias: Option<TableAlias>,
f: impl Fn(JoinConstraint) -> JoinOperator,
) -> Join {
@@ -6318,6 +6342,7 @@ fn parse_join_nesting() {
relation: table("a"),
joins: vec![join(table("b"))],
}),
+ partiql_path: vec![],
alias: table_alias("c"),
}
);
@@ -6490,7 +6515,8 @@ fn parse_derived_tables() {
joins: vec![Join {
relation: TableFactor::Table {
name: ObjectName(vec!["t2".into()]),
- alias: None,
+ partiql_path: vec![],
+ alias: None,
args: None,
with_hints: vec![],
version: None,
@@ -7437,6 +7463,7 @@ fn lateral_function() {
value: "customer".to_string(),
quote_style: None,
}]),
+ partiql_path: vec![],
alias: None,
args: None,
with_hints: vec![],
@@ -8249,7 +8276,8 @@ fn parse_merge() {
table,
TableFactor::Table {
name: ObjectName(vec![Ident::new("s"), Ident::new("bar")]),
- alias: Some(TableAlias {
+ partiql_path: vec![],
+ alias: Some(TableAlias {
name: Ident::new("dest"),
columns: vec![],
}),
@@ -8279,7 +8307,8 @@ fn parse_merge() {
from: vec![TableWithJoins {
relation: TableFactor::Table {
name: ObjectName(vec![Ident::new("s"), Ident::new("foo")]),
- alias: None,
+ partiql_path: vec![],
+ alias: None,
args: None,
with_hints: vec![],
version: None,
@@ -9350,7 +9379,8 @@ fn parse_pivot_table() {
Pivot {
table: Box::new(TableFactor::Table {
name: ObjectName(vec![Ident::new("monthly_sales")]),
- alias: Some(TableAlias {
+ partiql_path: vec![],
+ alias: Some(TableAlias {
name: Ident::new("a"),
columns: vec![]
}),
@@ -9423,7 +9453,8 @@ fn parse_unpivot_table() {
Unpivot {
table: Box::new(TableFactor::Table {
name: ObjectName(vec![Ident::new("sales")]),
- alias: Some(TableAlias {
+ partiql_path: vec![],
+ alias: Some(TableAlias {
name: Ident::new("s"),
columns: vec![]
}),
@@ -9490,7 +9521,8 @@ fn parse_pivot_unpivot_table() {
table: Box::new(Unpivot {
table: Box::new(TableFactor::Table {
name: ObjectName(vec![Ident::new("census")]),
- alias: Some(TableAlias {
+ partiql_path: vec![],
+ alias: Some(TableAlias {
name: Ident::new("c"),
columns: vec![]
}),
@@ -9904,7 +9936,8 @@ fn parse_unload() {
from: vec![TableWithJoins {
relation: TableFactor::Table {
name: ObjectName(vec![Ident::new("tab")]),
- alias: None,
+ partiql_path: vec![],
+ alias: None,
args: None,
with_hints: vec![],
version: None,
@@ -10083,7 +10116,8 @@ fn parse_connect_by() {
from: vec![TableWithJoins {
relation: TableFactor::Table {
name: ObjectName(vec![Ident::new("employees")]),
- alias: None,
+ partiql_path: vec![],
+ alias: None,
args: None,
with_hints: vec![],
version: None,
@@ -10170,7 +10204,8 @@ fn parse_connect_by() {
from: vec![TableWithJoins {
relation: TableFactor::Table {
name: ObjectName(vec![Ident::new("employees")]),
- alias: None,
+ partiql_path: vec![],
+ alias: None,
args: None,
with_hints: vec![],
version: None,
@@ -10331,7 +10366,8 @@ fn test_match_recognize() {
let table = TableFactor::Table {
name: ObjectName(vec![Ident::new("my_table")]),
- alias: None,
+ partiql_path: vec![],
+ alias: None,
args: None,
with_hints: vec![],
version: None,
diff --git a/tmp/agent-patch-flux-pr-1534.1-of-1.2026-02-28__18-27-22__gpt-5-4/app/tests/sqlparser_databricks.rs b/app/tests/sqlparser_databricks.rs
index 7b917bd..3dfb6d1 100644
--- a/tmp/agent-patch-flux-pr-1534.1-of-1.2026-02-28__18-27-22__gpt-5-4/app/tests/sqlparser_databricks.rs
+++ b/app/tests/sqlparser_databricks.rs
@@ -187,7 +187,8 @@ fn test_values_clause() {
assert_eq!(
Some(&TableFactor::Table {
name: ObjectName(vec![Ident::new("values")]),
- alias: None,
+ partiql_path: vec![],
+ alias: None,
args: None,
with_hints: vec![],
version: None,
diff --git a/tmp/agent-patch-flux-pr-1534.1-of-1.2026-02-28__18-27-22__gpt-5-4/app/tests/sqlparser_duckdb.rs b/app/tests/sqlparser_duckdb.rs
index a2db5c2..dadf881 100644
--- a/tmp/agent-patch-flux-pr-1534.1-of-1.2026-02-28__18-27-22__gpt-5-4/app/tests/sqlparser_duckdb.rs
+++ b/app/tests/sqlparser_duckdb.rs
@@ -276,6 +276,7 @@ fn test_select_union_by_name() {
value: "capitals".to_string(),
quote_style: None,
}]),
+ partiql_path: vec![],
alias: None,
args: None,
with_hints: vec![],
@@ -317,6 +318,7 @@ fn test_select_union_by_name() {
value: "weather".to_string(),
quote_style: None,
}]),
+ partiql_path: vec![],
alias: None,
args: None,
with_hints: vec![],
diff --git a/tmp/agent-patch-flux-pr-1534.1-of-1.2026-02-28__18-27-22__gpt-5-4/app/tests/sqlparser_mssql.rs b/app/tests/sqlparser_mssql.rs
index 73fd99c..4d4dadf 100644
--- a/tmp/agent-patch-flux-pr-1534.1-of-1.2026-02-28__18-27-22__gpt-5-4/app/tests/sqlparser_mssql.rs
+++ b/app/tests/sqlparser_mssql.rs
@@ -62,7 +62,8 @@ fn parse_table_time_travel() {
vec![TableWithJoins {
relation: TableFactor::Table {
name: ObjectName(vec![Ident::new("t1")]),
- alias: None,
+ partiql_path: vec![],
+ alias: None,
args: None,
with_hints: vec![],
version: Some(TableVersion::ForSystemTimeAsOf(Expr::Value(
@@ -207,6 +208,7 @@ fn parse_mssql_openjson() {
value: "t_test_table".into(),
quote_style: None,
},]),
+ partiql_path: vec![],
alias: Some(TableAlias {
name: Ident {
value: "A".into(),
@@ -282,6 +284,7 @@ fn parse_mssql_openjson() {
value: "t_test_table".into(),
quote_style: None,
},]),
+ partiql_path: vec![],
alias: Some(TableAlias {
name: Ident {
value: "A".into(),
@@ -357,6 +360,7 @@ fn parse_mssql_openjson() {
value: "t_test_table".into(),
quote_style: None,
},]),
+ partiql_path: vec![],
alias: Some(TableAlias {
name: Ident {
value: "A".into(),
@@ -432,6 +436,7 @@ fn parse_mssql_openjson() {
value: "t_test_table".into(),
quote_style: None,
},]),
+ partiql_path: vec![],
alias: Some(TableAlias {
name: Ident {
value: "A".into(),
@@ -485,6 +490,7 @@ fn parse_mssql_openjson() {
value: "t_test_table".into(),
quote_style: None,
},]),
+ partiql_path: vec![],
alias: Some(TableAlias {
name: Ident {
value: "A".into(),
@@ -1308,6 +1314,7 @@ fn parse_substring_in_select() {
value: "test".to_string(),
quote_style: None
}]),
+ partiql_path: vec![],
alias: None,
args: None,
with_hints: vec![],
diff --git a/tmp/agent-patch-flux-pr-1534.1-of-1.2026-02-28__18-27-22__gpt-5-4/app/tests/sqlparser_mysql.rs b/app/tests/sqlparser_mysql.rs
index ce32967..8da0029 100644
--- a/tmp/agent-patch-flux-pr-1534.1-of-1.2026-02-28__18-27-22__gpt-5-4/app/tests/sqlparser_mysql.rs
+++ b/app/tests/sqlparser_mysql.rs
@@ -1856,7 +1856,8 @@ fn parse_select_with_numeric_prefix_column_name() {
from: vec![TableWithJoins {
relation: TableFactor::Table {
name: ObjectName(vec![Ident::with_quote('"', "table")]),
- alias: None,
+ partiql_path: vec![],
+ alias: None,
args: None,
with_hints: vec![],
version: None,
@@ -1912,7 +1913,8 @@ fn parse_select_with_concatenation_of_exp_number_and_numeric_prefix_column() {
from: vec![TableWithJoins {
relation: TableFactor::Table {
name: ObjectName(vec![Ident::with_quote('"', "table")]),
- alias: None,
+ partiql_path: vec![],
+ alias: None,
args: None,
with_hints: vec![],
version: None,
@@ -1976,7 +1978,8 @@ fn parse_update_with_joins() {
TableWithJoins {
relation: TableFactor::Table {
name: ObjectName(vec![Ident::new("orders")]),
- alias: Some(TableAlias {
+ partiql_path: vec![],
+ alias: Some(TableAlias {
name: Ident::new("o"),
columns: vec![]
}),
@@ -1989,7 +1992,8 @@ fn parse_update_with_joins() {
joins: vec![Join {
relation: TableFactor::Table {
name: ObjectName(vec![Ident::new("customers")]),
- alias: Some(TableAlias {
+ partiql_path: vec![],
+ alias: Some(TableAlias {
name: Ident::new("c"),
columns: vec![]
}),
@@ -2422,6 +2426,7 @@ fn parse_substring_in_select() {
value: "test".to_string(),
quote_style: None
}]),
+ partiql_path: vec![],
alias: None,
args: None,
with_hints: vec![],
diff --git a/tmp/agent-patch-flux-pr-1534.1-of-1.2026-02-28__18-27-22__gpt-5-4/app/tests/sqlparser_postgres.rs b/app/tests/sqlparser_postgres.rs
index 2e2c440..712795a 100644
--- a/tmp/agent-patch-flux-pr-1534.1-of-1.2026-02-28__18-27-22__gpt-5-4/app/tests/sqlparser_postgres.rs
+++ b/app/tests/sqlparser_postgres.rs
@@ -3859,6 +3859,7 @@ fn parse_dollar_quoted_string() {
tag: None,
value: "Foo$Bar".into(),
})),
+ partiql_path: vec![],
alias: Ident {
value: "col_name".into(),
quote_style: None,
diff --git a/tmp/agent-patch-flux-pr-1534.1-of-1.2026-02-28__18-27-22__gpt-5-4/app/tests/sqlparser_redshift.rs b/app/tests/sqlparser_redshift.rs
index a25d506..f5c0d3f 100644
--- a/tmp/agent-patch-flux-pr-1534.1-of-1.2026-02-28__18-27-22__gpt-5-4/app/tests/sqlparser_redshift.rs
+++ b/app/tests/sqlparser_redshift.rs
@@ -48,6 +48,7 @@ fn test_square_brackets_over_db_schema_table_name() {
quote_style: Some('[')
}
]),
+ partiql_path: vec![],
alias: None,
args: None,
with_hints: vec![],
@@ -95,6 +96,7 @@ fn test_double_quotes_over_db_schema_table_name() {
quote_style: Some('"')
}
]),
+ partiql_path: vec![],
alias: None,
args: None,
with_hints: vec![],
@@ -117,6 +119,7 @@ fn parse_delimited_identifiers() {
match only(select.from).relation {
TableFactor::Table {
name,
+ partiql_path,
alias,
args,
with_hints,
@@ -125,6 +128,7 @@ fn parse_delimited_identifiers() {
partitions: _,
} => {
assert_eq!(vec![Ident::with_quote('"', "a table")], name.0);
+ assert!(partiql_path.is_empty());
assert_eq!(Ident::with_quote('"', "alias"), alias.unwrap().name);
assert!(args.is_none());
assert!(with_hints.is_empty());
@@ -196,3 +200,49 @@ fn test_create_view_with_no_schema_binding() {
redshift_and_generic()
.verified_stmt("CREATE VIEW myevent AS SELECT eventname FROM event WITH NO SCHEMA BINDING");
}
+
+#[test]
+fn parse_partiql_map_access_expression() {
+ redshift().one_statement_parses_to(
+ "SELECT c.c_orders[0].o_orderkey FROM customer_orders_lineitem c",
+ "SELECT c.c_orders[0].o_orderkey FROM customer_orders_lineitem AS c",
+ );
+}
+
+#[test]
+fn parse_partiql_path_in_from_clause() {
+ let select = redshift()
+ .verified_only_select("SELECT * FROM customer_orders_lineitem.c_orders[0].o_lineitems l");
+
+ assert_eq!(
+ only(select.from),
+ TableWithJoins {
+ relation: TableFactor::Table {
+ name: ObjectName(vec![
+ Ident::new("customer_orders_lineitem"),
+ Ident::new("c_orders"),
+ ]),
+ partiql_path: vec![
+ MapAccessKey {
+ key: Expr::Value(Value::Number("0".to_string(), false)),
+ syntax: MapAccessSyntax::Bracket,
+ },
+ MapAccessKey {
+ key: Expr::Identifier(Ident::new("o_lineitems")),
+ syntax: MapAccessSyntax::Period,
+ },
+ ],
+ alias: Some(TableAlias {
+ name: Ident::new("l"),
+ columns: vec![],
+ }),
+ args: None,
+ with_hints: vec![],
+ version: None,
+ partitions: vec![],
+ with_ordinality: false,
+ },
+ joins: vec![],
+ }
+ );
+}
diff --git a/tmp/agent-patch-flux-pr-1534.1-of-1.2026-02-28__18-27-22__gpt-5-4/app/tests/sqlparser_sqlite.rs b/app/tests/sqlparser_sqlite.rs
index 6f8e654..71fc652 100644
--- a/tmp/agent-patch-flux-pr-1534.1-of-1.2026-02-28__18-27-22__gpt-5-4/app/tests/sqlparser_sqlite.rs
+++ b/app/tests/sqlparser_sqlite.rs
@@ -480,7 +480,8 @@ fn parse_update_tuple_row_values() {
table: TableWithJoins {
relation: TableFactor::Table {
name: ObjectName(vec![Ident::new("x")]),
- alias: None,
+ partiql_path: vec![],
+ alias: None,
args: None,
with_hints: vec![],
version: None,