[ 
https://issues.apache.org/jira/browse/ASTERIXDB-3489?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17876144#comment-17876144
 ] 

ASF subversion and git services commented on ASTERIXDB-3489:
------------------------------------------------------------

Commit 40fdcd2a5d609bfd41189d7abf07473511dad5be in asterixdb's branch 
refs/heads/master from brianyen
[ https://gitbox.apache.org/repos/asf?p=asterixdb.git;h=40fdcd2a5d ]

[ASTERIXDB-3489][COMP] Allow start index to be optional for array slicing

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
Change the grammar to allow the start index to be optional
for array slicing. For example:
arr[:]
arr[]
arr[:5]
The new syntax is:
PathExpression ::= PrimaryExpression ( Field | Index )*
Index ::= "[" (Expression)? (":" ( Expression )? )? "]"

Ext-ref: MB-41418
Change-Id: Ibb45daccf047243034e0f85e9467f6a7f520a5be
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18706
Integration-Tests: Jenkins <[email protected]>
Tested-by: Jenkins <[email protected]>
Reviewed-by: Ali Alsuliman <[email protected]>


> Array slicing support is incomplete
> -----------------------------------
>
>                 Key: ASTERIXDB-3489
>                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-3489
>             Project: Apache AsterixDB
>          Issue Type: Bug
>          Components: COMP - Compiler
>            Reporter: Ali Alsuliman
>            Assignee: Ali Alsuliman
>            Priority: Major
>
> The syntax for array accesses is:
> PathExpression ::= PrimaryExpression ( Field | Index )*
> Field ::= "." Identifier
> Index ::= "[" Expression (":" ( Expression )? )? "]"
> It's Python-inspired but misses part of what you can do there, e.g., arr[5:] 
> is supported but arr[:5] is not.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to