Skip to content

[Backport] json_value adjustments#12993

Merged
clintropolis merged 1 commit intoapache:24.0.0from
clintropolis:backport-12968-to-24.0.0
Aug 30, 2022
Merged

[Backport] json_value adjustments#12993
clintropolis merged 1 commit intoapache:24.0.0from
clintropolis:backport-12968-to-24.0.0

Conversation

@clintropolis
Copy link
Member

Backport of #12968 to 24.0.0.

* json_value adjustments
changes:
* native json_value expression now has optional 3rd argument to specify type, which will cast all values to the specified type
* rework how JSON_VALUE is wired up in SQL. Now we are using a custom convertlet to translate JSON_VALUE(... RETURNING type) into dedicated JSON_VALUE_BIGINT, JSON_VALUE_DOUBLE, JSON_VALUE_VARCHAR, JSON_VALUE_ANY instead of using the calcite StandardConvertletTable that wraps JSON_VALUE_ANY in a CAST, so that we preserve the typing of JSON_VALUE to pass down to the native expression as the 3rd argument

* fix json_value_any to be usable by humans too, coverage

* fix bug

* checkstyle

* checkstyle

* review stuff

* validate that options to json_value are the supported options rather than ignore them

* remove more legacy undocumented functions
@clintropolis clintropolis added this to the 24.0.0 milestone Aug 29, 2022
@clintropolis clintropolis merged commit caa00aa into apache:24.0.0 Aug 30, 2022
@clintropolis clintropolis deleted the backport-12968-to-24.0.0 branch August 30, 2022 01:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants