mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-19 16:20:50 +00:00
Merge 99be80b349
into f4038e3153
This commit is contained in:
commit
35f10de88a
@ -846,6 +846,7 @@ void LocalServer::addOptions(OptionsDescription & options_description)
|
||||
{
|
||||
options_description.main_description->add_options()
|
||||
("table,N", po::value<std::string>(), "name of the initial table")
|
||||
("copy", "shortcut for format conversion, equivalent to: --query 'SELECT * FROM table'")
|
||||
|
||||
/// If structure argument is omitted then initial query is not generated
|
||||
("structure,S", po::value<std::string>(), "structure of the initial table (list of column and type names)")
|
||||
@ -918,6 +919,12 @@ void LocalServer::processOptions(const OptionsDescription &, const CommandLineOp
|
||||
getClientConfiguration().setString("send_logs_level", options["send_logs_level"].as<std::string>());
|
||||
if (options.count("wait_for_suggestions_to_load"))
|
||||
getClientConfiguration().setBool("wait_for_suggestions_to_load", true);
|
||||
if (options.count("copy"))
|
||||
{
|
||||
if (!queries.empty())
|
||||
throw Exception(ErrorCodes::BAD_ARGUMENTS, "Options '--copy' and '--query' cannot be specified at the same time");
|
||||
queries.emplace_back("SELECT * FROM table");
|
||||
}
|
||||
}
|
||||
|
||||
void LocalServer::readArguments(int argc, char ** argv, Arguments & common_arguments, std::vector<Arguments> &, std::vector<Arguments> &)
|
||||
|
@ -0,0 +1 @@
|
||||
Wed Jul 01 06:29:00 +0000 2020 1278214001395216384 1278214001395216384 È SICUROOOOO? <a href="https://elenoireferruzzibot.com" rel="nofollow">BotElenoire</a> false \N \N \N \N \N (false,'Mon Nov 04 18:14:32 +0000 2019',true,false,'L’importante è averli puliti',12,NULL,1239,NULL,3,false,1191418444324966403,'1191418444324966403',false,NULL,1,NULL,'Elenoire Ferruzzi Bot',NULL,'F5F8FA','','',false,'https://pbs.twimg.com/profile_banners/1191418444324966403/1578228379','http://pbs.twimg.com/profile_images/1191422843084521472/HEy5I5g8_normal.jpg','https://pbs.twimg.com/profile_images/1191422843084521472/HEy5I5g8_normal.jpg','1DA1F2','C0DEED','DDEEF6','333333',true,false,'BotElenoire',20769,NULL,'none',NULL,NULL,false) \N \N \N \N false 0 0 0 0 ([],[],[],[]) false false low it 1593584940657
|
7
tests/queries/0_stateless/03228_clickhouse_local_copy_argument.sh
Executable file
7
tests/queries/0_stateless/03228_clickhouse_local_copy_argument.sh
Executable file
@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||
# shellcheck source=../shell_config.sh
|
||||
. "$CURDIR"/../shell_config.sh
|
||||
|
||||
${CLICKHOUSE_LOCAL} --copy < $CURDIR/data_json/twitter.jsonl
|
Loading…
Reference in New Issue
Block a user