org.apache.flink.api.java.typeutils.runtime.GenericTypeComparator Java Examples
The following examples show how to use
org.apache.flink.api.java.typeutils.runtime.GenericTypeComparator.
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: GenericTypeInfo.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
@SuppressWarnings("unchecked") @Override @PublicEvolving public TypeComparator<T> createComparator(boolean sortOrderAscending, ExecutionConfig executionConfig) { if (isKeyType()) { @SuppressWarnings("rawtypes") GenericTypeComparator comparator = new GenericTypeComparator(sortOrderAscending, createSerializer(executionConfig), this.typeClass); return (TypeComparator<T>) comparator; } throw new UnsupportedOperationException("Types that do not implement java.lang.Comparable cannot be used as keys."); }
Example #2
Source File: GenericTypeInfo.java From flink with Apache License 2.0 | 5 votes |
@SuppressWarnings("unchecked") @Override @PublicEvolving public TypeComparator<T> createComparator(boolean sortOrderAscending, ExecutionConfig executionConfig) { if (isKeyType()) { @SuppressWarnings("rawtypes") GenericTypeComparator comparator = new GenericTypeComparator(sortOrderAscending, createSerializer(executionConfig), this.typeClass); return (TypeComparator<T>) comparator; } throw new UnsupportedOperationException("Types that do not implement java.lang.Comparable cannot be used as keys."); }
Example #3
Source File: GenericTypeInfo.java From flink with Apache License 2.0 | 5 votes |
@SuppressWarnings("unchecked") @Override @PublicEvolving public TypeComparator<T> createComparator(boolean sortOrderAscending, ExecutionConfig executionConfig) { if (isKeyType()) { @SuppressWarnings("rawtypes") GenericTypeComparator comparator = new GenericTypeComparator(sortOrderAscending, createSerializer(executionConfig), this.typeClass); return (TypeComparator<T>) comparator; } throw new UnsupportedOperationException("Types that do not implement java.lang.Comparable cannot be used as keys."); }