liyafan82 commented on a change in pull request #8682: 
[FLINK-12796][table-planner-blink] Introduce BaseArray and BaseMap to reduce 
conversion overhead to blink
URL: https://github.com/apache/flink/pull/8682#discussion_r292415005
 
 

 ##########
 File path: 
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/codegen/calls/ScalarOperatorGens.scala
 ##########
 @@ -1524,20 +1527,21 @@ object ScalarOperatorGens {
       val valueUpdate = generatePrimitiveArrayUpdateCode(
         ctx, valueArrayTerm, valueType, valueElements)
       s"""
-         |$BINARY_ARRAY $keyArrayTerm = $mapTerm.keyArray();
+         |$BINARY_ARRAY $keyArrayTerm = $binaryMap.keyArray();
          |$keyUpdate
-         |$BINARY_ARRAY $valueArrayTerm = $mapTerm.valueArray();
+         |$BINARY_ARRAY $valueArrayTerm = $binaryMap.valueArray();
          |$valueUpdate
+         |$baseMap = $binaryMap;
        """.stripMargin
     } else {
       // the key or value is not fixed length, re-create the map on every 
update
       s"""
          |${keyExpr.code}
          |${valueExpr.code}
-         |$mapTerm = $BINARY_MAP.valueOf(${keyExpr.resultTerm}, 
${valueExpr.resultTerm});
+         |$baseMap = $BINARY_MAP.valueOf(${keyExpr.resultTerm}, 
${valueExpr.resultTerm});
 
 Review comment:
   This should be binaryMap?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to