@@ -158,6 +158,9 @@ static Process startProcess(ClickHouseNode server, ClickHouseRequest<?> request)
158
158
containerDir = hostDir ;
159
159
}
160
160
161
+ if (config .isSsl ()) {
162
+ commands .add ("--secure" );
163
+ }
161
164
commands .add ("--compression=" .concat (config .isResponseCompressed () ? "1" : "0" ));
162
165
commands .add ("--host=" .concat (server .getHost ()));
163
166
commands .add ("--port=" .concat (Integer .toString (server .getPort ())));
@@ -166,11 +169,10 @@ static Process startProcess(ClickHouseNode server, ClickHouseRequest<?> request)
166
169
if (!ClickHouseChecker .isNullOrBlank (str )) {
167
170
commands .add ("--database=" .concat (str ));
168
171
}
169
- if ((boolean ) config .getOption (ClickHouseCommandLineOption .USE_CLI_CONFIG )) {
170
- str = (String ) config .getOption (ClickHouseCommandLineOption .CLI_CONFIG_FILE );
171
- if (Files .exists (Paths .get (str ))) {
172
- commands .add ("--config-file=" .concat (str ));
173
- }
172
+ str = (String ) config .getOption (ClickHouseCommandLineOption .CLI_CONFIG_FILE );
173
+ if ((boolean ) config .getOption (ClickHouseCommandLineOption .USE_CLI_CONFIG )
174
+ && !ClickHouseChecker .isNullOrBlank (str ) && Files .exists (Paths .get (str ))) {
175
+ commands .add ("--config-file=" .concat (str ));
174
176
} else {
175
177
ClickHouseCredentials credentials = server .getCredentials (config );
176
178
str = credentials .getUserName ();
@@ -184,8 +186,11 @@ static Process startProcess(ClickHouseNode server, ClickHouseRequest<?> request)
184
186
}
185
187
commands .add ("--format=" .concat (config .getFormat ().name ()));
186
188
187
- str = request .getStatements (false ).get (0 );
188
- commands .add ("--query=" .concat (str ));
189
+ str = request .getQueryId ().orElse ("" );
190
+ if (!ClickHouseChecker .isNullOrBlank (str )) {
191
+ commands .add ("--query_id=" .concat (str ));
192
+ }
193
+ commands .add ("--query=" .concat (request .getStatements (false ).get (0 )));
189
194
190
195
for (ClickHouseExternalTable table : request .getExternalTables ()) {
191
196
ClickHouseFile tableFile = table .getFile ();
0 commit comments