Skip to content

Use default implemetation for constants in JSON* functions#15589

Merged
alexey-milovidov merged 1 commit intomasterfrom
tavplubix-patch-1
Oct 4, 2020
Merged

Use default implemetation for constants in JSON* functions#15589
alexey-milovidov merged 1 commit intomasterfrom
tavplubix-patch-1

Conversation

@tavplubix
Copy link
Copy Markdown
Member

@tavplubix tavplubix commented Oct 3, 2020

I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en

Changelog category (leave one):

  • Bug Fix

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Fixed Element ... is not a constant expression error when using JSON* function result in VALUES, LIMIT or right side of IN operator.

Detailed description / Documentation draft:
JSON* functions return non-constant result for constant arguments:

select JSONExtract('{"a":[1, 2]}', 'a', 'Array(UInt32)') as a,  1 in a

Code: 36, e.displayText() = DB::Exception: Element of set in IN, VALUES or LIMIT is not a constant expression (result column is not const): JSONExtract('{a:[1, 2]}', 'a', 'Array(UInt32)') (version 20.9.1.4543 (official build))

Seems like these functions should work fine with default implementation for constant columns.

@robot-clickhouse robot-clickhouse added the pr-not-for-changelog This PR should not be mentioned in the changelog label Oct 3, 2020
@alexey-milovidov alexey-milovidov self-assigned this Oct 4, 2020
@alexey-milovidov alexey-milovidov merged commit a005ec4 into master Oct 4, 2020
@alexey-milovidov alexey-milovidov deleted the tavplubix-patch-1 branch October 4, 2020 13:02
@robot-clickhouse robot-clickhouse added pr-bugfix Pull request with bugfix, not backported by default and removed pr-not-for-changelog This PR should not be mentioned in the changelog labels Oct 6, 2020
robot-clickhouse pushed a commit that referenced this pull request Oct 6, 2020
robot-clickhouse pushed a commit that referenced this pull request Oct 6, 2020
robot-clickhouse pushed a commit that referenced this pull request Oct 6, 2020
robot-clickhouse pushed a commit that referenced this pull request Oct 6, 2020
tavplubix added a commit that referenced this pull request Oct 6, 2020
Backport #15589 to 20.7: Use default implemetation for constants in JSON* functions
tavplubix added a commit that referenced this pull request Oct 6, 2020
Backport #15589 to 20.6: Use default implemetation for constants in JSON* functions
tavplubix added a commit that referenced this pull request Oct 6, 2020
Backport #15589 to 20.9: Use default implemetation for constants in JSON* functions
tavplubix added a commit that referenced this pull request Oct 6, 2020
Backport #15589 to 20.8: Use default implemetation for constants in JSON* functions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-bugfix Pull request with bugfix, not backported by default

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants