org.apache.flink.api.common.typeutils.CompositeTypeComparator Java Examples
The following examples show how to use
org.apache.flink.api.common.typeutils.CompositeTypeComparator.
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: NullAwareComparator.java From Flink-CEPplus with Apache License 2.0 | 6 votes |
@Override public TypeComparator[] getFlatComparators() { // determine the flat comparators and wrap them again in null-aware comparators List<TypeComparator<?>> flatComparators = new ArrayList<>(); if (wrappedComparator instanceof CompositeTypeComparator) { ((CompositeTypeComparator) wrappedComparator).getFlatComparator(flatComparators); } else { flatComparators.add(wrappedComparator); } TypeComparator<?>[] result = new TypeComparator[flatComparators.size()]; for (int i = 0; i < result.length; i++) { result[i] = new NullAwareComparator<>(flatComparators.get(i), order); } return result; }
Example #2
Source File: NullAwareComparator.java From flink with Apache License 2.0 | 6 votes |
@Override public TypeComparator[] getFlatComparators() { // determine the flat comparators and wrap them again in null-aware comparators List<TypeComparator<?>> flatComparators = new ArrayList<>(); if (wrappedComparator instanceof CompositeTypeComparator) { ((CompositeTypeComparator) wrappedComparator).getFlatComparator(flatComparators); } else { flatComparators.add(wrappedComparator); } TypeComparator<?>[] result = new TypeComparator[flatComparators.size()]; for (int i = 0; i < result.length; i++) { result[i] = new NullAwareComparator<>(flatComparators.get(i), order); } return result; }
Example #3
Source File: NullAwareComparator.java From flink with Apache License 2.0 | 6 votes |
@Override public TypeComparator[] getFlatComparators() { // determine the flat comparators and wrap them again in null-aware comparators List<TypeComparator<?>> flatComparators = new ArrayList<>(); if (wrappedComparator instanceof CompositeTypeComparator) { ((CompositeTypeComparator) wrappedComparator).getFlatComparator(flatComparators); } else { flatComparators.add(wrappedComparator); } TypeComparator<?>[] result = new TypeComparator[flatComparators.size()]; for (int i = 0; i < result.length; i++) { result[i] = new NullAwareComparator<>(flatComparators.get(i), order); } return result; }
Example #4
Source File: TupleComparatorBase.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
@SuppressWarnings({ "rawtypes", "unchecked" }) @Override public void getFlatComparator(List<TypeComparator> flatComparators) { for(int i = 0; i < comparators.length; i++) { if(comparators[i] instanceof CompositeTypeComparator) { ((CompositeTypeComparator)comparators[i]).getFlatComparator(flatComparators); } else { flatComparators.add(comparators[i]); } } }
Example #5
Source File: PojoComparator.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
@SuppressWarnings({ "rawtypes", "unchecked" }) @Override public void getFlatComparator(List<TypeComparator> flatComparators) { for(int i = 0; i < comparators.length; i++) { if(comparators[i] instanceof CompositeTypeComparator) { ((CompositeTypeComparator)comparators[i]).getFlatComparator(flatComparators); } else { flatComparators.add(comparators[i]); } } }
Example #6
Source File: TupleComparatorBase.java From flink with Apache License 2.0 | 5 votes |
@SuppressWarnings({ "rawtypes", "unchecked" }) @Override public void getFlatComparator(List<TypeComparator> flatComparators) { for(int i = 0; i < comparators.length; i++) { if(comparators[i] instanceof CompositeTypeComparator) { ((CompositeTypeComparator)comparators[i]).getFlatComparator(flatComparators); } else { flatComparators.add(comparators[i]); } } }
Example #7
Source File: PojoComparator.java From flink with Apache License 2.0 | 5 votes |
@SuppressWarnings({ "rawtypes", "unchecked" }) @Override public void getFlatComparator(List<TypeComparator> flatComparators) { for(int i = 0; i < comparators.length; i++) { if(comparators[i] instanceof CompositeTypeComparator) { ((CompositeTypeComparator)comparators[i]).getFlatComparator(flatComparators); } else { flatComparators.add(comparators[i]); } } }
Example #8
Source File: TupleComparatorBase.java From flink with Apache License 2.0 | 5 votes |
@SuppressWarnings({ "rawtypes", "unchecked" }) @Override public void getFlatComparator(List<TypeComparator> flatComparators) { for(int i = 0; i < comparators.length; i++) { if(comparators[i] instanceof CompositeTypeComparator) { ((CompositeTypeComparator)comparators[i]).getFlatComparator(flatComparators); } else { flatComparators.add(comparators[i]); } } }
Example #9
Source File: PojoComparator.java From flink with Apache License 2.0 | 5 votes |
@SuppressWarnings({ "rawtypes", "unchecked" }) @Override public void getFlatComparator(List<TypeComparator> flatComparators) { for(int i = 0; i < comparators.length; i++) { if(comparators[i] instanceof CompositeTypeComparator) { ((CompositeTypeComparator)comparators[i]).getFlatComparator(flatComparators); } else { flatComparators.add(comparators[i]); } } }