mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Also fix 'Input initializer is not set' in another query
This commit is contained in:
parent
e19bf218f6
commit
9cf7247bcc
@ -121,8 +121,7 @@ StoragePtr InterpreterInsertQuery::getTable(ASTInsertQuery & query)
|
||||
|
||||
if (current_context->getSettingsRef()[Setting::allow_experimental_analyzer])
|
||||
{
|
||||
InterpreterSelectQueryAnalyzer interpreter_select(query.select, current_context, select_query_options);
|
||||
header_block = interpreter_select.getSampleBlock();
|
||||
header_block = InterpreterSelectQueryAnalyzer::getSampleBlock(query.select, current_context, select_query_options);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -7,3 +7,5 @@ foo
|
||||
bar
|
||||
# defaults
|
||||
bam
|
||||
# inferred destination table structure
|
||||
foo
|
||||
|
@ -28,4 +28,8 @@ echo '# defaults'
|
||||
$CLICKHOUSE_LOCAL --input_format_tsv_empty_as_default=1 --engine_file_truncate_on_insert=1 -q "insert into function file('$tmp_file', 'LineAsString', 'x String') select y from input('x String, y String DEFAULT \\'bam\\'') format TSV" <<<$'foo\t'
|
||||
cat "$tmp_file"
|
||||
|
||||
echo '# inferred destination table structure'
|
||||
$CLICKHOUSE_LOCAL --engine_file_truncate_on_insert=1 -q "insert into function file('$tmp_file', 'TSV') select * from input('x String') format LineAsString" <"$tmp_input"
|
||||
cat "$tmp_file"
|
||||
|
||||
rm -f "${tmp_file:?}" "${tmp_input:?}"
|
||||
|
Loading…
Reference in New Issue
Block a user