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/04/19 13:48:01 UTC

[GitHub] [flink] libenchao commented on a change in pull request #11797: [FLINK-17169][table-blink] Refactor BaseRow to use RowKind instead of byte header

libenchao commented on a change in pull request #11797: [FLINK-17169][table-blink] Refactor BaseRow to use RowKind instead of byte header
URL: https://github.com/apache/flink/pull/11797#discussion_r410908757
 
 

 ##########
 File path: flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/dataformat/BinaryRow.java
 ##########
 @@ -129,13 +130,15 @@ public int getArity() {
 	}
 
 	@Override
-	public byte getHeader() {
+	public RowKind getRowKind() {
 		// first nullBitsSizeInBytes byte is header.
-		return segments[0].get(offset);
+		byte header = segments[0].get(offset);
+		return RowKind.values()[header];
 
 Review comment:
   IMHO, using enum's values and ordinal is not very elegant.
   How about adding a field explicitly whose meaning is byte encoding for each enum?

----------------------------------------------------------------
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


With regards,
Apache Git Services