Krystal created DRILL-4645:
------------------------------
Summary: Regex_replace() function is broken
Key: DRILL-4645
URL: https://issues.apache.org/jira/browse/DRILL-4645
Project: Apache Drill
Issue Type: Bug
Components: Functions - Drill
Reporter: Krystal
git.commit.id.abbrev=5705d45
select regexp_replace(cast(columns[2] as VARCHAR(4)), 'a', 'b') from `t1.csv`
limit 2;
+------------------------------------------------------------------+
| EXPR$0 |
+------------------------------------------------------------------+
| org.apache.drill.exec.expr.fn.impl.CharSequenceWrapper@7a6e1b48 |
| org.apache.drill.exec.expr.fn.impl.CharSequenceWrapper@7a6e1b48 |
+------------------------------------------------------------------+
Content of table t1.csv:
select * from `t1.csv`;
+------------------------------+
| columns |
+------------------------------+
| ["1","aaaaa","2015-01-01"] |
| ["2","bbbbb","2015-01-02"] |
| ["3","ccccc","2015-01-03"] |
| ["4","","2015-01-04"] |
| ["5","eeeee","2015-01-05"] |
| ["6","fffff","2015-01-06"] |
| ["7","ggggg","2015-01-07"] |
| ["","hhhhh","2015-01-08"] |
| ["9","iiiii",""] |
| ["10","jjjjj","2015-01-10"] |
+------------------------------+
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)