mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-21 01:00:48 +00:00
Fix style and tests
This commit is contained in:
parent
d15ff3e8d5
commit
d92490a29c
@ -260,13 +260,6 @@ namespace DB
|
||||
throw Exception{"Error while reading " + format_name + " data: " + read_status.ToString(),
|
||||
ErrorCodes::CANNOT_READ_ALL_DATA};
|
||||
|
||||
if (0 == table->num_rows())
|
||||
throw Exception{"Empty table in input data", ErrorCodes::EMPTY_DATA_PASSED};
|
||||
|
||||
if (header.columns() > static_cast<size_t>(table->num_columns()))
|
||||
// TODO: What if some columns were not presented? Insert NULLs? What if a column is not nullable?
|
||||
throw Exception{"Number of columns is less than the table has", ErrorCodes::SIZES_OF_COLUMNS_DOESNT_MATCH};
|
||||
|
||||
++row_group_current;
|
||||
|
||||
NameToColumnPtr name_to_column_ptr;
|
||||
|
@ -87,9 +87,9 @@ static std::shared_ptr<arrow::io::RandomAccessFile> as_arrow_file(ReadBuffer &
|
||||
if (auto fd_in = dynamic_cast<ReadBufferFromFileDescriptor*>(&in))
|
||||
{
|
||||
struct stat stat;
|
||||
::fstat(fd_in->getFD(), &stat);
|
||||
auto res = ::fstat(fd_in->getFD(), &stat);
|
||||
// if fd is a regular file i.e. not stdin
|
||||
if (S_ISREG(stat.st_mode))
|
||||
if (res == 0 && S_ISREG(stat.st_mode))
|
||||
{
|
||||
return std::make_shared<RandomAccessFileFromSeekableReadBuffer>(*fd_in, stat.st_size);
|
||||
}
|
||||
@ -110,10 +110,10 @@ namespace ErrorCodes
|
||||
}
|
||||
|
||||
#define THROW_ARROW_NOT_OK(status) \
|
||||
do { \
|
||||
::arrow::Status __s = (status); \
|
||||
if(!__s.ok()) \
|
||||
throw Exception(__s.ToString(), ErrorCodes::BAD_ARGUMENTS);\
|
||||
do \
|
||||
{ \
|
||||
if (::arrow::Status _s = (status); !_s.ok()) \
|
||||
throw Exception(_s.ToString(), ErrorCodes::BAD_ARGUMENTS); \
|
||||
} while (false)
|
||||
|
||||
ParquetBlockInputFormat::ParquetBlockInputFormat(ReadBuffer & in_, Block header_)
|
||||
|
@ -174,16 +174,16 @@ Code: 8. DB::Ex---tion: Column "element" is not presented in input data
|
||||
Code: 33. DB::Ex---tion: Error while reading Parquet data: NotImplemented: Reading lists of structs from Parquet files not yet supported: key_value: list<key_value: struct<key: string not null, value: struct<key_value: list<key_value: struct<key: int32 not null, value: bool not null> not null> not null>> not null> not null
|
||||
|
||||
=== Try load data from nonnullable.impala.parquet
|
||||
Code: 33. DB::Ex---tion: Error while reading Parquet data: NotImplemented: Reading lists of structs from Parquet files not yet supported: map: list<map: struct<key: string not null, value: int32 not null> not null> not null
|
||||
Code: 8. DB::Ex---tion: Column "element" is not presented in input data
|
||||
|
||||
=== Try load data from nullable.impala.parquet
|
||||
Code: 33. DB::Ex---tion: Error while reading Parquet data: NotImplemented: Reading lists of structs from Parquet files not yet supported: map: list<map: struct<key: string not null, value: int32> not null> not null
|
||||
Code: 8. DB::Ex---tion: Column "element" is not presented in input data
|
||||
|
||||
=== Try load data from nulls.snappy.parquet
|
||||
Code: 8. DB::Ex---tion: Column "b_c_int" is not presented in input data
|
||||
|
||||
=== Try load data from repeated_no_annotation.parquet
|
||||
Code: 33. DB::Ex---tion: Error while reading Parquet data: NotImplemented: Reading lists of structs from Parquet files not yet supported: phone: list<phone: struct<number: int64 not null, kind: string> not null> not null
|
||||
Code: 8. DB::Ex---tion: Column "number" is not presented in input data
|
||||
|
||||
=== Try load data from userdata1.parquet
|
||||
1454486129 1 Amanda Jordan ajordan0@com.com Female 1.197.201.2 6759521864920116 Indonesia 3/8/1971 49756.53 Internal Auditor 1E+02
|
||||
|
Loading…
Reference in New Issue
Block a user