Skip to content

Commit

Permalink
Merge 9cdef07 into ebdab07
Browse files Browse the repository at this point in the history
  • Loading branch information
iddqdex authored May 21, 2024
2 parents ebdab07 + 9cdef07 commit 715cd1e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
3 changes: 0 additions & 3 deletions ydb/core/formats/arrow/converter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ static bool ConvertData(TCell& cell, const NScheme::TTypeInfo& colType, TMemoryP
cell = TCell(saved.data(), saved.size());
break;
}
case NScheme::NTypeIds::Decimal:
errorMessage = "Decimal conversion is not supported yet";
return false;
default:
break;
}
Expand Down
7 changes: 6 additions & 1 deletion ydb/core/kqp/ut/scheme/kqp_scheme_ut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6664,7 +6664,7 @@ Y_UNIT_TEST_SUITE(KqpOlapTypes) {
};

TTestHelper::TColumnTable testTable;
testTable.SetName("/Root/ColumnTableTest").SetPrimaryKey({"id"}).SetSharding({"id"}).SetSchema(schema);
testTable.SetName("/Root/ColumnTableTest").SetPrimaryKey({"id", "dec"}).SetSharding({"id", "dec"}).SetSchema(schema);
testHelper.CreateTable(testTable);

{
Expand Down Expand Up @@ -6699,6 +6699,11 @@ Y_UNIT_TEST_SUITE(KqpOlapTypes) {
testHelper.ReadData("SELECT dec FROM `/Root/ColumnTableTest` WHERE id=3", "[[\"-inf\"]]");
testHelper.ReadData("SELECT dec FROM `/Root/ColumnTableTest` WHERE id=4", "[[\"nan\"]]");
testHelper.ReadData("SELECT dec FROM `/Root/ColumnTableTest` WHERE id=5", "[[\"-nan\"]]");
testHelper.ReadData("SELECT id FROM `/Root/ColumnTableTest` WHERE dec=CAST(\"10.1\" As Decimal(22,9))", "[[1]]");
testHelper.ReadData("SELECT id FROM `/Root/ColumnTableTest` WHERE dec=CAST(\"inf\" As Decimal(22,9))", "[[2]]");
testHelper.ReadData("SELECT id FROM `/Root/ColumnTableTest` WHERE dec=CAST(\"-inf\" As Decimal(22,9))", "[[3]]");
// testHelper.ReadData("SELECT id FROM `/Root/ColumnTableTest` WHERE dec=CAST(\"nan\" As Decimal(22,9))", "[[4]]");
// testHelper.ReadData("SELECT id FROM `/Root/ColumnTableTest` WHERE dec=CAST(\"-nan\" As Decimal(22,9))", "[[5]]");
}

Y_UNIT_TEST(TimestampCmpErr) {
Expand Down
3 changes: 2 additions & 1 deletion ydb/core/tx/columnshard/transactions/operators/schema.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ NKikimr::TConclusionStatus TSchemaTransactionOperator::ValidateTableSchema(const
//NTypeIds::Float,
//NTypeIds::Double,
NTypeIds::String,
NTypeIds::Utf8
NTypeIds::Utf8,
NTypeIds::Decimal
};
if (!schema.HasEngine() ||
schema.GetEngine() != NKikimrSchemeOp::EColumnTableEngine::COLUMN_ENGINE_REPLACING_TIMESERIES) {
Expand Down
1 change: 1 addition & 0 deletions ydb/core/tx/schemeshard/olap/columns/update.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ namespace NKikimr::NSchemeShard {
case NYql::NProto::Datetime64:
case NYql::NProto::Timestamp64:
case NYql::NProto::Interval64:
case NYql::NProto::Decimal:
return true;
default:
return false;
Expand Down

0 comments on commit 715cd1e

Please sign in to comment.