Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: array access is now 1-indexed instead of 0-indexed #4057

Merged
merged 1 commit into from
Dec 5, 2019

Conversation

agavra
Copy link
Contributor

@agavra agavra commented Dec 5, 2019

BREAKING CHANGE: any queries that were using array index mechanism
should change to use 1-base indexing instead of 0-base.

fixes #3949
fixes #1659

Description

Changes the array indexing to be in line with standard SQL (namely 1-indexed instead of 0-indexed). For historical context, see #1682 - since we're making this as a breaking change, we don't need to introduce it as a configurable UDF (this approach is much cleaner).

Testing done

Added unit tests and updated QTT tests.

Reviewer checklist

  • Ensure docs are updated if necessary. (eg. if a user visible feature is being added or changed).
  • Ensure relevant issues are linked (description should include text like "Fixes #")

BREAKING CHANGE: any queries that were using array index mechanism
should change to use 1-base indexing instead of 0-base.
Copy link
Contributor

@rodesai rodesai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@agavra agavra merged commit f09f797 into confluentinc:master Dec 5, 2019
@agavra agavra deleted the one_index branch December 5, 2019 23:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change base index of array access to one KSQL Functions and Arrays should use 1-based indexing
2 participants