left('abcdef', 1) ===> a
left('abcdef', 2) ===> ab
right('abcdef', 1) ===> f
right('abcdef', 2) ===> ef
SUCCESS: Integrated in Tajo-trunk-postcommit #581 (See https://builds.apache.org/job/Tajo-trunk-postcommit/581/)
TAJO-352: Implement right/left(text, size) function. (DaeMyung Kang via hyunsik) (hyunsik: https://git-wip-us.apache.org/repos/asf?p=incubator-tajo.git&a=commit&h=43ec04aaa34ffe5c5da2cfd05ff919ffac44044b)
committed it to master. Thank you for your contribution!
+1 for the patch.
The commented out lines should be enabled after auto casting is implemented.
I submitted the wrong file. I updated the third patch.
The latest patch doesn't look like to contain the difference between the master branch and this issue.
Also, there are some commented out codes.
If there are no objection, I'll commit it after a while.
I've attached the updated patch. This patch does as follows:
I'll submit a new patch that resolved reserved words.
If the second parameter (i.e., size) is null, the result should be null. Others look great for me.
Don't accept this patch. Here is two problems.
1. it is the same problem with substr, Parsing error
2. when give function name to (left, right), it failed with parse.
(I might think it is because of reserved keyword(left join or right join).
so. I changed function name left -> from_left, right -> from_right.