This is an automated email from the ASF dual-hosted git repository.
mbudiu pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/calcite.git
The following commit(s) were added to refs/heads/main by this push:
new 6e1fe23c2a Improve OVERLAY operator docs and fix typo in exception
6e1fe23c2a is described below
commit 6e1fe23c2a36176f52dd0fcdf5f0278028ca36d3
Author: Tim Grein <[email protected]>
AuthorDate: Sun Jul 21 20:00:38 2024 +0200
Improve OVERLAY operator docs and fix typo in exception
---
core/src/main/java/org/apache/calcite/sql/fun/SqlOverlayFunction.java | 2 +-
site/_docs/reference.md | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git
a/core/src/main/java/org/apache/calcite/sql/fun/SqlOverlayFunction.java
b/core/src/main/java/org/apache/calcite/sql/fun/SqlOverlayFunction.java
index 293e153014..b03525dd5f 100644
--- a/core/src/main/java/org/apache/calcite/sql/fun/SqlOverlayFunction.java
+++ b/core/src/main/java/org/apache/calcite/sql/fun/SqlOverlayFunction.java
@@ -74,7 +74,7 @@ public class SqlOverlayFunction extends SqlFunction {
case 4:
return "{0}({1} PLACING {2} FROM {3} FOR {4})";
default:
- throw new IllegalArgumentException("operandsCount shuld be 3 or 4, got "
+ operandsCount);
+ throw new IllegalArgumentException("operandsCount should be 3 or 4, got
" + operandsCount);
}
}
}
diff --git a/site/_docs/reference.md b/site/_docs/reference.md
index 6dc80f6c4c..1bb3502dc6 100644
--- a/site/_docs/reference.md
+++ b/site/_docs/reference.md
@@ -1379,7 +1379,7 @@ comp:
| POSITION(substring IN string) | Returns the position of the first occurrence
of *substring* in *string*
| POSITION(substring IN string FROM integer) | Returns the position of the
first occurrence of *substring* in *string* starting at a given point (not
standard SQL)
| TRIM( { BOTH | LEADING | TRAILING } string1 FROM string2) |
Removes the longest string containing only the characters in *string1* from the
start/end/both ends of *string2*
-| OVERLAY(string1 PLACING string2 FROM integer [ FOR integer2 ]) | Replaces a
substring of *string1* with *string2*
+| OVERLAY(string1 PLACING string2 FROM integer [ FOR integer2 ]) | Replaces a
substring of *string1* with *string2*, starting at the specified position
*integer* in *string1* and optionally for a specified length *integer2*
| SUBSTRING(string FROM integer) | Returns a substring of a character string
starting at a given point
| SUBSTRING(string FROM integer FOR integer) | Returns a substring of a
character string starting at a given point with a given length
| INITCAP(string) | Returns *string* with the first letter of each
word converter to upper case and the rest to lower case. Words are sequences of
alphanumeric characters separated by non-alphanumeric characters.
@@ -1396,7 +1396,7 @@ Not implemented:
| OCTET_LENGTH(binary) | Returns the number of bytes in *binary*
| POSITION(binary1 IN binary2) | Returns the position of the first occurrence
of *binary1* in *binary2*
| POSITION(binary1 IN binary2 FROM integer) | Returns the position of the
first occurrence of *binary1* in *binary2* starting at a given point (not
standard SQL)
-| OVERLAY(binary1 PLACING binary2 FROM integer [ FOR integer2 ]) | Replaces a
substring of *binary1* with *binary2*
+| OVERLAY(binary1 PLACING binary2 FROM integer [ FOR integer2 ]) | Replaces a
substring of *binary1* with *binary2*, starting at the specified position
*integer* in *binary1* and optionally for a specified length *integer2*
| SUBSTRING(binary FROM integer) | Returns a substring of *binary* starting at
a given point
| SUBSTRING(binary FROM integer FOR integer) | Returns a substring of *binary*
starting at a given point with a given length