Skip to content

Commit

Permalink
roll back added validation for now
Browse files Browse the repository at this point in the history
  • Loading branch information
bkietz committed Sep 5, 2024
1 parent c80b399 commit 3dca647
Showing 1 changed file with 1 addition and 20 deletions.
21 changes: 1 addition & 20 deletions arrow-integration-testing/src/bin/arrow-json-integration-test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,12 @@
// under the License.

use arrow::error::{ArrowError, Result};
use arrow::ipc::reader::{FileReader, StreamReader};
use arrow::ipc::reader::FileReader;
use arrow::ipc::writer::FileWriter;
use arrow_integration_test::*;
use arrow_integration_testing::{canonicalize_schema, open_json_file};
use clap::Parser;
use std::fs::File;
use std::io::{Seek, SeekFrom};

#[derive(clap::ValueEnum, Debug, Clone)]
#[clap(rename_all = "SCREAMING_SNAKE_CASE")]
Expand Down Expand Up @@ -180,23 +179,5 @@ fn validate(arrow_name: &str, json_name: &str, verbose: bool) -> Result<()> {
));
}

let mut arrow_file = File::open(arrow_name)?;

arrow_file.seek(SeekFrom::Start(8))?;
let arrow_stream_reader = StreamReader::try_new(arrow_file, None)?;

if canonicalize_schema(&json_file.schema) != canonicalize_schema(&arrow_stream_reader.schema())
{
return Err(ArrowError::ComputeError(format!(
"Schemas do not match. JSON: {:?}. Embedded stream: {:?}",
json_file.schema,
arrow_stream_reader.schema()
)));
}

for batch in arrow_stream_reader {
let _ = batch?;
}

Ok(())
}

0 comments on commit 3dca647

Please sign in to comment.