MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / doGetSerialization

Method doGetSerialization

src/DataTypes/DataTypeDateTime.cpp:40–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38}
39
40SerializationPtr DataTypeDateTime::doGetSerialization(const SerializationInfoSettings &) const
41{
42 if (!has_explicit_time_zone)
43 {
44 /// When no explicit timezone, resolve the effective timezone (respects session_timezone).
45 /// This is called once per formatter (not per row), so the cost of DateLUT::instance() is negligible.
46 const auto & effective_tz = DateLUT::instance();
47 if (&effective_tz != &time_zone)
48 {
49 TimezoneMixin overridden(effective_tz.getTimeZone());
50 return SerializationDateTime::create(overridden);
51 }
52 }
53 return SerializationDateTime::create(*this);
54}
55
56}

Callers

nothing calls this directly

Calls 1

createFunction · 0.70

Tested by

no test coverage detected