Skip to content

Commit

Permalink
Merge pull request #4405 from szarnyasg/iss4404
Browse files Browse the repository at this point in the history
Fix: casted -> cast
  • Loading branch information
szarnyasg authored Dec 18, 2024
2 parents 887b289 + 995d71d commit 2b0bde9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/data/json/json_type.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ DuckDB supports `json` via the `JSON` logical type.
The `JSON` logical type is interpreted as JSON, i.e., parsed, in JSON functions rather than interpreted as `VARCHAR`, i.e., a regular string (modulo the equality-comparison caveat at the bottom of this page).
All JSON creation functions return values of this type.

We also allow any of DuckDB's types to be casted to JSON, and JSON to be casted back to any of DuckDB's types, for example, to cast `JSON` to DuckDB's `STRUCT` type, run:
We also allow any of DuckDB's types to be cast to JSON, and JSON to be cast back to any of DuckDB's types, for example, to cast `JSON` to DuckDB's `STRUCT` type, run:

```sql
SELECT '{"duck": 42}'::JSON::STRUCT(duck INTEGER);
Expand Down
2 changes: 1 addition & 1 deletion docs/sql/data_types/typecasting.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Explicit typecasting is performed by using a `CAST` expression. For example, `CA

## Implicit Casting

In many situations, the system will add casts by itself. This is called *implicit* casting and happens, for example, when a function is called with an argument that does not match the type of the function but can be casted to the required type.
In many situations, the system will add casts by itself. This is called *implicit* casting and happens, for example, when a function is called with an argument that does not match the type of the function but can be cast to the required type.

Implicit casts can only be added for a number of type combinations, and is generally only possible when the cast cannot fail. For example, an implicit cast can be added from `INTEGER` to `DOUBLE` – but not from `DOUBLE` to `INTEGER`.

Expand Down

0 comments on commit 2b0bde9

Please sign in to comment.