diff --git a/CHANGELOG.md b/CHANGELOG.md index 21dc6d8d1..cb7072584 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -821,7 +821,7 @@ breaking changes if migrating from v0.9.2. The breaking changes accidentally int `PlannerPipe.Builder.plannerEventCallback` for details. - Adds the following optimization passes, none of which are enabled by default: - `FilterScanToKeyLookupPass` which performs a simple optimization common to most databases: it converts a filter - predicate covering a table's complete primary key into a single get-by-key action, thereby avoiding a full table + predicate covering a table's complete primary key into a single get-by-key operation, thereby avoiding a full table scan. This may pass leave behind some useless `and` expressions if more `and` operands exist in the filter predicate other than primary key field equality expressions. - `RemoveUselessAndsPass`, which removes any useless `and` expressions introduced by the previous pass or by the diff --git a/docs/wiki/design/Architecture Design.md b/docs/wiki/design/Architecture Design.md index b7f3ec467..fa4bb01c8 100644 --- a/docs/wiki/design/Architecture Design.md +++ b/docs/wiki/design/Architecture Design.md @@ -17,7 +17,7 @@ We can illustrate this technique with a simple integer evaluator. Consider the ```java interface Operation { - /** Evaluates the action against the given variables. */ + /** Evaluates the operation against the given variables. */ int eval(Map env); } ``` @@ -73,7 +73,7 @@ interface IntValue { } interface Operation { - /** Evaluates the action against the given variables. */ + /** Evaluates the operation against the given variables. */ IntValue eval(Map env); } ``` diff --git a/docs/wiki/documentation/Exceptions.md b/docs/wiki/documentation/Exceptions.md index 71c026ecd..981755447 100644 --- a/docs/wiki/documentation/Exceptions.md +++ b/docs/wiki/documentation/Exceptions.md @@ -26,5 +26,5 @@ This is ​**not** a complete list. Also look at `org.partiql.lang.eval.Evaluati | Expected 1 argument for `functionName` instead of `n of args` | -- | 1 argument function is called with wrong arity | | Internal error, For input string: `string` | NumberFormatException | `CAST` from String is unsuccessful | | / by zero | ArithmeticException | Division by zero | -| `Not enough or Too many` arguments | -- | Wrong action arity, e.g.: `1+1+` | +| `Not enough or Too many` arguments | -- | Wrong operation arity, e.g.: `1+1+` | diff --git a/docs/wiki/documentation/Functions.md b/docs/wiki/documentation/Functions.md index 118b3f861..fa9c6da2d 100644 --- a/docs/wiki/documentation/Functions.md +++ b/docs/wiki/documentation/Functions.md @@ -526,7 +526,7 @@ Header Purpose : Given a string, `s`, alter every upper case character in `s` to lower case. Any non-upper cased characters -remain unchanged. This action does rely on the locale specified by the runtime configuration. +remain unchanged. This operation does rely on the locale specified by the runtime configuration. The implementation, currently, relies on Java's [String.toLowerCase()](https://docs.oracle.com/javase/7/docs/api/java/lang/String.html#toLowerCase()) documentation. @@ -889,7 +889,7 @@ TO_STRING(`1969-07-20T20:18+08:00`, 'y-MM-dd''T''H:m:ssXXXXX') -- "1969-07-20T2 ### TO_TIMESTAMP -- since v0.1.0 -Given a string convert it to a timestamp. This is the inverse action of [`TO_STRING`](#to_string) +Given a string convert it to a timestamp. This is the inverse operation of [`TO_STRING`](#to_string) Signature @@ -995,7 +995,7 @@ Header Purpose : Given a string, `str`, alter every upper case character is `str` to lower case. Any non-lower cases characters remain -unchanged. This action does rely on the locale specified by the runtime configuration. +unchanged. This operation does rely on the locale specified by the runtime configuration. The implementation, currently, relies on Java's [String.toLowerCase()](https://docs.oracle.com/javase/7/docs/api/java/lang/String.html#toLowerCase()) documentation. diff --git a/docs/wiki/documentation/Numeric Data Type & Arithmetic Operations.md b/docs/wiki/documentation/Numeric Data Type & Arithmetic Operations.md index 802d4899e..eecacb1c4 100644 --- a/docs/wiki/documentation/Numeric Data Type & Arithmetic Operations.md +++ b/docs/wiki/documentation/Numeric Data Type & Arithmetic Operations.md @@ -17,13 +17,13 @@ PartiQL also support `Positive Infinity, Negative Infinity, and NaN` as `FLOAT` Unless otherwise specified, a mathematical operator: 1) takes a field name or expression of a numeric data type as operand -2) For Unary action, the result type will be the same as the operand -3) For Binary action, and the two operands are of the same type, the result will be the same as the type of operands. -4) For Binary action, and the two operands are not of the same type, PartiQL will attempt to automatically coerce the operand. +2) For Unary operation, the result type will be the same as the operand +3) For Binary operation, and the two operands are of the same type, the result will be the same as the type of operands. +4) For Binary operation, and the two operands are not of the same type, PartiQL will attempt to automatically coerce the operand. 5) If one or more operands are MISSING, then the result will be missing. else if one or more operands are null, then the result will be null. ### Overflow -With Type Inferencer and runtime type check enabled, Integer constraint will be honored and we check if the result of the mathematical action exceeds the range that can be represented with the result type. +With Type Inferencer and runtime type check enabled, Integer constraint will be honored and we check if the result of the mathematical operation exceeds the range that can be represented with the result type. Without type inferencer and runtime type check, the default runtime integer representation is `INT8`, and overflow can still happen if the result exceed the range that can be represented with the `INT8` type. @@ -32,16 +32,16 @@ When Permissive mode is enabled, overflowed values will be shown as `MISSING` in ### Conversion Map Operators involving multiple argument data types, such as Integer + Float, the conversion map determines the datatype PartiQL uses. Decimal has the highest numeric precedence, followed by float, and finally by INT. -If either operand has type of Decimal, then PartiQL will attempt to convert the operands implicitly to Decimal before performing the action. -If none of the operand has Decimal type but any of the operands is Float, then PartiQL will attempt to convert the operands implicitly to Float before performing the action. +If either operand has type of Decimal, then PartiQL will attempt to convert the operands implicitly to Decimal before performing the operation. +If none of the operand has Decimal type but any of the operands is Float, then PartiQL will attempt to convert the operands implicitly to Float before performing the operation. ### HonorParameter -If precision and scale matter, i.e. doing action on monetary value, make sure to turn on the honorTypedOpParameters() option in Compile Option. +If precision and scale matter, i.e. doing operation on monetary value, make sure to turn on the honorTypedOpParameters() option in Compile Option. The honorTypedOpParameters() determines how CAST and other typed operations behave. The default CompileOptions uses LEGACY which ignores the additional type arguments. Using the HONOR_PARAMETERS mode will take into account type parameters. ### Unary Plus: -Returns the operand without action. +Returns the operand without operation. Syntax : ` + expression` @@ -209,7 +209,7 @@ Example ``` ### Bitwise And -Performs a bitwise logical AND action between two integer values. +Performs a bitwise logical AND operation between two integer values. Syntax : `expression & expression` diff --git a/docs/wiki/documentation/Window Functions.md b/docs/wiki/documentation/Window Functions.md index 05d5d895d..f054ac70e 100644 --- a/docs/wiki/documentation/Window Functions.md +++ b/docs/wiki/documentation/Window Functions.md @@ -186,7 +186,7 @@ LEAD(expr [, offset [, default]]) Purpose: Returns the value from a binding tuple at a given offset *after* the current binding tuple position in the window partition. -Note that `Lag` and `Lead` perform similar action and have similar semantics, except for the fact that `Lag` looks for `x` rows prior to the current row and `Lead` looks for `x` rows after. +Note that `Lag` and `Lead` perform similar operation and have similar semantics, except for the fact that `Lag` looks for `x` rows prior to the current row and `Lead` looks for `x` rows after. Arguments: * expr: diff --git a/docs/wiki/upgrades/Rewriter to Visitor Transform Guide.md b/docs/wiki/upgrades/Rewriter to Visitor Transform Guide.md index db9261adb..88fd974d4 100644 --- a/docs/wiki/upgrades/Rewriter to Visitor Transform Guide.md +++ b/docs/wiki/upgrades/Rewriter to Visitor Transform Guide.md @@ -129,7 +129,7 @@ It's also worth noting that `innerRewriteDataManipulation` and the visitor trans fun transformDataManipulationEvaluationOrder(node: PartiqlAst.Statement.Dml): PartiqlAst.Statement { val from = node.from?.let { transformFromSource(it) } val where = node.where?.let { transformStatementDml_where(node) } - val dmlOperation = transformDmlOp(node.action) + val dmlOperation = transformDmlOp(node.operation) val metas = transformMetas(node.metas) return PartiqlAst.build {