Skip to content

Commit 93ed3ef

Browse files
authored
docs: DOC-1227: Core desync - batch of updates (#7845)
1 parent d07afc7 commit 93ed3ef

11 files changed

Lines changed: 70 additions & 28 deletions

docs/groovy/conceptual/query-table-configuration.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,12 +204,12 @@ The recycler capacity determines how many array blocks are kept in memory for po
204204

205205
## Stateless by default
206206

207-
In a future release of Deephaven, the flags in this category will change from a default of false to a default of true. These flags enable the engine to assume more often that a given Filter or Selectable can be executed in parallel (unless the Filter or Selectable is [marked serial or has barriers](./query-engine/parallelization.md#controlling-concurrency-for-select-update-and-where) interface).
207+
These flags enable the engine to assume more often that a given Filter or Selectable can be executed in parallel (unless the Filter or Selectable is [marked serial or has barriers](./query-engine/parallelization.md#controlling-concurrency-for-select-update-and-where) interface).
208208

209209
| Property Name | Default Value | Description |
210210
| -------------------------------------- | ------------- | ------------------------------------------------------------------------------------------------------- |
211-
| `QueryTable.statelessFiltersByDefault` | false | Enables the engine to assume that filters are stateless by default, allowing for more optimizations |
212-
| `QueryTable.statelessSelectByDefault` | false | Enables the engine to assume that Selectables are stateless by default, allowing for more optimizations |
211+
| `QueryTable.statelessFiltersByDefault` | true | Enables the engine to assume that filters are stateless by default, allowing for more optimizations |
212+
| `QueryTable.statelessSelectByDefault` | true | Enables the engine to assume that Selectables are stateless by default, allowing for more optimizations |
213213

214214
## Related documentation
215215

docs/groovy/how-to-guides/install-use-plugins.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,16 @@
22
title: Install and use plugins
33
---
44

5-
There are many ways to customize either the Deephaven build or packages to fit your use-cases. In this guide, we extend Deephaven to build a custom Docker image with JS plugins installed. For this guide, we will add the `js-plugin-matplotlib`. This makes the popular [Matplotlib](https://matplotlib.org/) library available for use, providing more data visualization options within the Deephaven IDE, such as 3D plots and sophisticated scatter plots. As always, you'll be able to plot both your static and real-time data.
5+
This guide covers the installation and use of plugins in Deephaven. A plugin is something that extends the functionality of a software. Groovy packages are a common example of plugins - they extend Groovy's capabilities. Plugins in Deephaven can extend the functionality of a running server, UI, client API, or all of them.
66

7-
Plugins in Deephaven can extend the functionality of a running server, UI, client API, or all of them. Deephaven offers several pre-built plugins that can extend the platform's functionality. These are available to anyone using Deephaven Community Core.
7+
Deephaven offers several pre-built plugins that can extend the platform's functionality. These are available to anyone using Deephaven Community Core. They can be installed easily and provide a range of additional capabilities. For the full list of available plugins, see [available plugins](#available-plugins).
88

99
Server-side plugins extend the functionality of the Deephaven server. For instance, plotting plugins add the ability to plot with new APIs such as Plotly Express, Matplotlib, and Seaborn. Authentication plugins add the ability to authenticate users with new authentication methods such as mTLS.
1010

1111
Client-side plugins extend the functionality of any of Deephaven's client APIs. For instance, the Groovy client API can be extended with plugins that allow the client to manage arbitrary objects in the server, or to interact with the server using a different serialization format.
1212

13+
Other plugins may have both a server-side plugin and a client-side plugin, allowing bidirectional communication between the client and server.
14+
1315
> [!NOTE]
1416
> In some cases, you'll want to install packages rather than use plugins. Those instructions are covered in [How to install packages](./install-packages.md).
1517
>

docs/groovy/how-to-guides/ternary-if-how-to.md

Lines changed: 48 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,27 @@ title: Use the ternary conditional operator in query strings
33
sidebar_label: Ternary-if
44
---
55

6-
Groovy's native ternary operator (`condition ? valueIfTrue : valueIfFalse`) works seamlessly in Deephaven query strings, providing a concise way to implement conditional logic.
6+
This guide will show you how to use Groovy's native ternary operator (`condition ? valueIfTrue : valueIfFalse`), also known as ternary-if, in query strings. The operator evaluates a boolean expression and returns the result of one of two expressions, depending on whether the boolean expression evaluates to true or false. It is similar to an inline `if-then-else` code block.
77

8-
## Basic usage
8+
## Ternary conditional operator (ternary-if)
9+
10+
The syntax for the ternary conditional operator is:
11+
`condition ? expressionIfTrue : expressionIfFalse`
12+
13+
The question mark (`?`) separates the condition from the expressions, and the colon (`:`) separates the expression evaluated when the condition is true from the expression evaluated when the condition is false.
14+
15+
The expression `x ? y : z` evaluates as follows:
16+
17+
- If `x` is true, the expression evaluates to `y`.
18+
- If `x` is false, the expression evaluates to `z`.
19+
20+
The expression `x ? (y ? 1 : 2) : 3` evaluates as follows:
21+
22+
- If both `x` and `y` are true, the expression evaluates to 1.
23+
- If `x` is true, and `y` is false, the expression evaluates to 2.
24+
- If `x` is false, the expression evaluates to 3.
25+
26+
In the following example, a new column, `Budget`, is created. The column contains `yes` if the value in the `Price` column is less than or equal to 3.50 and `no` otherwise.
927

1028
```groovy order=woods,result
1129
woods = newTable(
@@ -16,9 +34,21 @@ woods = newTable(
1634
result = woods.update("Budget = (Price <= 3.50) ? `yes` : `no`")
1735
```
1836

19-
## Nested ternary operators
37+
## Nested ternary conditional operators
38+
39+
For more complex cases with multiple conditions, ternary-if statements can be nested. For example:
40+
41+
`condition1 ? (condition2 ? value1 : value2) : value3`
42+
43+
The expression `x ? (y ? 1 : 2) : 3` evaluates as follows:
44+
45+
- If both `x` and `y` are true, the expression evaluates to 1.
46+
- If `x` is true, and `y` is false, the expression evaluates to 2.
47+
- If `x` is false, the expression evaluates to 3.
2048

21-
Ternary operators can be nested for more complex conditional logic:
49+
Consider a home builder with a budget of $3.50/board-foot to purchase hardwood lumber. The builder would like to know what types of wood are within their budget. Nested ternary operators can create `yes` and `no` values based on whether or not a type of wood meets this requirement.
50+
51+
In this example, the `Possible` column evaluates to `yes` only if the wood is both hardwood and the price is less than $3.50. Otherwise, the wood is not offered as a possibility for the customer.
2252

2353
```groovy test-set=1 order=woods,result
2454
woods = newTable(
@@ -27,25 +57,30 @@ woods = newTable(
2757
doubleCol("Price", 1.95, 2.50, 3.25, 3.45, 4.25, 7.95, 4.10, 5.25)
2858
)
2959
30-
result = woods.update("Category = (Hardness == `hard`) ? ((Price <= 3.50) ? `budget` : `expensive`) : `softwood`")
60+
result = woods.update("Possible = (Hardness == `hard`) ? ((Price <= 3.50) ? `yes` : `no`) : `no`")
61+
```
62+
63+
If hardwood is a requirement but the budget is flexible, nested ternary-ifs can be used to categorize hardwoods as `budget` or `expensive` and all other wood types as `no`. This is seen below:
64+
65+
```groovy test-set=1
66+
result = woods.update("possible = (Hardness == `hard`) ? ((Price <= 3.50) ? `budget` : `expensive`) : `no`")
3167
```
3268

3369
## Using custom methods
3470

35-
When using custom methods as conditions, [cast](./casting.md) the result to `(Boolean)`:
71+
Using a function in a ternary statement is very straightforward. All you need to do is replace the `condition` with the function call. The method _must_ return a `(Boolean)` value.
3672

37-
```groovy order=woods,result
38-
budget = { price -> price <= 3.50 }
73+
The following example uses a function in a ternary operator to determine if the wood flooring options are in the budget.
3974

40-
woods = newTable(
41-
stringCol("Type", "Pine", "Fir", "Cedar", "Oak", "Ash", "Walnut", "Beech", "Cherry"),
42-
doubleCol("Price", 1.95, 2.50, 3.25, 3.45, 4.25, 7.95, 4.10, 5.25)
43-
)
75+
```groovy test-set=1
76+
budget = { price -> price <= 3.50 }
4477
4578
result = woods.update("Budget = (Boolean)budget(Price) ? `yes` : `no`")
4679
```
4780

4881
## Related documentation
4982

83+
- [Operators](./operators.md)
84+
- [`new_table`](../reference/table-operations/create/newTable.md)
85+
- [`update`](../reference/table-operations/select/update.md)
5086
- [Query string overview](./query-string-overview.md)
51-
- [Create a new table](./new-and-empty-table.md#newtable)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"file":"how-to-guides/ternary-if-how-to.md","objects":{"result":{"type":"Table","data":{"columns":[{"name":"Type","type":"java.lang.String"},{"name":"Hardness","type":"java.lang.String"},{"name":"Price","type":"double"},{"name":"Budget","type":"java.lang.String"}],"rows":[[{"value":"Pine"},{"value":"soft"},{"value":"1.9500"},{"value":"yes"}],[{"value":"Fir"},{"value":"soft"},{"value":"2.5000"},{"value":"yes"}],[{"value":"Cedar"},{"value":"soft"},{"value":"3.2500"},{"value":"yes"}],[{"value":"Oak"},{"value":"hard"},{"value":"3.4500"},{"value":"yes"}],[{"value":"Ash"},{"value":"hard"},{"value":"4.2500"},{"value":"no"}],[{"value":"Walnut"},{"value":"hard"},{"value":"7.9500"},{"value":"no"}],[{"value":"Beech"},{"value":"hard"},{"value":"4.1000"},{"value":"no"}],[{"value":"Cherry"},{"value":"hard"},{"value":"5.2500"},{"value":"no"}]]}}}}

docs/groovy/snapshots/5c652ea4a33beef5f45cd4f5410958da.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/groovy/snapshots/996bd94985c7585ed16008d3845ef0f9.json renamed to docs/groovy/snapshots/81e850d235e0c8facda7ed20cd058c8e.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"file":"how-to-guides/ternary-if-how-to.md","objects":{"woods":{"type":"Table","data":{"columns":[{"name":"Type","type":"java.lang.String"},{"name":"Hardness","type":"java.lang.String"},{"name":"Price","type":"double"}],"rows":[[{"value":"Pine"},{"value":"soft"},{"value":"1.9500"}],[{"value":"Fir"},{"value":"soft"},{"value":"2.5000"}],[{"value":"Cedar"},{"value":"soft"},{"value":"3.2500"}],[{"value":"Oak"},{"value":"hard"},{"value":"3.4500"}],[{"value":"Ash"},{"value":"hard"},{"value":"4.2500"}],[{"value":"Walnut"},{"value":"hard"},{"value":"7.9500"}],[{"value":"Beech"},{"value":"hard"},{"value":"4.1000"}],[{"value":"Cherry"},{"value":"hard"},{"value":"5.2500"}]]}},"result":{"type":"Table","data":{"columns":[{"name":"Type","type":"java.lang.String"},{"name":"Hardness","type":"java.lang.String"},{"name":"Price","type":"double"},{"name":"Category","type":"java.lang.String"}],"rows":[[{"value":"Pine"},{"value":"soft"},{"value":"1.9500"},{"value":"softwood"}],[{"value":"Fir"},{"value":"soft"},{"value":"2.5000"},{"value":"softwood"}],[{"value":"Cedar"},{"value":"soft"},{"value":"3.2500"},{"value":"softwood"}],[{"value":"Oak"},{"value":"hard"},{"value":"3.4500"},{"value":"budget"}],[{"value":"Ash"},{"value":"hard"},{"value":"4.2500"},{"value":"expensive"}],[{"value":"Walnut"},{"value":"hard"},{"value":"7.9500"},{"value":"expensive"}],[{"value":"Beech"},{"value":"hard"},{"value":"4.1000"},{"value":"expensive"}],[{"value":"Cherry"},{"value":"hard"},{"value":"5.2500"},{"value":"expensive"}]]}}}}
1+
{"file":"how-to-guides/ternary-if-how-to.md","objects":{"woods":{"type":"Table","data":{"columns":[{"name":"Type","type":"java.lang.String"},{"name":"Hardness","type":"java.lang.String"},{"name":"Price","type":"double"}],"rows":[[{"value":"Pine"},{"value":"soft"},{"value":"1.9500"}],[{"value":"Fir"},{"value":"soft"},{"value":"2.5000"}],[{"value":"Cedar"},{"value":"soft"},{"value":"3.2500"}],[{"value":"Oak"},{"value":"hard"},{"value":"3.4500"}],[{"value":"Ash"},{"value":"hard"},{"value":"4.2500"}],[{"value":"Walnut"},{"value":"hard"},{"value":"7.9500"}],[{"value":"Beech"},{"value":"hard"},{"value":"4.1000"}],[{"value":"Cherry"},{"value":"hard"},{"value":"5.2500"}]]}},"result":{"type":"Table","data":{"columns":[{"name":"Type","type":"java.lang.String"},{"name":"Hardness","type":"java.lang.String"},{"name":"Price","type":"double"},{"name":"Possible","type":"java.lang.String"}],"rows":[[{"value":"Pine"},{"value":"soft"},{"value":"1.9500"},{"value":"no"}],[{"value":"Fir"},{"value":"soft"},{"value":"2.5000"},{"value":"no"}],[{"value":"Cedar"},{"value":"soft"},{"value":"3.2500"},{"value":"no"}],[{"value":"Oak"},{"value":"hard"},{"value":"3.4500"},{"value":"yes"}],[{"value":"Ash"},{"value":"hard"},{"value":"4.2500"},{"value":"no"}],[{"value":"Walnut"},{"value":"hard"},{"value":"7.9500"},{"value":"no"}],[{"value":"Beech"},{"value":"hard"},{"value":"4.1000"},{"value":"no"}],[{"value":"Cherry"},{"value":"hard"},{"value":"5.2500"},{"value":"no"}]]}}}}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"file":"how-to-guides/ternary-if-how-to.md","objects":{"result":{"type":"Table","data":{"columns":[{"name":"Type","type":"java.lang.String"},{"name":"Hardness","type":"java.lang.String"},{"name":"Price","type":"double"},{"name":"possible","type":"java.lang.String"}],"rows":[[{"value":"Pine"},{"value":"soft"},{"value":"1.9500"},{"value":"no"}],[{"value":"Fir"},{"value":"soft"},{"value":"2.5000"},{"value":"no"}],[{"value":"Cedar"},{"value":"soft"},{"value":"3.2500"},{"value":"no"}],[{"value":"Oak"},{"value":"hard"},{"value":"3.4500"},{"value":"budget"}],[{"value":"Ash"},{"value":"hard"},{"value":"4.2500"},{"value":"expensive"}],[{"value":"Walnut"},{"value":"hard"},{"value":"7.9500"},{"value":"expensive"}],[{"value":"Beech"},{"value":"hard"},{"value":"4.1000"},{"value":"expensive"}],[{"value":"Cherry"},{"value":"hard"},{"value":"5.2500"},{"value":"expensive"}]]}}}}

docs/python/conceptual/query-table-configuration.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ The `QueryTable` has the following user-configurable properties:
3434
| [Ungroup operations](#ungroup-operations) | `QueryTable.minimumUngroupBase` | 10 |
3535
| [SoftRecycler configuration](#softrecycler-configuration) | `array.recycler.capacity.*` | 1024 |
3636
| [SoftRecycler configuration](#softrecycler-configuration) | `sparsearray.recycler.capacity.*` | 1024 |
37-
| [Stateless filters by default](#stateless-by-default-experimental) | `QueryTable.statelessFiltersByDefault` | false |
37+
| [Stateless filters by default](#stateless-by-default) | `QueryTable.statelessFiltersByDefault` | false |
3838

3939
Each property is described below, roughly categorized by similarity.
4040

@@ -204,15 +204,13 @@ The recycler capacity determines how many array blocks are kept in memory for po
204204
- **High throughput environments**: Consider increasing capacities to reduce allocation/deallocation overhead.
205205
- **Type-specific tuning**: If certain types are used more frequently, you can increase their capacity while reducing others.
206206

207-
## Stateless by default (experimental)
207+
## Stateless by default
208208

209-
In a future release of Deephaven, the flags in this category will change from a default of false to a default of true. These flags enable the engine to assume more often that a given Filter or Selectable can be executed in parallel (unless the Filter or Selectable is [marked serial or has barriers](./query-engine/parallelization.md#controlling-concurrency-for-select-update-and-where) interface).
210-
211-
This is experimental; more details can be learned by reading the Javadoc on io.deephaven.api.ConcurrencyControl.
209+
These flags enable the engine to assume more often that a given Filter or Selectable can be executed in parallel (unless the Filter or Selectable is [marked serial or has barriers](./query-engine/parallelization.md#controlling-concurrency-for-select-update-and-where) interface).
212210

213211
| Property Name | Default Value | Description |
214212
| -------------------------------------- | ------------- | --------------------------------------------------------------------------------------------------- |
215-
| `QueryTable.statelessFiltersByDefault` | false | Enables the engine to assume that filters are stateless by default, allowing for more optimizations |
213+
| `QueryTable.statelessFiltersByDefault` | true | Enables the engine to assume that filters are stateless by default, allowing for more optimizations |
216214

217215
## Related documentation
218216

docs/python/getting-started/crash-course/query-strings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Deephaven query strings are the primary way of expressing commands directly to t
77

88
## Syntax
99

10-
Query strings are just Python strings that get passed into table operations.
10+
Query strings are just Python strings that get passed into table operations. Deephaven **highly** recommends using double quotes to encapsulate query strings.
1111

1212
```python test-set=1
1313
from deephaven import empty_table

docs/python/how-to-guides/install-use-plugins.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ Client-side plugins extend the functionality of any of Deephaven's client APIs.
1212

1313
Other plugins may have both a server-side plugin and a client-side plugin. The [Pickle RPC plugin](https://github.com/deephaven-examples/plugin-python-rpc-pickle) is one such example. It allows a client to make RPC calls on a server.
1414

15+
> [!NOTE]
16+
> In some cases, you'll want to install packages rather than use plugins. Those instructions are covered in [How to install packages](./install-packages.md).
17+
>
18+
> To have _complete control_ of the build process, you can [Build and launch Deephaven from source code](../getting-started/launch-build.md).
19+
1520
This guide covers the installation and use of pre-built plugins. For information on building your own plugins, see [Create your own plugin](./create-plugins.md).
1621

1722
## Install a plugin

0 commit comments

Comments
 (0)