Skip to content

Commit

Permalink
Merge branch 'main' into one-file-option
Browse files Browse the repository at this point in the history
  • Loading branch information
andygrove authored Feb 19, 2024
2 parents a2f2ed6 + acfedf3 commit ff70117
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 23 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Rust

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

env:
CARGO_TERM_COLOR: always

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ comfy-table = "6.1.2"
datafusion = { version = "35.0", features = ["avro"] }
structopt = "0.3"
tokio = { version = "1.36", features = ["rt-multi-thread"] }
tokio = "1.19"
thiserror = "1"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ $ cat /path/to/output.json
### View Parquet File Metadata

```bash
$ bdt --view-parquet-meta /mnt/bigdata/tpcds/sf100-parquet/store_sales.parquet/part-00000-cff04137-32a6-4e5b-811a-668f5d4b1802-c000.snappy.parquet
$ bdt view-parquet-meta /mnt/bigdata/tpcds/sf100-parquet/store_sales.parquet/part-00000-cff04137-32a6-4e5b-811a-668f5d4b1802-c000.snappy.parquet
+------------+----------------------------------------------------------------------------+
| Key | Value |
Expand Down
30 changes: 8 additions & 22 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,16 @@ pub mod convert;
pub mod parquet;
pub mod utils;

#[derive(Debug)]
#[derive(Debug, thiserror::Error)]
pub enum Error {
#[error("{0}")]
General(String),
DataFusion(DataFusionError),
Parquet(ParquetError),
IoError(std::io::Error),
}

impl From<DataFusionError> for Error {
fn from(e: DataFusionError) -> Self {
Self::DataFusion(e)
}
}

impl From<ParquetError> for Error {
fn from(e: ParquetError) -> Self {
Self::Parquet(e)
}
}

impl From<std::io::Error> for Error {
fn from(e: std::io::Error) -> Self {
Self::IoError(e)
}
#[error("Data Fusion error: {0}")]
DataFusion(#[from] DataFusionError),
#[error("Parquet error: {0}")]
Parquet(#[from] ParquetError),
#[error("I/O error: {0}")]
IoError(#[from] std::io::Error),
}

#[derive(Debug)]
Expand Down

0 comments on commit ff70117

Please sign in to comment.