You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "yoavcloud (via GitHub)" <gi...@apache.org> on 2026/04/15 12:43:28 UTC

[PR] Redshift: PartiQL AT [datafusion-sqlparser-rs]

yoavcloud opened a new pull request, #2303:
URL: https://github.com/apache/datafusion-sqlparser-rs/pull/2303

   Add support for the `AT` keyword in PartiQL that is used during unnesting to retrieve the index of an element in an array.
   
   For example:
   ```sql
   SELECT index, val FROM my_table t, t.my_array val AT index;
   ```


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] Redshift: PartiQL AT [datafusion-sqlparser-rs]

Posted by "iffyio (via GitHub)" <gi...@apache.org>.
iffyio merged PR #2303:
URL: https://github.com/apache/datafusion-sqlparser-rs/pull/2303


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] Redshift: PartiQL AT [datafusion-sqlparser-rs]

Posted by "iffyio (via GitHub)" <gi...@apache.org>.
iffyio commented on code in PR #2303:
URL: https://github.com/apache/datafusion-sqlparser-rs/pull/2303#discussion_r3098753386


##########
src/ast/query.rs:
##########
@@ -2527,6 +2527,8 @@ pub struct TableAlias {
     pub name: Ident,
     /// Optional column aliases declared in parentheses after the table alias.
     pub columns: Vec<TableAliasColumnDef>,
+    /// Optional PartiQL index alias declared with `AT`.
+    pub at: Option<Ident>,

Review Comment:
   Can we add a link to the doc defining the syntax? (maybe an example syntax would also be helpful like we have on the `explicit` field)



-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] Redshift: PartiQL AT [datafusion-sqlparser-rs]

Posted by "iffyio (via GitHub)" <gi...@apache.org>.
iffyio commented on code in PR #2303:
URL: https://github.com/apache/datafusion-sqlparser-rs/pull/2303#discussion_r3099000458


##########
tests/sqlparser_redshift.rs:
##########
@@ -517,3 +517,27 @@ fn test_null_treatment_inside_and_outside_window_function() {
     redshift().verified_stmt("SELECT FIRST_VALUE(1 IGNORE NULLS) OVER () FROM (SELECT 1) t");
     redshift().verified_stmt("SELECT FIRST_VALUE(1) IGNORE NULLS OVER () FROM (SELECT 1) t");
 }
+
+#[test]
+fn test_partiql_from_alias_with_at_index() {
+    redshift().verified_stmt("SELECT * FROM lineitem AS l (a, b, c) AT idx");

Review Comment:
   for the test can we switch to `all_dialect_where(|d| d.supports_partiql())` so that future dialects are covered without duplicating tests?



-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org