diff --git a/velox/functions/sparksql/tests/ArithmeticTest.cpp b/velox/functions/sparksql/tests/ArithmeticTest.cpp index 886123b2d05e0..aa14a8f57b926 100644 --- a/velox/functions/sparksql/tests/ArithmeticTest.cpp +++ b/velox/functions/sparksql/tests/ArithmeticTest.cpp @@ -67,6 +67,16 @@ TEST_F(PmodTest, int64) { EXPECT_EQ(INT64_MAX - 1, pmod(INT64_MIN, INT64_MAX)); } +TEST_F(PmodTest, float) { + EXPECT_EQ(0.2, pmod(0.5, 0.3)); + EXPECT_EQ(0.9, pmod(-1.1, 2)); +} + +TEST_F(PmodTest, double) { + EXPECT_EQ(0.2, pmod(0.5, 0.3)); + EXPECT_EQ(0.9, pmod(-1.1, 2)); +} + class RemainderTest : public SparkFunctionBaseTest { protected: template