arina-ielchiieva commented on a change in pull request #1690: DRILL-7086:
Output schema for row set mechanism
URL: https://github.com/apache/drill/pull/1690#discussion_r264678533
##########
File path:
exec/vector/src/main/java/org/apache/drill/exec/vector/accessor/convert/AbstractWriteConverter.java
##########
@@ -38,12 +41,38 @@
public class AbstractWriteConverter extends AbstractScalarWriter {
- private final ScalarWriter baseWriter;
+ public static class SimpleWriterConverterFactory implements
ColumnConversionFactory {
+ private Constructor<? extends AbstractWriteConverter> ctor;
+
+ SimpleWriterConverterFactory(Class<? extends AbstractWriteConverter>
conversionClass) {
+ try {
+ ctor = conversionClass.getDeclaredConstructor(ScalarWriter.class);
+ } catch (NoSuchMethodException | SecurityException e) {
+ throw new IllegalStateException(e);
+ }
+ }
+
+ @Override
+ public AbstractWriteConverter newWriter(ScalarWriter baseWriter) {
+ try {
+ return ctor.newInstance(baseWriter);
+ } catch (InstantiationException | IllegalAccessException
Review comment:
```suggestion
} catch (ReflectiveOperationException e) {
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services