Page 2 of 2

Re: @@Rowcount

Posted: Tue Feb 13, 2018 7:13 am
by micha034
Thanks again for your help.

GET_NUM_ACCEPTED_ROWS is not supported on multi node operation.
We worked with this function when we we used WEBHDFS protocol and it was ok but this not working with 'hdfs://' protocol.

Following exception is thrown:
Caused by: com.vertica.support.exceptions.FeatureNotSupportedException: [Vertica][VJDBC](4106) ERROR: No single-source bulk loads have been executed in this session

GET_NUM_ACCEPTED_ROWS supported only with single-source bulk load operations as written in documentation.

Any additional help would be appreciated :)

Re: @@Rowcount

Posted: Tue Feb 13, 2018 9:38 am
by micha034
Ok, it was pretty "stupid"

From some reason JDBC implementation of Vertica on calls without statement returns affected rows correctly but with prepared statement returns 0;

1. No prepared statement = GOOD
int accepted = conn.executeUpdate(copyQuery); --- > return number of affected rows

2. With prepared statement = BAD
PreparedStatement copyStatement = conn.prepareStatement(copyQuery))
int accepted1 = copyStatement.executeUpdate(); --- > returns 0
int accepted2 = copyStatement.getUpdateCount(); --- > returns 0

Thanks again for help.
Hope my information helped :)

Re: @@Rowcount

Posted: Tue Mar 13, 2018 10:33 am
by micha034
New update about my issues.

While previously presented solution helped in 99% of the cases.
Now we reached the point of loading chunks of data with more than Integer.MAX_VALE of rows (8 billion actually :) ).

JDBC affected rows returns only int and JDBC "executeLargeUpdate" that was built for such cases and returns long is not support in Vertica 8.1.1 implementation.