mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-02 12:32:04 +00:00
better
This commit is contained in:
parent
138dedf2df
commit
61fdeb5897
@ -53,7 +53,6 @@ public:
|
|||||||
void resetParser() override;
|
void resetParser() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
friend class ParallelParsingInputFormat;
|
|
||||||
/** Read next row and append it to the columns.
|
/** Read next row and append it to the columns.
|
||||||
* If no more rows - return false.
|
* If no more rows - return false.
|
||||||
*/
|
*/
|
||||||
|
@ -8,8 +8,6 @@
|
|||||||
#include <DataTypes/DataTypeNothing.h>
|
#include <DataTypes/DataTypeNothing.h>
|
||||||
|
|
||||||
|
|
||||||
#include <iostream>
|
|
||||||
|
|
||||||
namespace DB
|
namespace DB
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -157,6 +155,8 @@ void CSVRowInputFormat::readPrefix()
|
|||||||
size_t num_columns = data_types.size();
|
size_t num_columns = data_types.size();
|
||||||
const auto & header = getPort().getHeader();
|
const auto & header = getPort().getHeader();
|
||||||
|
|
||||||
|
/// This is a bit of abstraction leakage, but we have almost the same code in other places.
|
||||||
|
/// Thus, we check if this InputFormat is working with the "real" beggining of the data in case of parallel parsing.
|
||||||
if (with_names && getCurrentUnitNumber() == 0)
|
if (with_names && getCurrentUnitNumber() == 0)
|
||||||
{
|
{
|
||||||
/// This CSV file has a header row with column names. Depending on the
|
/// This CSV file has a header row with column names. Depending on the
|
||||||
|
@ -136,6 +136,8 @@ void TabSeparatedRowInputFormat::readPrefix()
|
|||||||
skipBOMIfExists(in);
|
skipBOMIfExists(in);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// This is a bit of abstraction leakage, but we have almost the same code in other places.
|
||||||
|
/// Thus, we check if this InputFormat is working with the "real" beggining of the data in case of parallel parsing.
|
||||||
if (with_names && getCurrentUnitNumber() == 0)
|
if (with_names && getCurrentUnitNumber() == 0)
|
||||||
{
|
{
|
||||||
if (format_settings.with_names_use_header)
|
if (format_settings.with_names_use_header)
|
||||||
|
Loading…
Reference in New Issue
Block a user