You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by "tanclary (via GitHub)" <gi...@apache.org> on 2023/04/21 17:26:57 UTC

[GitHub] [calcite] tanclary commented on pull request #3167: [CALCITE-5660] Add array subscript operators OFFSET, ORDINAL, SAFE_OFFSET, SAFE_ORDINAL (enabled for BigQuery)

tanclary commented on PR #3167:
URL: https://github.com/apache/calcite/pull/3167#issuecomment-1518133174

   > Change the commit message to 'Add array subscript operators OFFSET, ORDINAL (enabled for BigQuery)', just to conform to the usual format.
   > 
   > Are people allowed to call these operators outside of an array? If so, write tests to make sure they can't, even in BigQuery.
   > 
   > Is `array[OFFSET(2)+OFFSET(3)]` valid? Is `array[OFFSET(2 + 3)]` valid?
   > 
   > Good work; this PR looks very close.
   
   @julianhyde 
   - Commit message should be changed.
   - These operators are solely for array expressions from what I can tell in the docs, so I parameterized the operand type checker as well. I added some test cases for this. 
   - OFFSET(2) + OFFSET(3) should not be valid (and it isn't). OFFSET(2+3) should be valid (and it is).


-- 
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: commits-unsubscribe@calcite.apache.org

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