Skip to content

Commit

Permalink
Update function description
Browse files Browse the repository at this point in the history
  • Loading branch information
ektravel committed Dec 8, 2023
1 parent 2d93ebe commit 6f928ce
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 38 deletions.
2 changes: 1 addition & 1 deletion docs/querying/sql-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ Rounds down a timestamp by a given time unit.

**Function type:** [Scalar, other](sql-scalar.md#other-scalar-functions)

Decodes a Base64-encoded string into a [complex type](sql-scalar.md#complex-type-names), where `dataType` represents the complex type and `expr` is the Base64-encoded string to decode.
Decodes a Base64-encoded string into a complex data type, where `dataType` is the complex data type and `expr` is the Base64-encoded string to decode.

## DECODE_BASE64_UTF8

Expand Down
39 changes: 2 additions & 37 deletions docs/querying/sql-scalar.md
Original file line number Diff line number Diff line change
Expand Up @@ -274,41 +274,6 @@ The [DataSketches extension](../development/extensions-core/datasketches-extensi
|`CASE WHEN boolean_expr1 THEN result1 \[ WHEN boolean_expr2 THEN result2 ... \] \[ ELSE resultN \] END`|Searched CASE.|
|`CAST(value AS TYPE)`|Cast value to another type. See [Data types](sql-data-types.md) for details about how Druid SQL handles CAST.|
|`COALESCE(value1, value2, ...)`|Returns the first value that is neither NULL nor empty string.|
|`DECODE_BASE64_COMPLEX(dataType, expr)`| Decodes a Base64-encoded string into a [complex type](sql-scalar.md#complex-type-names), where `dataType` represents the complex type and `expr` is the Base64-encoded string to decode.|
|`DECODE_BASE64_COMPLEX(dataType, expr)`| Decodes a Base64-encoded string into a complex data type, where `dataType` is the complex data type and `expr` is the Base64-encoded string to decode. The `hyperUnique` and `serializablePairLongString` data types are supported by default. You can enable support for the following complex data types by loading their extensions:<br/><ul><li>`druid-bloom-filter`: `bloom`</li><li>`druid-datasketches`: `arrayOfDoublesSketch`, `HLLSketch`, `KllDoublesSketch`, `KllFloatsSketch`, `quantilesDoublesSketch`, `thetaSketch`</li><li>`druid-histogram`: `approximateHistogram`, `fixedBucketsHistogram`</li><li>`druid-stats`: `variance`</li><li>`druid-compressed-big-decimal`: `compressedBigDecimal`</li><li>`druid-momentsketch`: `momentSketch`</li><li>`druid-tdigestsketch`: `tDigestSketch`</li></ul>|
|`NULLIF(value1, value2)`|Returns NULL if `value1` and `value2` match, else returns `value1`.|
|`NVL(value1, value2)`|Returns `value1` if `value1` is not null, otherwise `value2`.|

### Complex type names

The `DECODE_BASE64_COMPLEX` function accepts the following complex type names as arguments for the `dataType` parameter:

Built-in:
* `hyperUnique`
* `serializablePairLongString`

Bloom filter:
* `bloom`

DataSketches:
* `arrayOfDoublesSketch`
* `HLLSketch`
* `KllDoublesSketch`
* `KllFloatsSketch`
* `quantilesDoublesSketch`
* `thetaSketch`

Histogram:
* `approximateHistogram`
* `fixedBucketsHistogram`

Stats:
* `variance`

Compressed big decimal:
* `compressedBigDecimal`

Moment sketch:
* `momentSketch`

T-digest sketch:
* `tDigestSketch`
|`NVL(value1, value2)`|Returns `value1` if `value1` is not null, otherwise `value2`.|

0 comments on commit 6f928ce

Please sign in to comment.