Skip to content

Commit

Permalink
docs: fix rendering (apache#15835)
Browse files Browse the repository at this point in the history
  • Loading branch information
317brian authored Feb 6, 2024
1 parent 54b3064 commit 2dc71c7
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions docs/querying/sql-data-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,14 @@ The following table describes how Druid maps SQL types onto native types when ru
|ARRAY|ARRAY|`NULL`|Druid native array types work as SQL arrays, and multi-value strings can be converted to arrays. See [Arrays](#arrays) for more information.|
|OTHER|COMPLEX|none|May represent various Druid column types such as hyperUnique, approxHistogram, etc.|

<sup>*</sup> The default value is `NULL` for all types, except in legacy mode (`druid.generic.useDefaultValueForNull = true`) which initialize a default value.
<sup>*</sup>
The default value is <code>NULL</code> for all types, except in legacy mode (<code>druid.generic.useDefaultValueForNull = true</code>) which initialize a default value.
<br /><br />
For casts between two SQL types, the behavior depends on the runtime type:

Casts between two SQL types with the same Druid runtime type have no effect other than the exceptions noted in the table.
* Casts between two SQL types with the same Druid runtime type have no effect other than the exceptions noted in the table.

Casts between two SQL types that have different Druid runtime types generate a runtime cast in Druid.
* Casts between two SQL types that have different Druid runtime types generate a runtime cast in Druid.

If a value cannot be cast to the target type, as in `CAST('foo' AS BIGINT)`, Druid a substitutes [NULL](#null-values).
When `druid.generic.useDefaultValueForNull = true` (legacy mode), Druid instead substitutes a default value, including when NULL values cast to non-nullable types. For example, if `druid.generic.useDefaultValueForNull = true`, a null VARCHAR cast to BIGINT is converted to a zero.
Expand Down

0 comments on commit 2dc71c7

Please sign in to comment.