Skip to content

Commit

Permalink
Use BinaryStringData directly to keep java8 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
syucream committed Dec 22, 2020
1 parent 6b2d6e0 commit 64dc032
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ public String codegen(String returnVarName, String messageGetStr) {
case STRING:
case ENUM:
sb.append(
returnVarName + " = StringData.fromString(" + messageGetStr + ".toString());");
returnVarName + " = BinaryStringData.fromString(" + messageGetStr
+ ".toString());");
break;
}
return sb.toString();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import org.apache.flink.table.data.GenericRowData;
import org.apache.flink.table.data.RowData;
import org.apache.flink.table.data.StringData;
import org.apache.flink.table.data.binary.BinaryStringData;
import org.apache.flink.table.types.logical.RowType;

import com.google.protobuf.Descriptors;
Expand Down Expand Up @@ -63,7 +64,7 @@ public ProtoToRowConverter(
se.setDefaultImports(
RowData.class.getName(),
ArrayData.class.getName(),
StringData.class.getName(),
BinaryStringData.class.getName(),
GenericRowData.class.getName(),
GenericMapData.class.getName(),
GenericArrayData.class.getName(),
Expand Down

0 comments on commit 64dc032

Please sign in to comment.