Skip to content

Conversation

@alamb
Copy link
Contributor

@alamb alamb commented Oct 1, 2023

Which issue does this PR close?

Closes #7714

Rationale for this change

I would like to have avro support when testing with datafusion-cli

What changes are included in this PR?

  1. Enable avro support in datafusion-cli
  2. Fix typo in Cargo.toml

Are these changes tested?

I tested manually:

Before change:

alamb@MacBook-Pro-8:~/Software/arrow-datafusion$ ./datafusion-cli/target/debug/datafusion-cli -c "select * from './testing/data/avro/alltypes_plain.avro';"
DataFusion CLI v31.0.0
Error during planning: table 'datafusion.public../testing/data/avro/alltypes_plain.avro' not found

After change:

alamb@MacBook-Pro-8:~/Software/arrow-datafusion$ ./datafusion-cli/target/debug/datafusion-cli -c "select * from './testing/data/avro/alltypes_plain.avro';"
DataFusion CLI v31.0.0
+----+----------+-------------+--------------+---------+------------+-----------+------------+------------------+------------+---------------------+
| id | bool_col | tinyint_col | smallint_col | int_col | bigint_col | float_col | double_col | date_string_col  | string_col | timestamp_col       |
+----+----------+-------------+--------------+---------+------------+-----------+------------+------------------+------------+---------------------+
| 4  | true     | 0           | 0            | 0       | 0          | 0.0       | 0.0        | 30332f30312f3039 | 30         | 2009-03-01T00:00:00 |
| 5  | false    | 1           | 1            | 1       | 10         | 1.1       | 10.1       | 30332f30312f3039 | 31         | 2009-03-01T00:01:00 |
| 6  | true     | 0           | 0            | 0       | 0          | 0.0       | 0.0        | 30342f30312f3039 | 30         | 2009-04-01T00:00:00 |
| 7  | false    | 1           | 1            | 1       | 10         | 1.1       | 10.1       | 30342f30312f3039 | 31         | 2009-04-01T00:01:00 |
| 2  | true     | 0           | 0            | 0       | 0          | 0.0       | 0.0        | 30322f30312f3039 | 30         | 2009-02-01T00:00:00 |
| 3  | false    | 1           | 1            | 1       | 10         | 1.1       | 10.1       | 30322f30312f3039 | 31         | 2009-02-01T00:01:00 |
| 0  | true     | 0           | 0            | 0       | 0          | 0.0       | 0.0        | 30312f30312f3039 | 30         | 2009-01-01T00:00:00 |
| 1  | false    | 1           | 1            | 1       | 10         | 1.1       | 10.1       | 30312f30312f3039 | 31         | 2009-01-01T00:01:00 |
+----+----------+-------------+--------------+---------+------------+-----------+------------+------------------+------------+---------------------+
8 rows in set. Query took 0.009 seconds.

Are there any user-facing changes?

@github-actions github-actions bot added the core Core DataFusion crate label Oct 1, 2023
@sarutak
Copy link
Member

sarutak commented Oct 1, 2023

@alamb
This looks good to me.
Thank you for enabling Avro for datafusion-cli by default!
I usually enabled the feature by --features datafusion/avro.

@alamb alamb requested a review from andygrove October 2, 2023 10:36
@alamb
Copy link
Contributor Author

alamb commented Oct 3, 2023

Thank you for the review @yjshen

@alamb alamb merged commit 872fd16 into apache:main Oct 3, 2023
Ted-Jiang pushed a commit to Ted-Jiang/arrow-datafusion that referenced this pull request Oct 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Core DataFusion crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enable avro feature in datafusion-cli

3 participants