I would agree that the condition should be changed.

On 20.09.2016 10:52, Swapnil Chougule wrote:
I checked following code in Flink JDBCOutputFormat while I was using in my project work. I found following snippet:


    @Override
    public void writeRecord(Row row) throws IOException {

if (typesArray != null && typesArray.length > 0 && typesArray.length == row.productArity()) { LOG.warn("Column SQL types array doesn't match arity of passed Row! Check the passed array...");
        }
    ...
    }

I am finding this "if" condition wrong. It should be

if (typesArray != null && typesArray.length > 0 && typesArray.length != row.productArity())

As a result, it is logging wrong warning in my logs which is incorrect. (Even if typearray matches arity of passed row)
May I have inputs on same ?

Thanks,
Swapnil

Reply via email to