File tree Expand file tree Collapse file tree 1 file changed +2
-23
lines changed
Expand file tree Collapse file tree 1 file changed +2
-23
lines changed Original file line number Diff line number Diff line change 55#include < Common/MemoryTrackerBlockerInThread.h>
66#include < Common/SensitiveDataMasker.h>
77#include < Common/FailPoint.h>
8+ #include < Common/FieldVisitorToString.h>
89
910#include < Interpreters/AsynchronousInsertQueue.h>
1011#include < Interpreters/Cache/QueryCache.h>
@@ -577,29 +578,7 @@ void logQueryFinish(
577578 for (const auto & name : changed_settings_names)
578579 {
579580 Field value = settings.get (name);
580- String value_str;
581-
582- switch (value.getType ())
583- {
584- case Field::Types::Which::String:
585- value_str = value.safeGet <String>();
586- break ;
587- case Field::Types::Which::Int64:
588- value_str = std::to_string (value.safeGet <Int64>());
589- break ;
590- case Field::Types::Which::Float64:
591- value_str = std::to_string (value.safeGet <Float64>());
592- break ;
593- case Field::Types::Which::Bool:
594- value_str = value.safeGet <bool >() ? " true" : " false" ;
595- break ;
596- case Field::Types::Which::UInt64:
597- value_str = std::to_string (value.safeGet <UInt64>());
598- break ;
599- default :
600- value_str = " Unsupported type: " + std::to_string (static_cast <int >(value.getType ()));
601- break ;
602- }
581+ String value_str = convertFieldToString (value);
603582
604583 query_span->addAttribute (fmt::format (" clickhouse.setting.{}" , name), value_str);
605584
You can’t perform that action at this time.
0 commit comments