Github user arina-ielchiieva commented on a diff in the pull request:
https://github.com/apache/drill/pull/815#discussion_r111192811
--- Diff:
exec/java-exec/src/test/java/org/apache/drill/exec/expr/fn/impl/TestStringFunctions.java
---
@@ -273,4 +273,13 @@ public void testSplit() throws Exception {
.run();
}
+ @Test
+ public void testReverse() throws Exception {
+ testBuilder()
+ .sqlQuery("select reverse(reverse(n_comment)) words from
cp.`tpch/nation.parquet`")
+ .unOrdered()
+ .sqlBaselineQuery("select n_comment words from
cp.`tpch/nation.parquet`")
+ .build()
+ .run();
+ }
--- End diff --
Unfortunately this unit test does not ensure that reverse function works
correctly.
Let's replace this unit test with two unit tests:
1. test reverse result for one row like in `testSplit()` test.
2. test that reverse doesn't fail for table with several long varchars.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---