[
https://issues.apache.org/jira/browse/PHOENIX-7551?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Viraj Jasani updated PHOENIX-7551:
----------------------------------
Fix Version/s: 5.3.0
> BSON_DATA_TYPE function to return the data type of BSON field value
> -------------------------------------------------------------------
>
> Key: PHOENIX-7551
> URL: https://issues.apache.org/jira/browse/PHOENIX-7551
> Project: Phoenix
> Issue Type: Improvement
> Reporter: Viraj Jasani
> Priority: Major
> Fix For: 5.3.0
>
>
> The purpose of this Jira is to introduce new function for BSON data type to
> retrieve the Phoenix data type (PDataType) of the given Bson Document field
> value for the given field key.
> h2. *Function Grammar:*
> *Name:* BSON_DATA_TYPE
> *Arguments:*
> | |*Expression*|*DataType*|
> |1|Column Value|BSON|
> |2|Bson Field Key|The field key can represent any top level or nested fields
> within the document. The caller should use "." notation for accessing nested
> document elements and "[n]" notation for accessing nested array elements.
> Unlike nested fields, top level document fields do not require any additional
> character.|
>
> *Definition:* The function returns the Phoenix SQL Data type value of the
> given field key/value from the BSON Document.
> *Return Type:* VARCHAR
> *Examples:*
> * BSON_DATA_TYPE(COL, 'topfield.nestedfield1')
> * BSON_VALUE(COL, 'topfield.nestedfield1', BSON_DATA_TYPE(COL,
> 'topfield.nestedfield1'))
--
This message was sent by Atlassian Jira
(v8.20.10#820010)