[
https://issues.apache.org/jira/browse/NIFI-12828?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17822280#comment-17822280
]
ASF subversion and git services commented on NIFI-12828:
--------------------------------------------------------
Commit 8346bd7d0f617f73660cc79a02798ddbe484606d in nifi's branch
refs/heads/main from ravisingh
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=8346bd7d0f ]
NIFI-12828: Added Mapping for BIT type to return INT and handled boolean case
for postgres
Signed-off-by: Matt Burgess <[email protected]>
This closes #8445
> DatabaseTableSchemaRegistry improvement to handle BIT/Boolean Type
> ---------------------------------------------------------------------
>
> Key: NIFI-12828
> URL: https://issues.apache.org/jira/browse/NIFI-12828
> Project: Apache NiFi
> Issue Type: Improvement
> Affects Versions: 1.25.0
> Reporter: RAVINARAYAN SINGH
> Assignee: RAVINARAYAN SINGH
> Priority: Major
> Labels: controller_services
> Time Spent: 2h
> Remaining Estimate: 0h
>
> The issue stems from the fact that for the PostgreSQL JDBC driver, the
> Boolean type is mapped to {{{}java.sql.Types.BIT{}}}, not {{{}BOOLEAN{}}}.
> This causes the line {{columnResultSet.getInt("DATA_TYPE")}} to return -7,
> which corresponds to {{{}BIT{}}}, and
> {{DataTypeUtils.getDataTypeFromSQLTypeValue(dataType)}} to return
> {{{}null{}}}, leading to a null pointer exception.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)