mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
enable DateTime64 to be version column
This commit is contained in:
parent
d02d14fa00
commit
308b964ca4
@ -35,6 +35,8 @@ public:
|
|||||||
|
|
||||||
bool canBePromoted() const override { return false; }
|
bool canBePromoted() const override { return false; }
|
||||||
|
|
||||||
|
bool canBeUsedAsVersion() const override { return true; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
SerializationPtr doGetDefaultSerialization() const override;
|
SerializationPtr doGetDefaultSerialization() const override;
|
||||||
};
|
};
|
||||||
|
@ -177,7 +177,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
virtual bool canBeComparedWithCollation() const { return false; }
|
virtual bool canBeComparedWithCollation() const { return false; }
|
||||||
|
|
||||||
/** If the type is totally comparable (Ints, Date, DateTime, not nullable, not floats)
|
/** If the type is totally comparable (Ints, Date, DateTime, DateTime64, not nullable, not floats)
|
||||||
* and "simple" enough (not String, FixedString) to be used as version number
|
* and "simple" enough (not String, FixedString) to be used as version number
|
||||||
* (to select rows with maximum version).
|
* (to select rows with maximum version).
|
||||||
*/
|
*/
|
||||||
|
@ -630,7 +630,7 @@ void MergeTreeData::MergingParams::check(const StorageInMemoryMetadata & metadat
|
|||||||
throw Exception("The column " + version_column +
|
throw Exception("The column " + version_column +
|
||||||
" cannot be used as a version column for storage " + storage +
|
" cannot be used as a version column for storage " + storage +
|
||||||
" because it is of type " + column.type->getName() +
|
" because it is of type " + column.type->getName() +
|
||||||
" (must be of an integer type or of type Date or DateTime)", ErrorCodes::BAD_TYPE_OF_FIELD);
|
" (must be of an integer type or of type Date/DateTime/DateTime64)", ErrorCodes::BAD_TYPE_OF_FIELD);
|
||||||
miss_column = false;
|
miss_column = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user