Just wanted to check with the group before filing a Jira, but it appears
there is some code needed in the implementation of DrillColumnMetaDataList.
It extends BasicList which throws a number of UnsupportedOperationExceptions
for basic List interface methods, but DrillColumnMetaDataList is not
overriding them. The one I ran into first is iterator(), which is being
called in findColumn0() of AvaticaResultSet (called in turn by the public
JDBC API method findColumn(name)):

https://github.com/julianhyde/optiq/blob/master/avatica/src/main/java/net/hy
dromatic/avatica/AvaticaResultSet.java#L68

Calling findColumn() from the JDBC API results in an
UnsupportedOperationException. I suspect iterator() was not implemented in
BaseList to allow subclasses to define their own method of iteration.

I suppose a case could be made to add a default implementation, but I can
also see where one should not rely on such an implementation for a subclass,
and instead should provide its own. However, in that case, shouldn't the
List interface methods remain abstract, rather than having a default
implementation that throws an exception at runtime?

Regards,
Matt



Reply via email to