[
https://issues.apache.org/jira/browse/PHOENIX-7073?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17788211#comment-17788211
]
ASF GitHub Bot commented on PHOENIX-7073:
-----------------------------------------
ranganathg commented on code in PR #1712:
URL: https://github.com/apache/phoenix/pull/1712#discussion_r1399928951
##########
phoenix-core/src/main/java/org/apache/phoenix/iterate/NonAggregateRegionScannerFactory.java:
##########
@@ -109,13 +113,27 @@ public RegionScanner getRegionScanner(final Scan scan,
final RegionScanner s) th
PTable.QualifierEncodingScheme encodingScheme =
EncodedColumnsUtil.getQualifierEncodingScheme(scan);
boolean useNewValueColumnQualifier =
EncodedColumnsUtil.useNewValueColumnQualifier(scan);
- Set<KeyValueColumnExpression> arrayKVRefs = Sets.newHashSet();
+ Set<KeyValueColumnExpression> serverParsedKVRefs = Sets.newHashSet();
KeyValueSchema kvSchema = null;
ValueBitSet kvSchemaBitSet = null;
- Expression[] arrayFuncRefs =
deserializeArrayPositionalExpressionInfoFromScan(scan, innerScanner,
arrayKVRefs);
- if (arrayFuncRefs != null) {
- KeyValueSchema.KeyValueSchemaBuilder builder = new
KeyValueSchema.KeyValueSchemaBuilder(0);
- for (Expression expression : arrayFuncRefs) {
+ Expression[]
+ serverParsedArrayFuncRefs = null;
+ if (scan.getAttribute(BaseScannerRegionObserver.SPECIFIC_ARRAY_INDEX)
!= null) {
+ serverParsedArrayFuncRefs =
+
deserializeServerParsedPositionalExpressionInfoFromScan(scan,
+ BaseScannerRegionObserver.SPECIFIC_ARRAY_INDEX,
serverParsedKVRefs);
+ }
+ List<Expression> resultList = new ArrayList<>();
+ if (serverParsedArrayFuncRefs != null) {
+ Collections.addAll(resultList, serverParsedArrayFuncRefs);
+ }
+ extractJsonSpecificFuncRefs(scan, serverParsedKVRefs, resultList);
+ Expression[] serverParsedFuncRefs = resultList.toArray(new
Expression[0]);
Review Comment:
agree. my initial thought was only extracting json specific things out
without changing the other code structure. will do this.
> Parse JSON columns on the server side
> -------------------------------------
>
> Key: PHOENIX-7073
> URL: https://issues.apache.org/jira/browse/PHOENIX-7073
> Project: Phoenix
> Issue Type: Sub-task
> Reporter: Ranganath Govardhanagiri
> Assignee: Ranganath Govardhanagiri
> Priority: Major
>
> One of the optimizations mentioned in the Design spec is to _"pass the json
> path to server side as part of the select and do the parsing on the server
> side and then return the result to the client."_
> This is the task to track that change
--
This message was sent by Atlassian Jira
(v8.20.10#820010)