matrixorigin / matrixone

Hyperconverged cloud-edge native database
https://docs.matrixorigin.cn/en
Apache License 2.0
1.76k stars 274 forks source link

[Feature Request]: json_extract_string and json_extract_float64 #17897

Open fengttt opened 1 month ago

fengttt commented 1 month ago

Is there an existing issue for the same feature request?

Is your feature request related to a problem?

json_extract returns json type.  For comparing with sql value, we need to cast 
data to json.  A much better (both semantically clearer and more efficient) way 
to handle value is just extract them.

Describe the feature you'd like

Adding two functions (maybe 3), json_extract_string -- same as json_extract, but with exactly one path. return string value, or null if json_extract of the path is not a string node. json_extract_float64 -- return float64 or null if node is not a number json_extract_int64 -- maybe this one

Describe implementation you've considered

No response

Documentation, Adoption, Use Case, Migration Strategy

No response

Additional information

No response

YANGGMM commented 4 weeks ago

@aronchanisme 麻烦测试一下