gianm commented on a change in pull request #8067: sql firehose and firehose 
doc adjustments
URL: https://github.com/apache/incubator-druid/pull/8067#discussion_r307529407
 
 

 ##########
 File path: core/src/main/java/org/apache/druid/data/input/impl/SqlFirehose.java
 ##########
 @@ -35,18 +34,18 @@
 public class SqlFirehose implements Firehose
 {
   private final Iterator<JsonIterator<Map<String, Object>>> resultIterator;
-  private final InputRowParser parser;
+  private final MapInputRowParser parser;
   private final Closeable closer;
   private JsonIterator<Map<String, Object>> lineIterator = null;
 
   public SqlFirehose(
-      Iterator lineIterators,
-      InputRowParser<Map<String, Object>> parser,
+      Iterator<JsonIterator<Map<String, Object>>> lineIterators,
+      InputRowParser parser,
       Closeable closer
   )
   {
     this.resultIterator = lineIterators;
-    this.parser = parser;
+    this.parser = new MapInputRowParser(parser.getParseSpec());
 
 Review comment:
   I think you'll need to extract the TransformSpec from the parser (using 
`TransformSpec.fromInputRowParser`) for transforms to work properly. Could you 
please look into this and add a test if there isn't one?

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org

Reply via email to