АК
Я чего-то не понимаю, всера вы писали про create table, это был тест перед апгрейдом типа или что
Size: a a a
АК
DC
АК
АК
DC
DC
A
clickhouse 🙂 alter table impression RENAME column idfa to device;
ALTER TABLE impression
RENAME COLUMN idfa TO device
Ok.
Processing: 1594305778833703849_6045_adb72cd6-2fea-4932-b055-bc304b9ad8fe.jsonl.gz
Code: 117, e.displayText() = DB::Exception: Unknown field found while parsing JSONEachRow format: device: (at row 1)
, Stack trace (when copying this message, always include the lines below):
0. Poco::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) @ 0x10ed0da0 in /usr/bin/clickhouse
1. DB::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) @ 0x95c923d in /usr/bin/clickhouse
2. ? @ 0xe7c183b in /usr/bin/clickhouse
3. DB::JSONEachRowRowInputFormat::readJSONObject(std::__1::vector<COW<DB::IColumn>::mutable_ptr<DB::IColumn>, std::__1::allocator<COW<DB::IColumn>::mutable_ptr<DB::IColumn> > >&) @ 0xe7bf16d in /usr/bin/clickhouse
4. DB::JSONEachRowRowInputFormat::readRow(std::__1::vector<COW<DB::IColumn>::mutable_ptr<DB::IColumn>, std::__1::allocator<COW<DB::IColumn>::mutable_ptr<DB::IColumn> > >&, DB::RowReadExtension&) @ 0xe7bf636 in /usr/bin/clickhouse
5. DB::IRowInputFormat::generate() @ 0xe760041 in /usr/bin/clickhouse
6. DB::ISource::work() @ 0xe6dd3ab in /usr/bin/clickhouse
7. DB::InputStreamFromInputFormat::readImpl() @ 0xe6a4b0d in /usr/bin/clickhouse
8. DB::IBlockInputStream::read() @ 0xd999b1d in /usr/bin/clickhouse
9. DB::ParallelParsingBlockInputStream::parserThreadFunction(unsigned long) @ 0xe6a98d8 in /usr/bin/clickhouse
10. ThreadPoolImpl<ThreadFromGlobalPool>::worker(std::__1::__list_iterator<ThreadFromGlobalPool, void*>) @ 0x95f7987 in /usr/bin/clickhouse
11. ThreadFromGlobalPool::ThreadFromGlobalPool<void ThreadPoolImpl<ThreadFromGlobalPool>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>)::'lambda1'()>(void&&, void ThreadPoolImpl<ThreadFromGlobalPool>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>)::'lambda1'()&&...)::'lambda'()::operator()() const @ 0x95f80fa in /usr/bin/clickhouse
12. ThreadPoolImpl<std::__1::thread>::worker(std::__1::__list_iterator<std::__1::thread, void*>) @ 0x95f6e97 in /usr/bin/clickhouse
13. ? @ 0x95f5383 in /usr/bin/clickhouse
14. start_thread @ 0x76db in /lib/x86_64-linux-gnu/libpthread-2.27.so
15. __clone @ 0x121a3f in /lib/x86_64-linux-gnu/libc-2.27.so
(version 20.5.2.7 (official build))
zcat "$FILENAME" \
| clickhouse-client \
--user="$CLICKHOUSE_USER" \
--password="$CLICKHOUSE_PASSWORD" \
--input_format_skip_unknown_fields=1 \
--query="INSERT INTO $CLICKHOUSE_TABLE FORMAT JSONEachRow"
OG
OPTIMIZE TABLE t PARTITION 202005 FINAL DEDUPLICATE
и получаю вот такое в логах(ReplicatedMergeTreeQueue): Not executing log entry MERGE_PARTS for part 202005_0_2566_9 because source parts size (370.71 GiB) is greater than the current maximum (33.71 GiB).
…
Cannot select parts for optimization: Part 202005_0_2566_8 has already been assigned a merge into 202005_0_2566_9
АК
АК
DC
DC
A
CREATE TABLE "test"
( time DateTime,
"column1" Int32 DEFAULT 100,
"column2" String DEFAULT 'default',
"column3" Int32,
"column4" String
)
ENGINE MergeTree()
PARTITION BY toYYYYMMDD(time)
ORDER BY (time)
{
column3: 1,
column4: 'test'
}
umn1:0почему дефолтные значения не выставились для column1 и column2?
column2:""
column3:1
column4:"test"
time:"2020-07-09 15:07:28"
А
DC
OPTIMIZE TABLE t PARTITION 202005 FINAL DEDUPLICATE
и получаю вот такое в логах(ReplicatedMergeTreeQueue): Not executing log entry MERGE_PARTS for part 202005_0_2566_9 because source parts size (370.71 GiB) is greater than the current maximum (33.71 GiB).
…
Cannot select parts for optimization: Part 202005_0_2566_8 has already been assigned a merge into 202005_0_2566_9
OG
system.merges
не видноDC
clickhouse 🙂 alter table impression RENAME column idfa to device;
ALTER TABLE impression
RENAME COLUMN idfa TO device
Ok.
Processing: 1594305778833703849_6045_adb72cd6-2fea-4932-b055-bc304b9ad8fe.jsonl.gz
Code: 117, e.displayText() = DB::Exception: Unknown field found while parsing JSONEachRow format: device: (at row 1)
, Stack trace (when copying this message, always include the lines below):
0. Poco::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) @ 0x10ed0da0 in /usr/bin/clickhouse
1. DB::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) @ 0x95c923d in /usr/bin/clickhouse
2. ? @ 0xe7c183b in /usr/bin/clickhouse
3. DB::JSONEachRowRowInputFormat::readJSONObject(std::__1::vector<COW<DB::IColumn>::mutable_ptr<DB::IColumn>, std::__1::allocator<COW<DB::IColumn>::mutable_ptr<DB::IColumn> > >&) @ 0xe7bf16d in /usr/bin/clickhouse
4. DB::JSONEachRowRowInputFormat::readRow(std::__1::vector<COW<DB::IColumn>::mutable_ptr<DB::IColumn>, std::__1::allocator<COW<DB::IColumn>::mutable_ptr<DB::IColumn> > >&, DB::RowReadExtension&) @ 0xe7bf636 in /usr/bin/clickhouse
5. DB::IRowInputFormat::generate() @ 0xe760041 in /usr/bin/clickhouse
6. DB::ISource::work() @ 0xe6dd3ab in /usr/bin/clickhouse
7. DB::InputStreamFromInputFormat::readImpl() @ 0xe6a4b0d in /usr/bin/clickhouse
8. DB::IBlockInputStream::read() @ 0xd999b1d in /usr/bin/clickhouse
9. DB::ParallelParsingBlockInputStream::parserThreadFunction(unsigned long) @ 0xe6a98d8 in /usr/bin/clickhouse
10. ThreadPoolImpl<ThreadFromGlobalPool>::worker(std::__1::__list_iterator<ThreadFromGlobalPool, void*>) @ 0x95f7987 in /usr/bin/clickhouse
11. ThreadFromGlobalPool::ThreadFromGlobalPool<void ThreadPoolImpl<ThreadFromGlobalPool>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>)::'lambda1'()>(void&&, void ThreadPoolImpl<ThreadFromGlobalPool>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>)::'lambda1'()&&...)::'lambda'()::operator()() const @ 0x95f80fa in /usr/bin/clickhouse
12. ThreadPoolImpl<std::__1::thread>::worker(std::__1::__list_iterator<std::__1::thread, void*>) @ 0x95f6e97 in /usr/bin/clickhouse
13. ? @ 0x95f5383 in /usr/bin/clickhouse
14. start_thread @ 0x76db in /lib/x86_64-linux-gnu/libpthread-2.27.so
15. __clone @ 0x121a3f in /lib/x86_64-linux-gnu/libc-2.27.so
(version 20.5.2.7 (official build))
zcat "$FILENAME" \
| clickhouse-client \
--user="$CLICKHOUSE_USER" \
--password="$CLICKHOUSE_PASSWORD" \
--input_format_skip_unknown_fields=1 \
--query="INSERT INTO $CLICKHOUSE_TABLE FORMAT JSONEachRow"
OG
DC
OG
DB::Exception: Cannot select parts for optimization: Part 202005_0_2566_8 has already been assigned a merge into 202005_0_2566_9.
OG