mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 07:01:59 +00:00
Fix bad formatting of IPv4 addresses
This commit is contained in:
parent
af4afff723
commit
2d87e52b3a
@ -51,7 +51,13 @@ public:
|
||||
|
||||
bool isParametric() const override { return false; }
|
||||
bool haveSubtypes() const override { return false; }
|
||||
bool shouldAlignRightInPrettyFormats() const override { return true; }
|
||||
|
||||
bool shouldAlignRightInPrettyFormats() const override
|
||||
{
|
||||
/// Just a number, without customizations. Counterexample: IPv4.
|
||||
return !custom_text_serialization;
|
||||
}
|
||||
|
||||
bool textCanContainOnlyValidUTF8() const override { return true; }
|
||||
bool isComparable() const override { return true; }
|
||||
bool isValueRepresentedByNumber() const override { return true; }
|
||||
|
@ -497,7 +497,7 @@ public:
|
||||
/// For all other substreams (like ArraySizes, NullMasks, etc.) we use only
|
||||
/// generic compression codecs like LZ4.
|
||||
static bool isSpecialCompressionAllowed(const SubstreamPath & path);
|
||||
private:
|
||||
protected:
|
||||
friend class DataTypeFactory;
|
||||
friend class AggregateFunctionSimpleState;
|
||||
/// Customize this DataType
|
||||
|
@ -0,0 +1,4 @@
|
||||
┌─x───────────────┬─y───────────────┬──────────z─┐
|
||||
│ 1.1.1.1 │ 1.1.1.1 │ 16843009 │
|
||||
│ 255.255.255.255 │ 255.255.255.255 │ 4294967295 │
|
||||
└─────────────────┴─────────────────┴────────────┘
|
1
tests/queries/0_stateless/01656_ipv4_bad_formatting.sql
Normal file
1
tests/queries/0_stateless/01656_ipv4_bad_formatting.sql
Normal file
@ -0,0 +1 @@
|
||||
SELECT arrayJoin(['1.1.1.1', '255.255.255.255']) AS x, toIPv4(x) AS y, toUInt32(y) AS z FORMAT PrettyCompactNoEscapes;
|
Loading…
Reference in New Issue
Block a user