2
2
3
3
import java .sql .SQLException ;
4
4
import java .util .Arrays ;
5
- import java .util .Collections ;
6
5
import java .util .LinkedHashMap ;
7
6
import java .util .List ;
8
7
import java .util .Map ;
@@ -50,12 +49,13 @@ class Implementor {
50
49
private final ImmutablePairList <Integer , String > targetFields ;
51
50
private final Map <String , String > hints ;
52
51
private RelNode query ;
53
- private Sink sink = new Sink ( "PIPELINE" , Arrays . asList ( "PIPELINE" , "SINK" ), Collections . emptyMap ()) ;
52
+ private Sink sink ;
54
53
private RelDataType sinkRowType = null ;
55
54
56
55
public Implementor (ImmutablePairList <Integer , String > targetFields , Map <String , String > hints ) {
57
56
this .targetFields = targetFields ;
58
57
this .hints = hints ;
58
+ this .sink = new Sink ("PIPELINE" , Arrays .asList ("PIPELINE" , "SINK" ), hints );
59
59
}
60
60
61
61
public void visit (RelNode node ) throws SQLException {
@@ -75,7 +75,9 @@ public void visit(RelNode node) throws SQLException {
75
75
* a connector. The connector is configured via `CREATE TABLE...WITH(...)`.
76
76
*/
77
77
public void addSource (String database , List <String > path , RelDataType rowType , Map <String , String > options ) {
78
- sources .put (new Source (database , path , addKeysAsOption (options , rowType )), rowType );
78
+ Map <String , String > newOptions = addKeysAsOption (options , rowType );
79
+ newOptions .putAll (this .hints );
80
+ sources .put (new Source (database , path , newOptions ), rowType );
79
81
}
80
82
81
83
/**
0 commit comments