Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minor: Update data type support documentation #4984

Merged
merged 2 commits into from
Jan 20, 2023

Conversation

alamb
Copy link
Contributor

@alamb alamb commented Jan 19, 2023

Which issue does this PR close?

N/A

Rationale for this change

https://arrow.apache.org/datafusion/user-guide/sql/data_types.html is out of date, as we discovered while working on docs for IOx: influxdata/docs-v2#4700

What changes are included in this PR?

  1. Update supported type
  2. Add note about arrow_typeof function

Are these changes tested?

N/A (they are docs)

Are there any user-facing changes?

Yes, docs

| `DATE` | `Date32` |
| `TIME` | `Time64(TimeUnit::Nanosecond)` |
| `TIMESTAMP` | `Timestamp(TimeUnit::Nanosecond, None)` |
| `INTERVAL` | `Interval(IntervalUnit::YearMonth)` or `Interval(IntervalUnit::DayTime)` |
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Intervals work great:

select now() + interval '1 minute';
+----------------------------------+
| now() + IntervalDayTime("60000") |
+----------------------------------+
| 2023-01-19T14:30:03.656542+00:00 |
+----------------------------------+select arrow_typeof(interval '1 month');
+-------------------------------------+
| arrowtypeof(IntervalYearMonth("1")) |
+-------------------------------------+
| Interval(YearMonth)                 |
+-------------------------------------+
1 row in set. Query took 0.006 seconds.
❯ select arrow_typeof(interval '1 second');
+--------------------------------------+
| arrowtypeof(IntervalDayTime("1000")) |
+--------------------------------------+
| Interval(DayTime)                    |
+--------------------------------------+

## Character Types

| SQL DataType | Arrow DataType |
| ------------ | -------------- |
| `CHAR` | `Utf8` |
| `VARCHAR` | `Utf8` |
| `TEXT` | `Utf8` |
| `STRING` | `Utf8` |
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❯ create table foo (x string) as select 'foo';
0 rows in set. Query took 0.003 seconds.

@@ -42,8 +42,7 @@ jobs:
node-version: "14"
- name: Prettier check
run: |
# if you encounter error, try rerun the command below with --write instead of --check
# and commit the changes
# if you encounter error, rerun the command below and commit the changes
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

driveby cleanup (the command below actually uses --write rather than --check already

@xudong963 xudong963 merged commit 03601be into apache:master Jan 20, 2023
@ursabot
Copy link

ursabot commented Jan 20, 2023

Benchmark runs are scheduled for baseline = 5dd5ffd and contender = 03601be. 03601be is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
Conbench compare runs links:
[Skipped ⚠️ Benchmarking of arrow-datafusion-commits is not supported on ec2-t3-xlarge-us-east-2] ec2-t3-xlarge-us-east-2
[Skipped ⚠️ Benchmarking of arrow-datafusion-commits is not supported on test-mac-arm] test-mac-arm
[Skipped ⚠️ Benchmarking of arrow-datafusion-commits is not supported on ursa-i9-9960x] ursa-i9-9960x
[Skipped ⚠️ Benchmarking of arrow-datafusion-commits is not supported on ursa-thinkcentre-m75q] ursa-thinkcentre-m75q
Buildkite builds:
Supported benchmarks:
ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
test-mac-arm: Supported benchmark langs: C++, Python, R
ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java

@alamb alamb deleted the alamb/update_type_docs branch July 26, 2024 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants