Skip to content

Commit 0699e3e

Browse files
move note regarding sparse/dense array to G-4340, G-4350
1 parent 2cb08e1 commit 0699e3e

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

docs/4-language-usage/4-control-structures/2-case-if-decode-nvl-nvl2-coalesce/g-4240.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,6 @@
77

88
The `nvl2` function always evaluates all parameters before deciding which one to use. This can be harmful, if parameter 2 or 3 is either a function call or a select statement, as they will be executed regardless of whether parameter 1 contains a `null` value or not.
99

10-
Please note that:
11-
12-
* Varrays are always dense
13-
* Associative arrays (or index-by tables) are either dense or sparse
14-
* Nested tables start dense and may become sparse
15-
1610
## Example (bad)
1711

1812
``` sql

docs/4-language-usage/4-control-structures/2-case-if-decode-nvl-nvl2-coalesce/g-4250.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,6 @@
77

88
Conditions are evaluated top to bottom in branches of a `case` statement or chain of `if`/`elsif` statements. The first condition to evaluate as true leads to that branch being executed, the rest will never execute. Having an identical duplicated condition in another branch will never be reached and will be dead code.
99

10-
Please note that:
11-
12-
* Varrays are always dense
13-
* Associative arrays (or index-by tables) are either dense or sparse
14-
* Nested tables start dense and may become sparse
15-
1610
## Example (bad)
1711

1812
``` sql

docs/4-language-usage/4-control-structures/3-flow-control/g-4340.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ It is easier for the reader to see, that the complete array is processed.
1010
Since an `exit` statement is similar to a `goto` statement,
1111
it should be avoided, whenever possible.
1212

13+
Please note that:
14+
15+
* Varrays are always dense
16+
* Associative arrays (or index-by tables) are either dense or sparse
17+
* Nested tables start dense and may become sparse
18+
1319
## Example (bad)
1420

1521
``` sql

docs/4-language-usage/4-control-structures/3-flow-control/g-4350.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@
77

88
Doing so will not raise a `value_error` if the array you are looping through is empty. If you want to use `first()..last()` you need to check the array for emptiness beforehand to avoid the raise of `value_error`.
99

10+
Please note that:
11+
12+
* Varrays are always dense
13+
* Associative arrays (or index-by tables) are either dense or sparse
14+
* Nested tables start dense and may become sparse
15+
1016
## Example (bad)
1117

1218
``` sql

0 commit comments

Comments
 (0)