korlov42 commented on code in PR #1026:
URL: https://github.com/apache/ignite-3/pull/1026#discussion_r951220988


##########
docs/_docs/sql-reference/ddl.adoc:
##########
@@ -23,17 +23,17 @@ Creates a new table.
 [source,sql]
 ----
 CREATE TABLE [IF NOT EXISTS] [simpleName | schemaName.simpleName] (tableColumn 
[, tableColumn]...)
-[COLOCATE [BY] (tableColumn [, tableColumn]...)]
+[COLOCATE [BY] (columnName [, columnName]...)]
 [ENGINE engineName]
 [WITH paramName=paramValue [,paramName=paramValue]...]
-tableColumn = columnName columnType [[NOT] NULL] [DEFAULT defaultValue] 
[PRIMARY KEY]
+tableColumn = columnName columnType [[NOT] NULL] [DEFAULT defaultValue | 
gen_random_uuid] [PRIMARY KEY]

Review Comment:
   I would rather add the explanation of a 'defaultValue':
   ```
   tableColumn = columnName columnType [[NOT] NULL] [DEFAULT defaultValue] 
[PRIMARY KEY]
   defaultValue = literal | systemFunctionName
   ```



##########
docs/_docs/sql-reference/ddl.adoc:
##########
@@ -23,17 +23,17 @@ Creates a new table.
 [source,sql]
 ----
 CREATE TABLE [IF NOT EXISTS] [simpleName | schemaName.simpleName] (tableColumn 
[, tableColumn]...)
-[COLOCATE [BY] (tableColumn [, tableColumn]...)]
+[COLOCATE [BY] (columnName [, columnName]...)]
 [ENGINE engineName]
 [WITH paramName=paramValue [,paramName=paramValue]...]
-tableColumn = columnName columnType [[NOT] NULL] [DEFAULT defaultValue] 
[PRIMARY KEY]
+tableColumn = columnName columnType [[NOT] NULL] [DEFAULT defaultValue | 
gen_random_uuid] [PRIMARY KEY]
 ----
 
 Parameters:
 
 * `tableName` - name of the table.
 * `tableColumn` - name and type of a column to be created in the new table.
-* `DEFAULT` - specifies a default value for the column. Only constant values 
are accepted.
+* `DEFAULT` - specifies a default value for the column. You can specify a 
constant value, or use the `gen_random_uuid` function to generate a random 
value.

Review Comment:
   I would prefer to use more abstract form here, because the list of supported 
functions may change over the time, and such an approach seems a little bit 
error prone to me, since we need to find all the place where the particular 
name of the function is used. 
   
   Let's re-phrase this as "You can specify a constant value or name of the 
system function to generate value" (or something similar to). Also we need to 
attach link to "system function" that redirect us to a list of supported 
functions (is it possible?)



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to