drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aditya Kishore" <adityakish...@gmail.com>
Subject Re: Review Request 21058: Drill-630: Adding substr(expression, start) function. Also bugfix for (Drill-542 & Drill-543)
Date Sun, 04 May 2014 21:24:37 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/21058/#review42105
-----------------------------------------------------------



exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/StringFunctions.java
<https://reviews.apache.org/r/21058/#comment75847>

    nit: Insert space between "<=" and "0"



exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/StringFunctions.java
<https://reviews.apache.org/r/21058/#comment75849>

    This is not required. "out.end" can be set to "string.end" since we need all characters
until the end of the original string.



exec/java-exec/src/test/resources/functions/string/testSubstr.json
<https://reviews.apache.org/r/21058/#comment75850>

    Could you please add a test case with non-English string, for example Hindi or Chinese.


- Aditya Kishore


On May 4, 2014, 4:02 a.m., Yash Sharma wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/21058/
> -----------------------------------------------------------
> 
> (Updated May 4, 2014, 4:02 a.m.)
> 
> 
> Review request for drill, Aditya Kishore, Jacques Nadeau, Jinfeng Ni, and Mehant Baid.
> 
> 
> Repository: drill-git
> 
> 
> Description
> -------
> 
> Adding substr(expression, start) to improve string substring function.
> This is also a bug fix for https://issues.apache.org/jira/browse/DRILL-542.
> 
> 
> Diffs
> -----
> 
>   exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/StringFunctions.java
aca5933 
>   exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestStringFunctions.java
09d1361 
>   exec/java-exec/src/test/resources/functions/string/testSubstr.json e885381 
> 
> Diff: https://reviews.apache.org/r/21058/diff/
> 
> 
> Testing
> -------
> 
> Yes.
> ----------------------------------------------------------------------------------------
> JUnit Test Case:
> ----------------------------------------------------------------------------------------
> 
>  $mvn test -Dtest=TestStringFunctions#testSubstr
> 
> Results :
> 
> Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> 
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 53.030 s
> [INFO] Finished at: 2014-05-04T16:08:26+05:30
> [INFO] Final Memory: 44M/711M
> [INFO] ------------------------------------------------------------------------
> 
> 
> ----------------------------------------------------------------------------------------
> SQLLINE Test
> ----------------------------------------------------------------------------------------
> 
> 0: jdbc:drill:zk=local> SELECT employee_id, first_name, substring(first_name, 3) sub_str
FROM cp.`employee.json` limit 20; 
> +-------------+------------+------------+
> | employee_id | first_name |  sub_str   |
> +-------------+------------+------------+
> | 1           | Sheri      | eri        |
> | 2           | Derrick    | rrick      |
> | 4           | Michael    | chael      |
> | 5           | Maya       | ya         |
> | 6           | Roberta    | berta      |
> | 7           | Rebecca    | becca      |
> | 8           | Kim        | m          |
> | 9           | Brenda     | enda       |
> | 10          | Darren     | rren       |
> | 11          | Jonathan   | nathan     |
> | 12          | Jewel      | wel        |
> | 13          | Peggy      | ggy        |
> | 14          | Bryan      | yan        |
> | 15          | Walter     | lter       |
> | 16          | Peggy      | ggy        |
> | 17          | Brenda     | enda       |
> | 18          | Daniel     | niel       |
> | 19          | Dianne     | anne       |
> | 20          | Beverly    | verly      |
> | 21          | Pedro      | dro        |
> +-------------+------------+------------+
> 
> 
> Thanks,
> 
> Yash Sharma
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message