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

skip only not string #116

Merged
merged 8 commits into from May 28, 2021
Merged

Conversation

glebvk85
Copy link
Contributor

@glebvk85 glebvk85 commented Apr 13, 2021

Sorry, I was wrong: we can leave only one value if it is of string type, otherwise it is a separator.

@glebvk85 glebvk85 closed this Apr 13, 2021
@glebvk85 glebvk85 reopened this Apr 13, 2021
@DoubleDi
Copy link
Collaborator

Is this PR needed @glebvk85 ?

@glebvk85
Copy link
Contributor Author

Is this PR needed @glebvk85 ?

Yes, it is necessary, this is the correction of the mistake I made

@DoubleDi
Copy link
Collaborator

DoubleDi commented Apr 15, 2021

Yes, it is necessary, this is the correction of the mistake I made

And what about the other types, like FixedString(N), LowCardinality(String), Nullable(String) - what will happen with them?

@glebvk85
Copy link
Contributor Author

Yes, it is necessary, this is the correction of the mistake I made

And what about the other types, like FixedString(N), LowCardinality(String), Nullable(String) - what will happen with them?

Yes, you need to skip all types that do not convert to string

@DoubleDi
Copy link
Collaborator

All these types also use the string parser:
https://github.com/mailru/go-clickhouse/blob/master/dataparser.go#L553
And also we have Array(String), Tuple(String).
Are you sure we going the right way here?

@glebvk85
Copy link
Contributor Author

Yes, when using the tsv format, we can never separate the empty string as part of the data from the empty delimiter string. I was hoping to do it with some heuristics, but this is the wrong way. Now it is better to skip the blank line, as it was in the previous version. To solve the problem, go to the format JSONCompactEachRow https://clickhouse.tech/docs/ru/interfaces/formats/#jsoncompacteachrowwithnamesandtypes

@DoubleDi
Copy link
Collaborator

TestTextRowsEmpty test failing

@DoubleDi
Copy link
Collaborator

When does an empty delimiter string occur in the result value?

@glebvk85
Copy link
Contributor Author

When does an empty delimiter string occur in the result value?

https://clickhouse.tech/docs/en/sql-reference/statements/select/group-by/#with-totals-modifier

In TabSeparated* formats, the row comes after the main result, preceded by an empty row (after the other data).

@DoubleDi DoubleDi merged commit 6d7c56f into mailru:master May 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants