flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [flink] JingsongLi commented on a change in pull request #7958: [FLINK-11881][table-planner-blink] Introduce code generated typed sort to blink table
Date Wed, 13 Mar 2019 07:19:12 GMT
JingsongLi commented on a change in pull request #7958: [FLINK-11881][table-planner-blink]
Introduce code generated typed sort to blink table
URL: https://github.com/apache/flink/pull/7958#discussion_r264998315
 
 

 ##########
 File path: flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/dataformat/TypeGetterSetters.java
 ##########
 @@ -205,8 +216,45 @@ static Object get(TypeGetterSetters row, int ordinal, InternalType type)
{
 			return row.getRow(ordinal, ((RowType) type).getArity());
 		} else if (type instanceof GenericType) {
 			return row.getGeneric(ordinal);
+		} else if (type.equals(InternalTypes.BINARY)) {
+			return row.getBinary(ordinal);
 		} else {
 			throw new RuntimeException("Not support type: " + type);
 		}
 	}
+
+	/**
+	 * Get binary, if len less than 8, will be include in variablePartOffsetAndLen.
+	 *
+	 * <p>If len is less than 8, its binary format is:
+	 * 1bit mark(1) = 1, 7bits len, and 7bytes data.
+	 *
+	 * <p>If len is greater or equal to 8, its binary format is:
+	 * 1bit mark(1) = 0, 31bits offset, and 4bytes len.
+	 * Data is stored in variable-length part.
+	 *
+	 * <p>Note: Need to consider the ByteOrder.
+	 *
+	 * @param baseOffset base offset of composite binary format.
+	 * @param fieldOffset absolute start offset of 'variablePartOffsetAndLen'.
+	 * @param variablePartOffsetAndLen a long value, real data or offset and len.
+	 */
+	static byte[] readBinaryFieldFromSegments(
 
 Review comment:
   BinaryFormat is better.

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

Mime
View raw message