You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by GitBox <gi...@apache.org> on 2022/09/27 12:39:47 UTC

[GitHub] [cassandra] blerer opened a new pull request, #1887: CASSANDRA-17709 (4.1): Make CQL.textile up to date

blerer opened a new pull request, #1887:
URL: https://github.com/apache/cassandra/pull/1887

   Thanks for sending a pull request! Here are some tips if you're new here:
    
    * Ensure you have added or run the [appropriate tests](https://cassandra.apache.org/_/development/testing.html) for your PR.
    * Be sure to keep the PR description updated to reflect all changes.
    * Write your PR title to summarize what this PR proposes.
    * If possible, provide a concise example to reproduce the issue for a faster review.
    * Read our [contributor guidelines](https://cassandra.apache.org/_/development/index.html)
    * If you're making a documentation change, see our [guide to documentation contribution](https://cassandra.apache.org/_/development/documentation.html)
    
   Commit messages should follow the following format:
   
   ```
   <One sentence description, usually Jira title or CHANGES.txt summary>
   
   <Optional lengthier description (context on patch)>
   
   patch by <Authors>; reviewed by <Reviewers> for CASSANDRA-#####
   
   Co-authored-by: Name1 <email1>
   Co-authored-by: Name2 <email2>
   
   ```
   
   The [Cassandra Jira](https://issues.apache.org/jira/projects/CASSANDRA/issues/)
   
   


-- 
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: pr-unsubscribe@cassandra.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


[GitHub] [cassandra] driftx commented on a diff in pull request #1887: CASSANDRA-17709 (4.1): Make CQL.textile up to date

Posted by GitBox <gi...@apache.org>.
driftx commented on code in PR #1887:
URL: https://github.com/apache/cassandra/pull/1887#discussion_r981245224


##########
doc/cql3/CQL.textile:
##########
@@ -2154,6 +2154,16 @@ A number of functions are provided to "convert" a @timeuuid@, a @timestamp@ or a
 |@dateOf@            |@timeuuid@      |Similar to @toTimestamp(timeuuid)@ (DEPRECATED)|
 |@unixTimestampOf@   |@timeuuid@      |Similar to @toUnixTimestamp(timeuuid)@ (DEPRECATED)|
 
+h4(#floorFun). Floor function
+
+Rounds date and time to the nearest value.
+
+|_. type |_. function |_. |
+|@timestamp@  | floor(timestamp, duration [, start_timestamp]) | If the start_timestamp is not used, then the start timestamp is January 1, 1970 00:00:00.000 GMT |
+|@timeuuid@  | floor(timeuuid, duration [, start_timestamp]) | If the start_timestamp is not used, then the start timestamp is January 1, 1970 00:00:00.000 GMT |
+|@date@  | floor(date, duration [, start_date]) | If the start_date is not used, then the start date is January 1, 1970 GMT |
+|@time@  | floor(time, duration [, start_time]) | ==If the start_time is not used, then the start time is 00:00:00[000000000]== |
+

Review Comment:
   Formatting



##########
doc/cql3/CQL.textile:
##########
@@ -1822,6 +1824,44 @@ They can also be input as string literals in any of the following formats:
 * @08:12:54.123456@
 * @08:12:54.123456789@
 
+h3(#usingdurations). Working with durations
+
+Values of the @duration@ type are encoded as 3 signed integer of variable lengths. The first integer represents the

Review Comment:
   integer -> integers



##########
doc/cql3/CQL.textile:
##########
@@ -1,4 +1,4 @@
-<!--
+!--

Review Comment:
   Need this :)



##########
doc/cql3/CQL.textile:
##########
@@ -1749,6 +1750,7 @@ p. The following table gives additional informations on the native data types, a
 |@date@     |   integers, strings  |A date (with no corresponding time value).  See "Working with dates":#usingdates below for more information.|
 |@decimal@  |   integers, floats   |Variable-precision decimal|
 |@double@   |   integers           |64-bit IEEE-754 floating point|
+|@duration@ |  duration           |  A duration with nanosecond precision. See "Working with durations":#usingdurations below for details.|

Review Comment:
   missing a space



##########
doc/cql3/CQL.textile:
##########
@@ -2111,7 +2113,25 @@ will select all rows where the @timeuuid@ column @t@ is strictly older than '201
 
 _Warning_: We called the values generated by @minTimeuuid@ and @maxTimeuuid@ _fake_ UUID because they do no respect the Time-Based UUID generation process specified by the "RFC 4122":http://www.ietf.org/rfc/rfc4122.txt. In particular, the value returned by these 2 methods will not be unique. This means you should only use those methods for querying (as in the example above). Inserting the result of those methods is almost certainly _a bad idea_.
 
-h3(#timeFun). Time conversion functions
+
+h3(#datetimeFun). Datetime functions
+
+h4(#curentDateTime). Retrieving the current date/time
+
+The following functions can be used to retrieve the date/time at the time where the function is invoked:
+
+|_. function name         |_.    output type        |
+| @currentTimestamp@    |  @timestamp@          |

Review Comment:
   Formatting



##########
doc/cql3/CQL.textile:
##########
@@ -1998,7 +2039,7 @@ The following table describes the conversions supported by the @cast@ function.
 
 |_. from    |_. to   |
 |@ascii@   |@text@, @varchar@                                                                                    |
-|@bigint@   |@tinyint@, @smallint@, @int@, @float@, @double@, @decimal@, @varint@, @text@, @varchar@             |
+|@bigint@   |@tinyint@, @smallint@, @int@, @float@, @double@, @@decimal@@, @varint@, @text@, @varchar@             |

Review Comment:
   spacing



##########
doc/cql3/CQL.textile:
##########
@@ -1985,6 +1985,47 @@ UPDATE plays SET scores = scores - [ 12, 21 ] WHERE id = '123-afde'; // removes
 
 As with "maps":#map, TTLs if used only apply to the newly inserted/updated _values_.
 
+h2(#arithmeticOperators). Arithmetic Operators
+
+h3(#numberArithmetic). Number Arithmetic
+
+CQL supports the following operators:
+
+|_. Operator   |_. Description                        |
+| @-@ (unary)  | Negates operand                      |
+| @+@          | Addition                             |
+| @-@          | Substraction                         |
+| @*@          | Multiplication                       |
+| @/@          | Division                             |
+| @%@          | Returns the remainder of a division  |
+
+Arithmetic operations are only supported on numeric types or counters.
+
+The return type of the operation will be based on the operand types:
+
+
+|_. left/right     |_. @tinyint@    |_. @smallint@    |_. @int@      |_. @bigint@    |_. @counter@    |_. @float@     |_. @double@    |_. @varint@    |_. @decimal@    |

Review Comment:
   Spacing



-- 
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: pr-unsubscribe@cassandra.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


[GitHub] [cassandra] blerer closed pull request #1887: CASSANDRA-17709 (4.1): Make CQL.textile up to date

Posted by GitBox <gi...@apache.org>.
blerer closed pull request #1887: CASSANDRA-17709 (4.1): Make CQL.textile up to date
URL: https://github.com/apache/cassandra/pull/1887


-- 
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: pr-unsubscribe@cassandra.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org