Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
PHILO-HE committed Feb 11, 2024
1 parent 34972e4 commit d35bc61
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
13 changes: 13 additions & 0 deletions velox/expression/tests/CastExprTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,19 @@ TEST_F(CastExprTest, basics) {
{"1.888", "2.5", "3.6", "100.44", "-100.101", "1", "-2"});
}

TEST_F(CastExprTest, fromUnknownType) {
testCast<UnknownValue, int>(
"int", {std::nullopt, std::nullopt}, {std::nullopt, std::nullopt});
testCast<UnknownValue, float>(
"float", {std::nullopt, std::nullopt}, {std::nullopt, std::nullopt});
testCast<UnknownValue, double>(
"double", {std::nullopt, std::nullopt}, {std::nullopt, std::nullopt});
testCast<UnknownValue, std::string>(
"string", {std::nullopt, std::nullopt}, {std::nullopt, std::nullopt});
testCast<UnknownValue, bool>(
"boolean", {std::nullopt, std::nullopt}, {std::nullopt, std::nullopt});
}

TEST_F(CastExprTest, realAndDoubleToString) {
setLegacyCast(false);
testCast<double, std::string>(
Expand Down
1 change: 0 additions & 1 deletion velox/vector/arrow/tests/ArrowBridgeSchemaTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,6 @@ TEST_F(ArrowBridgeSchemaImportTest, complexTypes) {
}

TEST_F(ArrowBridgeSchemaImportTest, unsupported) {
// EXPECT_THROW(testSchemaImport("n"), VeloxUserError);
EXPECT_THROW(testSchemaImport("C"), VeloxUserError);
EXPECT_THROW(testSchemaImport("S"), VeloxUserError);
EXPECT_THROW(testSchemaImport("I"), VeloxUserError);
Expand Down

0 comments on commit d35bc61

Please sign in to comment.