Hi Experts ,
We are trying to implement the Mode function using Vertica Java SDK. We are able to compile the code successfully. It runs okay on the smaller data set less than 10,000 records successfully but it start giving the error as we run it against large dataset. The error we get is mentioned below:
2017-07-17 08:37:46.753 [Java-8499] 0x20 Vanilla exception
java.lang.IndexOutOfBoundsException
at java.nio.Buffer.checkIndex(Buffer.java:546)
at java.nio.HeapByteBuffer.getLong(HeapByteBuffer.java:416)
at com.vertica.sdk.BlockReader.getLong(BlockReader.java:73)
at com.vertica.sdk.BlockReader.isLongNull(BlockReader.java:82)
at com.vertica.JavaLibs.Mode.processPartition(Mode.java:59)
at com.vertica.udxfence.UDxExecContext.processPartitionForUDT(UDxExecContext.java:1952)
at com.vertica.udxfence.UDxExecContext.processPartition(UDxExecContext.java:1875)
at com.vertica.udxfence.UDxExecContext.run(UDxExecContext.java:295)
at java.lang.Thread.run(Thread.java:748)
2017-07-17 08:37:46.753 [Java-8499] 0x20 java.lang.IndexOutOfBoundsException
at java.nio.Buffer.checkIndex(Buffer.java:546)
at java.nio.HeapByteBuffer.getLong(HeapByteBuffer.java:416)
at com.vertica.sdk.BlockReader.getLong(BlockReader.java:73)
at com.vertica.sdk.BlockReader.isLongNull(BlockReader.java:82)
at com.vertica.JavaLibs.Mode.processPartition(Mode.java:59)
at com.vertica.udxfence.UDxExecContext.processPartitionForUDT(UDxExecContext.java:1952)
at com.vertica.udxfence.UDxExecContext.processPartition(UDxExecContext.java:1875)
at com.vertica.udxfence.UDxExecContext.run(UDxExecContext.java:295)
at java.lang.Thread.run(Thread.java:748)
I have also attached the Mode function Java source code. Any help on this will be greatly appreciated.
Thanks