tanclary commented on code in PR #3720:
URL: https://github.com/apache/calcite/pull/3720#discussion_r1518005426


##########
core/src/main/java/org/apache/calcite/sql/fun/SqlLibraryOperators.java:
##########
@@ -2257,4 +2258,16 @@ private static RelDataType 
deriveTypeMapFromEntries(SqlOperatorBinding opBinding
   @LibraryOperator(libraries = {SPARK})
   public static final SqlFunction GETBIT =
       BIT_GET.withName("GETBIT");
+
+  /** The RANDOM() function. Equivalent to RAND(). */
+  @LibraryOperator(libraries = {POSTGRESQL})
+  public static final SqlFunction RANDOM = new SqlRandFunction() {

Review Comment:
   can't you make SqlRandFunction extend SqlBasicfunction



##########
site/_docs/reference.md:
##########
@@ -2813,6 +2813,7 @@ In the following:
 | b | PARSE_TIMESTAMP(format, string[, timeZone])    | Uses format specified 
by *format* to convert *string* representation of timestamp to a TIMESTAMP WITH 
LOCAL TIME ZONE value in *timeZone*
 | h s | PARSE_URL(urlString, partToExtract [, keyToExtract] ) | Returns the 
specified *partToExtract* from the *urlString*. Valid values for 
*partToExtract* include HOST, PATH, QUERY, REF, PROTOCOL, AUTHORITY, FILE, and 
USERINFO. *keyToExtract* specifies which query to extract
 | b s | POW(numeric1, numeric2)                      | Returns *numeric1* 
raised to the power *numeric2*
+| p | RANDOM()                                       | Generates a random 
double between 0 and 1 inclusive

Review Comment:
   ah sorry didn't see there's a difference, this is fine



-- 
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.

To unsubscribe, e-mail: commits-unsubscr...@calcite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to