Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TSV parser / Type inference error #42206

Closed
den-crane opened this issue Oct 9, 2022 · 1 comment · Fixed by #41912
Closed

TSV parser / Type inference error #42206

den-crane opened this issue Oct 9, 2022 · 1 comment · Fixed by #41912
Assignees

Comments

@den-crane
Copy link
Contributor

The doc has an example:

It worked in 22.3

22.3.9.19

CREATE TABLE hits_UserID_URL
(
    `UserID` UInt32,
    `URL` String,
    `EventTime` DateTime
)
ENGINE = MergeTree
PRIMARY KEY (UserID, URL)
ORDER BY (UserID, URL, EventTime)
SETTINGS index_granularity = 8192, index_granularity_bytes = 0

0 rows in set. Elapsed: 0.010 sec.

INSERT INTO hits_UserID_URL SELECT
   intHash32(c11::UInt64) AS UserID,
   c15 AS URL,
   c5 AS EventTime
FROM url('https://datasets.clickhouse.com/hits/tsv/hits_v1.tsv.xz')
WHERE URL != '';

0 rows in set. Elapsed: 117.553 sec. Processed 8.87 million rows, 18.40 GB (75.49 thousand rows/s., 156.56 MB/s.)
22.9.2.7

Received exception from server (version 22.9.2):
Code: 27. DB::Exception: Received from localhost:9000. DB::ParsingException. DB::ParsingException: Cannot parse input: expected '\t' before: 'c��m���\t115\t2668037917139250981\t0\t227\t105\thttp://yandsearch[filter=user_page=http://book-nika/nyurttunian/haberlandsearch&text=all&user_page-148564b4080_1280x1':
Row 4377756:....

Row 4377757:
Column 0,   name: c1,   type: Nullable(DateTime64(9)),  parsed text: "8484166349348046735"
Column 1,   name: c2,   type: Nullable(Int64),          parsed text: "1"
Column 2,   name: c3,   type: Nullable(String),         parsed text: "Почта Mail.ru - Почта Mail.Ru | Spor,Magazin,Haberler, Oyun, Video moda.ru"
Column 3,   name: c4,   type: Nullable(Int64),          parsed text: "1"
Column 4,   name: c5,   type: Nullable(DateTime64(9)),  parsed text: "2014-03-17 21:33:13"
Column 5,   name: c6,   type: Nullable(Date),           parsed text: "2014-03-17"
Column 6,   name: c7,   type: Nullable(String),         parsed text: "31440846"
Column 7,   name: c8,   type: Nullable(DateTime64(9)),  parsed text: "0<TAB>��:�[�<0x03>U"
ERROR: garbage after Nullable(DateTime64(9)): "c��m���<0x1A><TAB>1"

: While executing TabSeparatedRowInputFormat: While executing URL: (in file/uri https://datasets.clickhouse.com/hits/tsv/hits_v1.tsv.xz): (at row 4377757)
. (CANNOT_PARSE_INPUT_ASSERTION_FAILED)

https://fiddle.clickhouse.com/6643525b-a81f-43f9-a30c-174b5a555613

@den-crane den-crane changed the title TSV parser error TSV parser / Type inference error Oct 9, 2022
@Avogar
Copy link
Member

Avogar commented Oct 10, 2022

It's known problem, will be fixed in #41912

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants