-
Notifications
You must be signed in to change notification settings - Fork 8.3k
square brackets in JSONEachRowFormat DB::Exception: Unexpected end of data #8948
Copy link
Copy link
Closed
Labels
bugConfirmed user-visible misbehaviour in official releaseConfirmed user-visible misbehaviour in official release
Description
CH 20.2.1.2278
CREATE TABLE json_square_brackets (id UInt32, name String) ENGINE = Log;
clickhouse-client -q "SELECT '['||arrayStringConcat(arrayMap(x -> '{\"id\": 1, \"name\": \"name1\"}', range(100)), ',')||']'" > test.json
cat test.json | clickhouse-client -q "INSERT INTO json_square_brackets FORMAT JSONEachRow"
OK
clickhouse-client -q "SELECT '['||arrayStringConcat(arrayMap(x -> '{\"id\": 1, \"name\": \"name1\"}', range(1000000)), ',')||']'" > test.json
cat test.json | clickhouse-client -q "INSERT INTO json_square_brackets FORMAT JSONEachRow"
Code: 117, e.displayText() = DB::Exception: Unexpected end of data: received end of stream instead of ']'., 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) @ 0xbdaef6c in /usr/bin/clickhouse
1. DB::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) @ 0x4fe3099 in /usr/bin/clickhouse
2. ? @ 0x4ca91f0 in /usr/bin/clickhouse
3. DB::IRowInputFormat::generate() @ 0x994e179 in /usr/bin/clickhouse
4. DB::ISource::work() @ 0x92cf187 in /usr/bin/clickhouse
5. DB::InputStreamFromInputFormat::readImpl() @ 0x9293a3d in /usr/bin/clickhouse
6. DB::IBlockInputStream::read() @ 0x8b772df in /usr/bin/clickhouse
7. DB::ParallelParsingBlockInputStream::parserThreadFunction(unsigned long) @ 0x964cb32 in /usr/bin/clickhouse
8. ThreadPoolImpl<ThreadFromGlobalPool>::worker(std::__1::__list_iterator<ThreadFromGlobalPool, void*>) @ 0x501ac07 in /usr/bin/clickhouse
9. 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 @ 0x501b254 in /usr/bin/clickhouse
10. ThreadPoolImpl<std::__1::thread>::worker(std::__1::__list_iterator<std::__1::thread, void*>) @ 0x501a127 in /usr/bin/clickhouse
11. ? @ 0x50186df in /usr/bin/clickhouse
12. start_thread @ 0x7fa3 in /lib/x86_64-linux-gnu/libpthread-2.28.so
13. clone @ 0xf94cf in /lib/x86_64-linux-gnu/libc-2.28.so
(version 20.2.1.2278)
Code: 117. DB::Exception: Unexpected end of data: received end of stream instead of ']'.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugConfirmed user-visible misbehaviour in official releaseConfirmed user-visible misbehaviour in official release