Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
assignUser committed Dec 19, 2023
1 parent e5d726e commit 430e425
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion velox/core/tests/TypedExprSerdeTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,17 @@ TEST_F(TypedExprSerDeTest, input) {

TEST_F(TypedExprSerDeTest, fieldAccess) {
std::shared_ptr<ITypedExpr> expression =
std::make_shared<FieldAccessTypedExpr>(BIGINT(), "a");
std::make_shared<FieldAccessTypedExpr>(BIGINT(), "a\"a");
testSerde(expression);
ASSERT_EQ(expression->toString(), "\"a\"\"a\"");

expression = std::make_shared<DereferenceTypedExpr>(
VARCHAR(),
std::make_shared<FieldAccessTypedExpr>(
ROW({"a", "b"}, {VARCHAR(), BOOLEAN()}), "ab"),
0);
testSerde(expression);
ASSERT_EQ(expression->toString(), "\"ab\"[\"a\"]");
}

TEST_F(TypedExprSerDeTest, constant) {
Expand Down

0 comments on commit 430e425

Please sign in to comment.