Extension to parameterized queries and correct date handling#3
Open
grundrauschen wants to merge 20 commits intonew_masterfrom
Open
Extension to parameterized queries and correct date handling#3grundrauschen wants to merge 20 commits intonew_masterfrom
grundrauschen wants to merge 20 commits intonew_masterfrom
Conversation
added 17 commits
January 27, 2021 17:24
Before the change `INSERT INTO ... SELECT ...` statements would not be matched correctly.
When selecting "NULL AS `columnname`", the column will contain only NULL for the fields and no subsequent data type.
This change adds the correct clause to resume on an empty string at the end of a data package without and unnecessary concatenation operation.
As the functionality for a variable precision is not currently implemented, the precision will be locked by the function header.
DateTime64 with different level of precision can be decoded from binary protocol.
The extractor reads in the parts of the int in the wrong order. The behaviour in `Binary.decode` is the correct one when comparing it to hand calculated examples of the LEB128 encoding. This error lead to wrong handling of strings in column names.
Add default options in a centralized place to ease extending of default options with other programmatic parameters.
DateTime objects can be encoded with different precision and space needs. To be able to use different modes in the software, an option was added to parse Elixir DateTime objects into different Clickhouse DateTime objects.
For very long queries like `CREATE` with large amounts of columns, we run into limitations of the parameter length. As it is only necessary to put the query into the URL for INSERT statements, the default is now to send them in the body. Further SHOW statements use the FORMAT statement for the configured codec.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This MR is intended to review the code and enhance code quality of the included changes.
As usage with
DESCRIBEqueries and parameters is currently not supported by Clickhouse (ClickHouse/ClickHouse#24301), I will not directly try to bring the changes upstream into Clickhousex.After DESCRIBE queries are supported, I would rearrange the changes into two different MRs, one for the parameterized queries and one for type DateTime64 to integrate into upstream Clickhousex.
Attention: This MR will never be merged into MASTER as is, as this will conflict with upstream.
The MR is only intended to get feedback and enhance the code quality.