Github user mattyb149 commented on a diff in the pull request:
https://github.com/apache/nifi/pull/3179#discussion_r236410267
--- Diff:
nifi-nar-bundles/nifi-hive-bundle/nifi-hive3-processors/src/main/java/org/apache/nifi/processors/hive/PutHive3QL.java
---
@@ -148,7 +148,23 @@ public void constructProcess() {
if (e instanceof SQLNonTransientException) {
return ErrorTypes.InvalidInput;
} else if (e instanceof SQLException) {
- return ErrorTypes.TemporalFailure;
+ // Use the SQLException's vendor code for guidance -- see
Hive's ErrorMsg class for details on error codes
+ int errorCode = ((SQLException) e).getErrorCode();
+ if (errorCode >= 10000 && errorCode < 20000) {
+ return ErrorTypes.InvalidInput;
+ } else if (errorCode >= 20000 && errorCode < 30000) {
+ return ErrorTypes.TemporalFailure;
--- End diff --
Good point, will change.
---