Commit Graph

9 Commits

Author SHA1 Message Date
Veloman Yunkan
3e96f32833 Fixed the bug introduced by PR#3144
The pre-existing optimization in the function
JSONEachRowRowInputStream::readColumnName() (that was extracted
during the refactoring step of PR#3144) imposed a restriction
on its usage - reading from the input stream might invalidate the return
value of that function, and this is what happenned in readJSONObject()
after the call to skipColonDelimiter().

One way of fixing the problem while preserving the original optimization
intact would be to defer the call to skipColonDelimiter() until the
variable name_ref was fully consumed, however that would result in worse
code (skipColonDelimiter() would need to be called in three different
places where it doesn't really belong).

Therefore I preferred to slightly weaken the optimization by always
copying the key name into the current_column_name data member.
2018-09-26 11:27:04 +00:00
Alexey Milovidov
46ef387ce3 Style #3144 2018-09-17 23:35:21 +03:00
Veloman Yunkan
5fe127e4c3 Added --input_format_import_nested_json option
By default mapping of nested json data to nested tables is disabled. To
enable the import of nested json data (into corresponding nested tables)
clickhouse must be run with the --input_format_import_nested_json=1
option.
2018-09-14 13:43:57 +00:00
Veloman Yunkan
47eb0e28b3 Nested JSON data is mapped to nested table data 2018-09-14 12:15:32 +00:00
Veloman Yunkan
8d427dd09d Extracted JSONEachRowRowInputStream::readJSONObject
Also changed the names of previously extracted functions to camel case.
2018-09-14 10:47:26 +00:00
Veloman Yunkan
4cf2cd9586 Some more refactoring 2018-09-14 08:27:49 +00:00
Veloman Yunkan
270f13fe99 Some refactoring 2018-09-14 07:28:49 +00:00
BlahGeek
739119d355 skip object fields on json input 2018-08-27 12:01:47 +08:00
alexey-milovidov
fafecb3c25
Better modularity of formats. (#2492)
* Formats: better modularity (development) #2447

* Formats: better modularity (development) #2447

* Formats: better modularity (development) #2447

* Formats: better modularity (development) #2447

* Formats: better modularity (development) #2447

* Formats: better modularity (development): removed very old tests #2447

* Formats: better modularity (development) #2447

* Formats: better modularity (development) #2447

* Formats: better modularity (development) #2447

* Formats: better modularity (development) #2447

* Formats: better modularity (development) #2447

* Formats: better modularity (development) #2447

* Formats: better modularity (development) #2447

* Formats: better modularity (development) #2447
2018-06-10 22:22:49 +03:00