Skip to content

Commit

Permalink
NIFI-10057: Add support for SQL Server's DATETIMEOFFSET type to Execu…
Browse files Browse the repository at this point in the history
…teSQL processors

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

This closes #6080.
  • Loading branch information
mattyb149 authored and pvillard31 committed Jun 3, 2022
1 parent 4c2fc21 commit 639ab32
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,7 @@ private static RecordFieldType getFieldType(final int sqlType, final String valu
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);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,7 @@ public static Schema createSchema(final ResultSet rs, AvroConversionOptions opti
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()))
Expand Down

0 comments on commit 639ab32

Please sign in to comment.