Hi Team,
I am trying to implement a storage plugin for my database (it supports
Postgres JDBC driver) and can store compound objects.
I am able to parse primary objects in my RecordReader, but for object types:
I create Copier of ObjectVector type, and have overridden it's copy method:
private class JavaObjectCopier extends Copier<ObjectVector.Mutator> {
public JavaObjectCopier(int columnIndex, ResultSet result, Mutator mutator)
{
super(columnIndex, result, mutator);
}
@Override
void copy(int index) throws SQLException {
*// this object is of type java.util.HashMap*
*Object object = result.getObject(columnIndex);*
}
The mutator.setSafe method accepts a long value or an object holder,
so i am trying to set my object into the holder's obj field, and passing
the holder to the method.
I also tried calling the set method directly, and other brute-force ways,
but it throws exception:
> Caused by: java.lang.UnsupportedOperationException: ObjectVector does not
> support this
> at
> org.apache.drill.exec.vector.ObjectVector.makeTransferPair(ObjectVector.java:159)
> ~[vector-1.11.0.jar:1.11.0]
> at org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.
> setupNewSchema(ProjectRecordBatch.java:441) ~[drill-java-exec-1.11.0.jar:
> 1.11.0]
Can anybody please point out if am missing anything?
Thanks,
Charuta