mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 17:12:03 +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])
|
if (current_context->getSettingsRef()[Setting::allow_experimental_analyzer])
|
||||||
{
|
{
|
||||||
InterpreterSelectQueryAnalyzer interpreter_select(query.select, current_context, select_query_options);
|
header_block = InterpreterSelectQueryAnalyzer::getSampleBlock(query.select, current_context, select_query_options);
|
||||||
header_block = interpreter_select.getSampleBlock();
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -7,3 +7,5 @@ foo
|
|||||||
bar
|
bar
|
||||||
# defaults
|
# defaults
|
||||||
bam
|
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'
|
$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"
|
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:?}"
|
rm -f "${tmp_file:?}" "${tmp_input:?}"
|
||||||
|
Loading…
Reference in New Issue
Block a user