Java Code Examples for org.apache.flink.api.common.typeinfo.PrimitiveArrayTypeInfo#FLOAT_PRIMITIVE_ARRAY_TYPE_INFO
The following examples show how to use
org.apache.flink.api.common.typeinfo.PrimitiveArrayTypeInfo#FLOAT_PRIMITIVE_ARRAY_TYPE_INFO .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Types.java From flink with Apache License 2.0 | 6 votes |
/** * Generates type information for an array consisting of Java primitive elements. The elements do * not support null values. * * @param elementType type of the array elements; e.g. Types.INT() */ public static TypeInformation<?> PRIMITIVE_ARRAY(TypeInformation<?> elementType) { if (elementType.equals(BOOLEAN())) { return PrimitiveArrayTypeInfo.BOOLEAN_PRIMITIVE_ARRAY_TYPE_INFO; } else if (elementType.equals(BYTE())) { return PrimitiveArrayTypeInfo.BYTE_PRIMITIVE_ARRAY_TYPE_INFO; } else if (elementType.equals(SHORT())) { return PrimitiveArrayTypeInfo.SHORT_PRIMITIVE_ARRAY_TYPE_INFO; } else if (elementType.equals(INT())) { return PrimitiveArrayTypeInfo.INT_PRIMITIVE_ARRAY_TYPE_INFO; } else if (elementType.equals(LONG())) { return PrimitiveArrayTypeInfo.LONG_PRIMITIVE_ARRAY_TYPE_INFO; } else if (elementType.equals(FLOAT())) { return PrimitiveArrayTypeInfo.FLOAT_PRIMITIVE_ARRAY_TYPE_INFO; } else if (elementType.equals(DOUBLE())) { return PrimitiveArrayTypeInfo.DOUBLE_PRIMITIVE_ARRAY_TYPE_INFO; } throw new TableException( String.format( "%s cannot be an element of a primitive array. Only Java primitive types are supported.", elementType)); }
Example 2
Source File: Types.java From flink with Apache License 2.0 | 6 votes |
/** * Generates type information for an array consisting of Java primitive elements. The elements do * not support null values. * * @param elementType type of the array elements; e.g. Types.INT() */ public static TypeInformation<?> PRIMITIVE_ARRAY(TypeInformation<?> elementType) { if (elementType.equals(BOOLEAN())) { return PrimitiveArrayTypeInfo.BOOLEAN_PRIMITIVE_ARRAY_TYPE_INFO; } else if (elementType.equals(BYTE())) { return PrimitiveArrayTypeInfo.BYTE_PRIMITIVE_ARRAY_TYPE_INFO; } else if (elementType.equals(SHORT())) { return PrimitiveArrayTypeInfo.SHORT_PRIMITIVE_ARRAY_TYPE_INFO; } else if (elementType.equals(INT())) { return PrimitiveArrayTypeInfo.INT_PRIMITIVE_ARRAY_TYPE_INFO; } else if (elementType.equals(LONG())) { return PrimitiveArrayTypeInfo.LONG_PRIMITIVE_ARRAY_TYPE_INFO; } else if (elementType.equals(FLOAT())) { return PrimitiveArrayTypeInfo.FLOAT_PRIMITIVE_ARRAY_TYPE_INFO; } else if (elementType.equals(DOUBLE())) { return PrimitiveArrayTypeInfo.DOUBLE_PRIMITIVE_ARRAY_TYPE_INFO; } throw new TableException( String.format( "%s cannot be an element of a primitive array. Only Java primitive types are supported.", elementType)); }
Example 3
Source File: FloatPrimitiveArrayComparatorTest.java From Flink-CEPplus with Apache License 2.0 | 4 votes |
public FloatPrimitiveArrayComparatorTest() { super(PrimitiveArrayTypeInfo.FLOAT_PRIMITIVE_ARRAY_TYPE_INFO); }
Example 4
Source File: FloatPrimitiveArrayComparatorTest.java From flink with Apache License 2.0 | 4 votes |
public FloatPrimitiveArrayComparatorTest() { super(PrimitiveArrayTypeInfo.FLOAT_PRIMITIVE_ARRAY_TYPE_INFO); }
Example 5
Source File: FloatPrimitiveArrayComparatorTest.java From flink with Apache License 2.0 | 4 votes |
public FloatPrimitiveArrayComparatorTest() { super(PrimitiveArrayTypeInfo.FLOAT_PRIMITIVE_ARRAY_TYPE_INFO); }