shellchek

This commit is contained in:
Nikita Mikhailov 2020-12-30 18:21:58 +03:00
parent b94a654715
commit d4ec52f732
7 changed files with 8 additions and 4 deletions

View File

@ -117,12 +117,12 @@ public:
const std::optional<FormatSettings> & format_settings = std::nullopt) const; const std::optional<FormatSettings> & format_settings = std::nullopt) const;
/// Checks all preconditions. Returns ordinary stream if parallel formatting cannot be done. /// 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, BlockOutputStreamPtr getOutputStreamParallelIfPossible(const String & name, WriteBuffer & buf,
const Block & sample, const Context & context, WriteCallback callback = {}, const Block & sample, const Context & context, WriteCallback callback = {},
const std::optional<FormatSettings> & format_settings = std::nullopt) const; const std::optional<FormatSettings> & 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, BlockOutputStreamPtr getOutputStream(const String & name, WriteBuffer & buf,
const Block & sample, const Context & context, WriteCallback callback = {}, const Block & sample, const Context & context, WriteCallback callback = {},
const std::optional<FormatSettings> & format_settings = std::nullopt) const; const std::optional<FormatSettings> & format_settings = std::nullopt) const;

View File

@ -90,7 +90,7 @@ void ParallelParsingInputFormat::parserThreadFunction(ThreadGroupStatusPtr threa
unit.chunk_ext.block_missing_values.clear(); unit.chunk_ext.block_missing_values.clear();
// We don't know how many blocks will be. So we have to read them all // 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; Chunk chunk;
while (!parsing_finished && (chunk = parser.getChunk()) != Chunk()) while (!parsing_finished && (chunk = parser.getChunk()) != Chunk())
{ {

View File

@ -125,7 +125,7 @@ protected:
/* /*
* The format parsers themselves are not being cancelled here, so we'll * The format parsers themselves are not being cancelled here, so we'll
* have to wait until they process the current block. Given that the * 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 * 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 * local to the parser thread, and we don't want to introduce any
* synchronization between parser threads and the other threads to get * synchronization between parser threads and the other threads to get

View File

@ -1,6 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# shellcheck source=../shell_config.sh
. "$CURDIR"/../shell_config.sh . "$CURDIR"/../shell_config.sh
FORMATS=('CSV' 'CSVWithNames') FORMATS=('CSV' 'CSVWithNames')

View File

@ -1,6 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# shellcheck source=../shell_config.sh
. "$CURDIR"/../shell_config.sh . "$CURDIR"/../shell_config.sh

View File

@ -1,6 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# shellcheck source=../shell_config.sh
. "$CURDIR"/../shell_config.sh . "$CURDIR"/../shell_config.sh

View File

@ -1,6 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# shellcheck source=../shell_config.sh
. "$CURDIR"/../shell_config.sh . "$CURDIR"/../shell_config.sh