Skip to content

Commit 1e8ddfa

Browse files
committed
Add new syntax example for arrow_cast
1 parent 0a0f53d commit 1e8ddfa

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

docs/source/user-guide/sql/data_types.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,18 @@ You can cast a SQL expression to a specific Arrow type using the `arrow_cast` fu
4141
For example, to cast the output of `now()` to a `Timestamp` with second precision:
4242

4343
```sql
44-
select arrow_cast(now(), 'Timestamp(Second, None)');
44+
select arrow_cast(now(), 'Timestamp(s)') as "now()";
45+
+---------------------+
46+
| now() |
47+
+---------------------+
48+
| 2025-10-24T20:02:45 |
49+
+---------------------+
50+
```
51+
52+
The older syntax still works as well:
53+
54+
```sql
55+
select arrow_cast(now(), 'Timestamp(Second, None)') as "now()";
4556
+---------------------+
4657
| now() |
4758
+---------------------+

0 commit comments

Comments
 (0)