mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
fixes
This commit is contained in:
parent
c3ed1f38a6
commit
004455a029
@ -225,11 +225,11 @@ struct Settings : public SettingsCollection<Settings>
|
||||
M(SettingString, format_template_row, "", "Path to file which contains format string for rows (for Template format)") \
|
||||
M(SettingString, format_template_rows_between_delimiter, "\n", "Delimiter between rows (for Template format)") \
|
||||
\
|
||||
M(SettingString, format_custom_escaping_rule, "", "Field escaping rule (for CustomSeparated format)") \
|
||||
M(SettingString, format_custom_escaping_rule, "Escaped", "Field escaping rule (for CustomSeparated format)") \
|
||||
M(SettingString, format_custom_field_delimiter, "\t", "Delimiter between fields (for CustomSeparated format)") \
|
||||
M(SettingString, format_custom_row_before_delimiter, "", "Delimiter before field of the first column (for CustomSeparated format)") \
|
||||
M(SettingString, format_custom_row_after_delimiter, "", "Delimiter after field of the last column (for CustomSeparated format)") \
|
||||
M(SettingString, format_custom_row_between_delimiter, "\n", "Delimiter between rows (for CustomSeparated format)") \
|
||||
M(SettingString, format_custom_row_after_delimiter, "\n", "Delimiter after field of the last column (for CustomSeparated format)") \
|
||||
M(SettingString, format_custom_row_between_delimiter, "", "Delimiter between rows (for CustomSeparated format)") \
|
||||
M(SettingString, format_custom_result_before_delimiter, "", "Prefix before result set (for CustomSeparated format)") \
|
||||
M(SettingString, format_custom_result_after_delimiter, "", "Suffix after result set (for CustomSeparated format)") \
|
||||
\
|
||||
|
@ -3,7 +3,6 @@
|
||||
#include <IO/ReadBufferFromMemory.h>
|
||||
#include <IO/Operators.h>
|
||||
#include <IO/ReadBufferFromFile.h>
|
||||
#include <IO/copyData.h>
|
||||
#include <Core/Settings.h>
|
||||
#include <Interpreters/Context.h>
|
||||
|
||||
@ -19,10 +18,10 @@ ParsedTemplateFormatString::ParsedTemplateFormatString(const FormatSchemaInfo &
|
||||
{
|
||||
try
|
||||
{
|
||||
ReadBufferFromFile schema_file(schema.absoluteSchemaPath());
|
||||
WriteBufferFromOwnString format_string;
|
||||
copyData(schema_file, format_string);
|
||||
parse(format_string.str(), idx_by_name);
|
||||
ReadBufferFromFile schema_file(schema.absoluteSchemaPath(), 4096);
|
||||
String format_string;
|
||||
readStringUntilEOF(format_string, schema_file);
|
||||
parse(format_string, idx_by_name);
|
||||
}
|
||||
catch (DB::Exception & e)
|
||||
{
|
||||
|
@ -12,6 +12,7 @@ format_custom_escaping_rule = 'CSV', \
|
||||
format_custom_field_delimiter = '\t|\t', \
|
||||
format_custom_row_before_delimiter = '||', \
|
||||
format_custom_row_after_delimiter = '\t||', \
|
||||
format_custom_row_between_delimiter = '\n', \
|
||||
format_custom_result_before_delimiter = '========== result ==========\n', \
|
||||
format_custom_result_after_delimiter = '\n============================\n'"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user