gardellajuanpablo commented on a change in pull request #5024:
URL: https://github.com/apache/nifi/pull/5024#discussion_r618745085



##########
File path: 
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/PutDatabaseRecord.java
##########
@@ -691,14 +691,14 @@ private void executeDML(final ProcessContext context, 
final ProcessSession sessi
 
                     final Object[] values = currentRecord.getValues();
                     final List<DataType> dataTypes = 
currentRecord.getSchema().getDataTypes();
-                    List<ColumnDescription> columns = 
tableSchema.getColumnsAsList();
 
                     for (int i = 0; i < fieldIndexes.size(); i++) {
                         final int currentFieldIndex = fieldIndexes.get(i);
                         Object currentValue = values[currentFieldIndex];
                         final DataType dataType = 
dataTypes.get(currentFieldIndex);
                         final int fieldSqlType = 
DataTypeUtils.getSQLTypeValue(dataType);
-                        final ColumnDescription column = 
columns.get(currentFieldIndex);
+                        String columnName = 
normalizeColumnName(currentRecord.getSchema().getField(currentFieldIndex).getFieldName(),
 settings.translateFieldNames);

Review comment:
       Is it required NPE/IOE checks?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to