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

Added RowBinaryWithNamesAndTypes format #4200

Merged
merged 4 commits into from
Feb 11, 2019
Merged

Added RowBinaryWithNamesAndTypes format #4200

merged 4 commits into from
Feb 11, 2019

Conversation

DarkWanderer
Copy link
Contributor

@DarkWanderer DarkWanderer commented Jan 30, 2019

  • Extended BinaryRowOutputStream and BinaryRowInputStream with flags allowing to output names/types of columns
  • Added new input/output format - RowBinaryWithNamesAndTypes
  • Updated docs

Category: New Feature
Short description: Added new input/output format: RowBinaryWithNamesAndTypes

* Extended BinaryRowOutputStream with flags allowing to output names/types of columns
* Added one (for now) new output format - RowBinaryWithNamesAndTypes
* Updated docs
Copy link
Member

@alexey-milovidov alexey-milovidov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@alexey-milovidov
Copy link
Member

Missing test.
We can create a test (in dbms/tests/queries directory) to just ensure that the format exists and the output is as expected.

Copy link
Member

@alexey-milovidov alexey-milovidov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's also implement input format.
It will be useful for table dumps, that can be loaded back and parsed by separate tools.

@alexey-milovidov
Copy link
Member

This PR fixes #929

@DarkWanderer
Copy link
Contributor Author

Added input format support + test for output format.

TODO: test for input format

@filimonov
Copy link
Contributor

filimonov commented Feb 5, 2019

BTW: if there some chance to wrap AggregateFunction states somehow in RowBinary? For example - add LEB128-encoded length prefix before the value, just to be able to skip that column if it comes in the output.

If it will be added just for new format ( RowBinaryWithNamesAndTypes ) then no backward compatibility issues will appear.

That will make possible to do the roundtrip of RowBinary, and to build clients which can pass AggregateFunction states back and forward safely.

@alexey-milovidov
Copy link
Member

BTW: if there some chance to wrap AggregateFunction states somehow in RowBinary? For example - add LEB128-encoded length prefix before the value, just to be able to skip that column if it comes in the output.

If it will be added just for new format ( RowBinaryWithNamesAndTypes ) then no backward compatibility issues will appear.

That will make possible to do the roundtrip of RowBinary, and to build clients which can pass AggregateFunction states back and forward safely.

Better don't do it to avoid confusion with RowBinary format. Also note that writing LEB128 prefix requires extra copy. We've almost finished development of Protobuf format that allows to read and write AggregateFunctions as bytes.

@alexey-milovidov
Copy link
Member

Input format reminds me the weird issue #3469 that should be fixed first.

@alexey-milovidov alexey-milovidov merged commit f58e0c7 into ClickHouse:master Feb 11, 2019
alexey-milovidov added a commit that referenced this pull request Feb 11, 2019
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.

3 participants