NIFI-8392: Translate JDBC CHAR type to RecordFieldType STRING

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

This closes #5506.
This commit is contained in:
Matthew Burgess 2021-11-03 19:36:04 -04:00 committed by Pierre Villard
parent ab662434ce
commit fe4161b1c2
No known key found for this signature in database
GPG Key ID: F92A93B30C07C6D5
2 changed files with 2 additions and 2 deletions

View File

@ -455,7 +455,7 @@ public class ResultSetRecordSet implements RecordSet, Closeable {
case Types.BOOLEAN: case Types.BOOLEAN:
return RecordFieldType.BOOLEAN; return RecordFieldType.BOOLEAN;
case Types.CHAR: case Types.CHAR:
return RecordFieldType.CHAR; return RecordFieldType.STRING;
case Types.DATE: case Types.DATE:
return getRecordFieldType(RecordFieldType.DATE, useLogicalTypes); return getRecordFieldType(RecordFieldType.DATE, useLogicalTypes);
case Types.NUMERIC: case Types.NUMERIC:

View File

@ -87,7 +87,7 @@ public class ResultSetRecordSetTest {
new TestColumn(3, COLUMN_NAME_ROWID, Types.ROWID, RecordFieldType.LONG.getDataType()), new TestColumn(3, COLUMN_NAME_ROWID, Types.ROWID, RecordFieldType.LONG.getDataType()),
new TestColumn(4, COLUMN_NAME_BIT, Types.BIT, RecordFieldType.BOOLEAN.getDataType()), new TestColumn(4, COLUMN_NAME_BIT, Types.BIT, RecordFieldType.BOOLEAN.getDataType()),
new TestColumn(5, COLUMN_NAME_BOOLEAN, Types.BOOLEAN, RecordFieldType.BOOLEAN.getDataType()), new TestColumn(5, COLUMN_NAME_BOOLEAN, Types.BOOLEAN, RecordFieldType.BOOLEAN.getDataType()),
new TestColumn(6, COLUMN_NAME_CHAR, Types.CHAR, RecordFieldType.CHAR.getDataType()), new TestColumn(6, COLUMN_NAME_CHAR, Types.CHAR, RecordFieldType.STRING.getDataType()),
new TestColumn(7, COLUMN_NAME_DATE, Types.DATE, RecordFieldType.DATE.getDataType()), new TestColumn(7, COLUMN_NAME_DATE, Types.DATE, RecordFieldType.DATE.getDataType()),
new TestColumn(8, COLUMN_NAME_INTEGER, Types.INTEGER, RecordFieldType.INT.getDataType()), new TestColumn(8, COLUMN_NAME_INTEGER, Types.INTEGER, RecordFieldType.INT.getDataType()),
new TestColumn(9, COLUMN_NAME_DOUBLE, Types.DOUBLE, RecordFieldType.DOUBLE.getDataType()), new TestColumn(9, COLUMN_NAME_DOUBLE, Types.DOUBLE, RecordFieldType.DOUBLE.getDataType()),