danny0405 commented on a change in pull request #1189: [CALCITE-2846] Document
Oracle-specific functions, such as NVL and LT…
URL: https://github.com/apache/calcite/pull/1189#discussion_r281000708
##########
File path: site/_docs/reference.md
##########
@@ -2155,6 +2164,42 @@ LIMIT 10;
| ---------- | ---- | ----- | ---- | ---- |
| ["a", "b"] | NULL | ["c"] | NULL | NULL |
+#### DECODE example
+
+SQL
+
+```SQL
+SELECT DECODE (f1, 1, 'aa', 2, 'bb', 3, 'cc', 4, 'dd', 'ee') as c1
+, DECODE (f2, 1, 'aa', 2, 'bb', 3, 'cc', 4, 'dd', 'ee') as c2
+, DECODE (f3, 1, 'aa', 2, 'bb', 3, 'cc', 4, 'dd', 'ee') as c3
+, DECODE (f4, 1, 'aa', 2, 'bb', 3, 'cc', 4, 'dd', 'ee') as c4
+, DECODE (f5, 1, 'aa', 2, 'bb', 3, 'cc', 4, 'dd', 'ee') as c5
+FROM (VALUES (1, 2, 3, 4, 5)) AS t(f1, f2, f3, f4, f5);
+
+```
+ Result
+
+| c1 | c2 | c3 | c4 | c5 |
+| ----------- | ----------- | ----------- | ----------- | ----------- |
+| aa | bb | cc | dd | ee |
+
+#### TRANSLATE3 example
+
+SQL
+
+```SQL
+SELECT TRANSLATE3('Aa*Bb*Cc''D*d', ' */''%', '_') as c1
+, TRANSLATE3('SQL/Plus/User''s/Guide', ' */''%', '_') as c2
+, TRANSLATE3('SQL Plus User''s Guide', ' */''%', '_') as c3
+, TRANSLATE3('SQL%Plus%User''s%Guide', ' */''%', '_') as c4
Review comment:
The query is wrong, i will just update it.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services