org.apache.flink.table.typeutils.TypeCheckUtils Java Examples
The following examples show how to use
org.apache.flink.table.typeutils.TypeCheckUtils.
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: ElasticsearchUpsertTableSinkBase.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
/** * Validate the types that are used for conversion to string. */ private void validateKeyTypes(int[] keyFieldIndices) { final TypeInformation<?>[] types = getFieldTypes(); for (int keyFieldIndex : keyFieldIndices) { final TypeInformation<?> type = types[keyFieldIndex]; if (!TypeCheckUtils.isSimpleStringRepresentation(type)) { throw new ValidationException( "Only simple types that can be safely converted into a string representation " + "can be used as keys. But was: " + type); } } }
Example #2
Source File: ElasticsearchUpsertTableSinkBase.java From flink with Apache License 2.0 | 5 votes |
/** * Validate the types that are used for conversion to string. */ private void validateKeyTypes(int[] keyFieldIndices) { final TypeInformation<?>[] types = getFieldTypes(); for (int keyFieldIndex : keyFieldIndices) { final TypeInformation<?> type = types[keyFieldIndex]; if (!TypeCheckUtils.isSimpleStringRepresentation(type)) { throw new ValidationException( "Only simple types that can be safely converted into a string representation " + "can be used as keys. But was: " + type); } } }
Example #3
Source File: Elasticsearch6TableSink.java From alchemy with Apache License 2.0 | 5 votes |
/** * Validate the types that are used for conversion to string. */ private void validateKeyTypes(int[] keyFieldIndices) { final TypeInformation<?>[] types = getFieldTypes(); for (int keyFieldIndex : keyFieldIndices) { final TypeInformation<?> type = types[keyFieldIndex]; if (!TypeCheckUtils.isSimpleStringRepresentation(type)) { throw new ValidationException( "Only simple types that can be safely converted into a string representation " + "can be used as keys. But was: " + type); } } }
Example #4
Source File: ElasticsearchUpsertTableSinkBase.java From flink with Apache License 2.0 | 5 votes |
/** * Validate the types that are used for conversion to string. */ private void validateKeyTypes(int[] keyFieldIndices) { final TypeInformation<?>[] types = getFieldTypes(); for (int keyFieldIndex : keyFieldIndices) { final TypeInformation<?> type = types[keyFieldIndex]; if (!TypeCheckUtils.isSimpleStringRepresentation(type)) { throw new ValidationException( "Only simple types that can be safely converted into a string representation " + "can be used as keys. But was: " + type); } } }