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 2019/06/07 08:19:20 UTC

[GitHub] [flink] dawidwys commented on a change in pull request #8651: [FLINK-12769][table-common] Simplify expression design for symbols

dawidwys commented on a change in pull request #8651: [FLINK-12769][table-common] Simplify expression design for symbols
URL: https://github.com/apache/flink/pull/8651#discussion_r291480536
 
 

 ##########
 File path: flink-table/flink-table-common/src/main/java/org/apache/flink/table/types/utils/ClassDataTypeConverter.java
 ##########
 @@ -81,15 +84,22 @@ private static void addDefaultDataType(Class<?> clazz, DataType rootType) {
 	 * as information about the fields is missing. Or {@link BigDecimal} needs to be mapped from a
 	 * variable precision/scale to constant ones.
 	 */
+	@SuppressWarnings("unchecked")
 	public static Optional<DataType> extractDataType(Class<?> clazz) {
 		// byte arrays have higher priority than regular arrays
 		if (clazz.equals(byte[].class)) {
-			return Optional.of(DataTypes.BYTES().nullable().bridgedTo(byte[].class));
+			return Optional.of(DataTypes.BYTES());
 		}
+
 		if (clazz.isArray()) {
 			return extractDataType(clazz.getComponentType())
 				.map(element -> DataTypes.ARRAY(element).nullable().bridgedTo(clazz));
 
 Review comment:
   Should we change it the same way as for `byte[].class`?

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