You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/10/19 04:32:07 UTC

[GitHub] [flink] JingsongLi commented on a change in pull request #13653: [FLINK-17528][table] Remove RowData#get() and ArrayData#get() and use FieldGetter and ElementGetter instead

JingsongLi commented on a change in pull request #13653:
URL: https://github.com/apache/flink/pull/13653#discussion_r507442655



##########
File path: flink-table/flink-table-common/src/main/java/org/apache/flink/table/data/binary/BinaryArrayData.java
##########
@@ -507,7 +507,8 @@ private void checkNoNull() {
 		T[] values = (T[]) Array.newInstance(elementClass, size);
 		for (int i = 0; i < size; i++) {
 			if (!isNullAt(i)) {
-				values[i] = (T) ArrayData.get(this, i, elementType);
+				ArrayData.ElementGetter elementGetter = ArrayData.createElementGetter(elementType);

Review comment:
       `elementGetter` should be out of for loop.

##########
File path: flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/data/util/RowDataUtil.java
##########
@@ -58,7 +58,8 @@ public static GenericRowData toGenericRow(
 				if (row.isNullAt(i)) {

Review comment:
       Should move this class to test?




----------------------------------------------------------------
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:
users@infra.apache.org