Skip to content

Commit

Permalink
Hyper API August 2024 Release (#115)
Browse files Browse the repository at this point in the history
* Add release note about ICU update (#108)

* Adjust documentation for `EXPLAIN` (#111)

* docs: Add Release Notes for new array type (#114)

* Prepare the August 2024 release

---------

Co-authored-by: Axel Uhlig <[email protected]>
Co-authored-by: Axel Uhlig <[email protected]>
Co-authored-by: Adrian Vogelsgesang <[email protected]>
Co-authored-by: Lucas Wolf <[email protected]>
  • Loading branch information
5 people authored Aug 19, 2024
1 parent e486269 commit 80c932f
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 14 deletions.
9 changes: 9 additions & 0 deletions website/docs/releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,15 @@ In case you are wondering why all our releases start with `0.0`, read [this FAQ

:::

### 0.0.20027 [Aug 19 2024]

* Introduced new [`array` SQL datatypes](./sql/datatype/array.md).
* The options available for [EXPLAIN](sql/command/explain) changed:
* `EXPLAIN VERBOSE` was removed in favor of `EXPLAIN (FORMAT JSON)`
* There are two new output formats `EXPLAIN (FORMAT TERSE_JSON)` and `EXPLAIN (FORMAT SCHEMA)`
* Update Unicode support from Unicode 14.0 to 15.1
* Update Hyper's collation tables from CLDR 71 to CLDR 74. Besides corrections this also adds new collations to Hyper.

### 0.0.19691 [July 4, 2024]

* Hyper API is now available under the Apache 2.0 license.
Expand Down
28 changes: 15 additions & 13 deletions website/docs/sql/command/explain.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@

```sql_template
EXPLAIN (<option>, ...) <query>;
EXPLAIN [VERBOSE] [ANALYZE] <query>;
```

where the available `<option>`s are

```sql_template
FORMAT <format>
VERBOSE
ANALYZE
OPTIMIZERSTEPS
Expand All @@ -26,23 +26,25 @@ Don't expect query plans (neither their formatting nor their semantics) to be st
:::


This command retrieves the query plan which Hyper uses to execute the given query.
The `EXPLAIN` command retrieves information about the query plan which Hyper uses to execute the given query.
The query plan describes which tables are accessed in which order, how they are joined together, which expressions are evaluated and all other details of query execution.

One or more `<option>`s can be provided to change which information is displayed and how it is displayed.
In general, options are provided within parentheses after the `EXPLAIN` keyword.
In addition, `VERBOSE` and `ANALYZE` can also be provided without parentheses.

There are three types of plans which can be queried:
`EXPLAIN` can provide the following types of information:

* The *optimized plan*. By default, if no other behavior is requested through an `<option>`, `EXPLAIN` will display the optimized plan.
* The *optimizer steps*. If the `OPTIMIZERSTEPS` option is present, Hyper will output the plan at multiple intermediate steps during query optimization, e.g., before and after join reordering.
* The *analyzed plan*. When invoked with the `ANALYZE` option, Hyper will actually execute the query, including all side effects (inserted/deleted tuples, etc.). Instead of the normal query results, you will however receive the query plan of the query, annotated with runtime statistics such as the number of tuples processed by each operator.
* The *result schema*. With the `FORMAT SCHEMA`, only the list of result columns and their types are returned. The actual query plan is not printed.

The `FORMAT` option determines the formatting of the returned data. The availble options are:
* `TEXT_TREE`: a tree-like representation of the query plan as ASCII art. To be viewed using a monospaced font.
* `JSON`: output the plan as pretty-printed JSON.
* `TERSE_JSON`: output the plan as JSON without pretty-printing.
* `SCHEMA`: only print a list of the returned columns. Don't actually print information about the joins, table scans, etc.

By default, plans are formatted as ASCII art.
The ASCII art is useful for quickly grasping the overall query structure, but is lacking details, such as the exact join conditions.
Those details are present in the JSON output format, which can be requested using the `VERBOSE` option.
The `VERBOSE` option can be combined with any other choice.
By default, plans are formatted as ASCII art trees.
The ASCII art representation is useful for quickly grasping the overall query structure, but is lacking details, such as the exact join conditions.
Those details are present in the JSON output format, which can be requested using the `FORMAT JSON` option.
To visualize a JSON query plan and interactively explore it, copy-paste the plan into [Hyper's Plan Viewer](https://tableau.github.io/query-graphs/).

## Examples
Expand Down Expand Up @@ -71,10 +73,10 @@ WHERE l_shipdate >= date '1994-01-01'
AND l_quantity < 24
```

If we want to view the plan in a graphical plan viewer, or want to see additional details in the plan, we can use the `VERBOSE` option and then copy-paste the resulting JSON into [Hyper's Plan Viewer](https://tableau.github.io/query-graphs/).
If we want to view the plan in a graphical plan viewer, or want to see additional details in the plan, we can use the `FORMAT JSON` option and then copy-paste the resulting JSON into [Hyper's Plan Viewer](https://tableau.github.io/query-graphs/).

```
EXPLAIN (VERBOSE, OPTIMIZERSTEPS)
EXPLAIN (FORMAT JSON, OPTIMIZERSTEPS)
SELECT sum(l_extendedprice * l_discount) as revenue
FROM lineitem
WHERE l_shipdate >= date '1994-01-01'
Expand Down
2 changes: 1 addition & 1 deletion website/src/config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const version_long = '0.0.19691.r2d7e5bc8';
const version_long = '0.0.20027.rcc745c2c';
const version_short = version_long.substr(0, version_long.lastIndexOf('.'));

const downloadBaseUrl = 'https://downloads.tableau.com/tssoftware/';
Expand Down

0 comments on commit 80c932f

Please sign in to comment.