NIFI-10057: Add support for SQL Server's DATETIMEOFFSET type to ExecuteSQL processors

Signed-off-by: Pierre Villard <pierre.villard.fr@gmail.com>

This closes #6080.
This commit is contained in:
Matthew Burgess 2022-05-25 16:21:40 -04:00 committed by Pierre Villard
parent 4c2fc216ab
commit 639ab328c9
No known key found for this signature in database
GPG Key ID: F92A93B30C07C6D5
2 changed files with 2 additions and 0 deletions

View File

@ -526,6 +526,7 @@ public class ResultSetRecordSet implements RecordSet, Closeable {
case Types.TIMESTAMP_WITH_TIMEZONE:
case -101: // Oracle's TIMESTAMP WITH TIME ZONE
case -102: // Oracle's TIMESTAMP WITH LOCAL TIME ZONE
case -155: // SQL Server's DATETIMEOFFSET
return getRecordFieldType(TIMESTAMP, useLogicalTypes);
}

View File

@ -635,6 +635,7 @@ public class JdbcCommon {
case TIMESTAMP_WITH_TIMEZONE:
case -101: // Oracle's TIMESTAMP WITH TIME ZONE
case -102: // Oracle's TIMESTAMP WITH LOCAL TIME ZONE
case -155: // SQL Server's DATETIMEOFFSET
addNullableField(builder, columnName,
u -> options.useLogicalTypes
? u.type(LogicalTypes.timestampMillis().addToSchema(SchemaBuilder.builder().longType()))