Skip to content

Refactor DecimalArithmeticTest and other function tests for clarity #16464

@simoneves

Description

@simoneves

Description

In the development of PR #16252 it was mutually concluded the the function tests in velox/functions/prestosql/tests/DecimalArithmeticTest.cpp are written in a style that is hard to parse and visually confirm that the inputs and outputs are correct. There are many other unit tests using this same style to which the same concern applies. It was also concluded that it was inappropriate to just add one more test in the same style.

That PR therefore adds the new test (DecimalArithmeticTest.floorAndCeil) with a new style which is more readable, as well as a new helper function in the test base class which can be used for any function expression test, and that PR will hopefully refine that style to one that is agreed to be suitable for wider usage.

This issue is to request that the other tests (as many and as widespread as is deemed necessary) be refactored as a separate task.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions