From d4ec52f73256ce4b47f902106789e9aa1c79746a Mon Sep 17 00:00:00 2001 From: Nikita Mikhailov Date: Wed, 30 Dec 2020 18:21:58 +0300 Subject: [PATCH] shellchek --- src/Formats/FormatFactory.h | 4 ++-- src/Processors/Formats/Impl/ParallelParsingInputFormat.cpp | 2 +- src/Processors/Formats/Impl/ParallelParsingInputFormat.h | 2 +- .../1_stateful/00159_parallel_formatting_csv_and_friends.sh | 1 + tests/queries/1_stateful/00159_parallel_formatting_http.sh | 1 + .../1_stateful/00159_parallel_formatting_json_and_friends.sh | 1 + .../1_stateful/00159_parallel_formatting_tsv_and_friends.sh | 1 + 7 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/Formats/FormatFactory.h b/src/Formats/FormatFactory.h index c4d14cc930c..4fa7e9a0c01 100644 --- a/src/Formats/FormatFactory.h +++ b/src/Formats/FormatFactory.h @@ -117,12 +117,12 @@ public: const std::optional & format_settings = std::nullopt) const; /// Checks all preconditions. Returns ordinary stream if parallel formatting cannot be done. - /// Currenly used only in Client. Don't use it something else! Better look at getOutputFormatParallelIfPossible. + /// Currently used only in Client. Don't use it something else! Better look at getOutputFormatParallelIfPossible. BlockOutputStreamPtr getOutputStreamParallelIfPossible(const String & name, WriteBuffer & buf, const Block & sample, const Context & context, WriteCallback callback = {}, const std::optional & format_settings = std::nullopt) const; - /// Currenly used only in Client. Don't use it something else! Better look at getOutputFormat. + /// Currently used only in Client. Don't use it something else! Better look at getOutputFormat. BlockOutputStreamPtr getOutputStream(const String & name, WriteBuffer & buf, const Block & sample, const Context & context, WriteCallback callback = {}, const std::optional & format_settings = std::nullopt) const; diff --git a/src/Processors/Formats/Impl/ParallelParsingInputFormat.cpp b/src/Processors/Formats/Impl/ParallelParsingInputFormat.cpp index 57a0508e31a..932e5304bbd 100644 --- a/src/Processors/Formats/Impl/ParallelParsingInputFormat.cpp +++ b/src/Processors/Formats/Impl/ParallelParsingInputFormat.cpp @@ -90,7 +90,7 @@ void ParallelParsingInputFormat::parserThreadFunction(ThreadGroupStatusPtr threa unit.chunk_ext.block_missing_values.clear(); // We don't know how many blocks will be. So we have to read them all - // until an empty block occured. + // until an empty block occurred. Chunk chunk; while (!parsing_finished && (chunk = parser.getChunk()) != Chunk()) { diff --git a/src/Processors/Formats/Impl/ParallelParsingInputFormat.h b/src/Processors/Formats/Impl/ParallelParsingInputFormat.h index 802f05b3d8b..9dda2dfe55d 100644 --- a/src/Processors/Formats/Impl/ParallelParsingInputFormat.h +++ b/src/Processors/Formats/Impl/ParallelParsingInputFormat.h @@ -125,7 +125,7 @@ protected: /* * The format parsers themselves are not being cancelled here, so we'll * have to wait until they process the current block. Given that the - * chunk size is on the order of megabytes, this should't be too long. + * chunk size is on the order of megabytes, this shouldn't be too long. * We can't call IInputFormat->cancel here, because the parser object is * local to the parser thread, and we don't want to introduce any * synchronization between parser threads and the other threads to get diff --git a/tests/queries/1_stateful/00159_parallel_formatting_csv_and_friends.sh b/tests/queries/1_stateful/00159_parallel_formatting_csv_and_friends.sh index 6296d722a97..dc14928afa6 100755 --- a/tests/queries/1_stateful/00159_parallel_formatting_csv_and_friends.sh +++ b/tests/queries/1_stateful/00159_parallel_formatting_csv_and_friends.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +# shellcheck source=../shell_config.sh . "$CURDIR"/../shell_config.sh FORMATS=('CSV' 'CSVWithNames') diff --git a/tests/queries/1_stateful/00159_parallel_formatting_http.sh b/tests/queries/1_stateful/00159_parallel_formatting_http.sh index 4c5fb1f066f..8fd8c15b7c7 100755 --- a/tests/queries/1_stateful/00159_parallel_formatting_http.sh +++ b/tests/queries/1_stateful/00159_parallel_formatting_http.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +# shellcheck source=../shell_config.sh . "$CURDIR"/../shell_config.sh diff --git a/tests/queries/1_stateful/00159_parallel_formatting_json_and_friends.sh b/tests/queries/1_stateful/00159_parallel_formatting_json_and_friends.sh index 64a7b83fb86..e02515d5c16 100755 --- a/tests/queries/1_stateful/00159_parallel_formatting_json_and_friends.sh +++ b/tests/queries/1_stateful/00159_parallel_formatting_json_and_friends.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +# shellcheck source=../shell_config.sh . "$CURDIR"/../shell_config.sh diff --git a/tests/queries/1_stateful/00159_parallel_formatting_tsv_and_friends.sh b/tests/queries/1_stateful/00159_parallel_formatting_tsv_and_friends.sh index afdda8d1453..a81dfdc33b4 100755 --- a/tests/queries/1_stateful/00159_parallel_formatting_tsv_and_friends.sh +++ b/tests/queries/1_stateful/00159_parallel_formatting_tsv_and_friends.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +# shellcheck source=../shell_config.sh . "$CURDIR"/../shell_config.sh