mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 16:42:05 +00:00
fix: DateTime64 on MaterializedPostgreSQL (#2)
* fix: DateTime64 on MaterializedPostgreSQL * Update StoragePostgreSQL.cpp
This commit is contained in:
parent
eefb798e33
commit
a0ec8e9878
@ -326,6 +326,15 @@ ASTPtr StorageMaterializedPostgreSQL::getColumnDeclaration(const DataTypePtr & d
|
||||
if (which.isDecimal256())
|
||||
return make_decimal_expression("Decimal256");
|
||||
}
|
||||
|
||||
if (which.isDateTime64()){
|
||||
auto ast_expression = std::make_shared<ASTFunction>();
|
||||
|
||||
ast_expression->name = "DateTime64";
|
||||
ast_expression->arguments = std::make_shared<ASTExpressionList>();
|
||||
ast_expression->arguments->children.emplace_back(std::make_shared<ASTLiteral>(UInt32(6)));
|
||||
return ast_expression;
|
||||
}
|
||||
|
||||
return std::make_shared<ASTIdentifier>(data_type->getName());
|
||||
}
|
||||
|
@ -236,7 +236,7 @@ public:
|
||||
else if (which.isDateTime()) nested_column = ColumnUInt32::create();
|
||||
else if (which.isDateTime64())
|
||||
{
|
||||
nested_column = ColumnDecimal<Decimal64>::create(0, 6);
|
||||
nested_column = ColumnDecimal<DateTime64>::create(0, 6);
|
||||
}
|
||||
else if (which.isDecimal32())
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user