mattyb149 commented on a change in pull request #5024:
URL: https://github.com/apache/nifi/pull/5024#discussion_r621484236
##########
File path:
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/PutDatabaseRecord.java
##########
@@ -691,15 +691,27 @@ 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);
- int sqlType = column.dataType;
+ final String fieldName =
currentRecord.getSchema().getField(currentFieldIndex).getFieldName();
+ String columnName =
normalizeColumnName(currentRecord.getSchema().getField(currentFieldIndex).getFieldName(),
settings.translateFieldNames);
Review comment:
Yeah my bad that's sloppy, I'll change it to reuse local variables for
schema, field name, and columns
--
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:
[email protected]