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

Add support for absolute format schema paths. #4158

Conversation

vitlibar
Copy link
Member

@vitlibar vitlibar commented Jan 26, 2019

I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en

This PR adds support for absolute paths to format schema file, for example:

SELECT * from table FORMAT Protobuf SETTINGS format_schema='/home/user/work/ClickHouse/dbms/tests/queries/0_stateless/00825_protobuf_format:Person'

Absolute paths are only allowed on client, server throws an exception if it receives from client an absolute path like this.

@vitlibar vitlibar force-pushed the add-support-for-absolute-format-schema-paths branch from f9c0074 to 7f42775 Compare January 26, 2019 15:23
SELECT 'SYNTAX2->';
SELECT * FROM test.table ORDER BY name FORMAT Protobuf SETTINGS format_schema = '00825_protobuf_format_syntax2_copy:Syntax2Person';
SELECT * FROM test.table ORDER BY name FORMAT Protobuf SETTINGS format_schema = '$CURDIR/00825_protobuf_format_syntax2:Syntax2Person';
Copy link
Member Author

@vitlibar vitlibar Jan 26, 2019

Choose a reason for hiding this comment

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

The improvement suggested in this PR allows to simplify this test. Now it's not necessary to copy schema files to the current directory.

@vitlibar vitlibar force-pushed the add-support-for-absolute-format-schema-paths branch from 7f42775 to e9721c9 Compare January 27, 2019 09:15
@alexey-milovidov alexey-milovidov merged commit ba8fcfd into ClickHouse:master Jan 27, 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.

2 participants