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: us...@infra.apache.org With regards, Apache Git Services