Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rust/datafusion/src/execution/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ impl ExecutionContext {
// create a query planner
let state = self.state.lock().unwrap().clone();
let query_planner = SqlToRel::new(&state);
Ok(query_planner.statement_to_plan(&statements[0])?)
query_planner.statement_to_plan(&statements[0])
}

/// Registers a variable provider within this context.
Expand Down
2 changes: 1 addition & 1 deletion rust/datafusion/src/physical_plan/functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ pub fn create_physical_expr(
BuiltinScalarFunction::DateTrunc => {
|args| Ok(Arc::new(datetime_expressions::date_trunc(args)?))
}
BuiltinScalarFunction::Array => |args| Ok(array_expressions::array(args)?),
BuiltinScalarFunction::Array => |args| array_expressions::array(args),
});
// coerce
let args = coerce(args, input_schema, &signature(fun))?;
Expand Down
2 changes: 1 addition & 1 deletion rust/parquet/src/arrow/arrow_reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ impl ArrowReader for ParquetFileArrowReader {
self.file_reader.clone(),
)?;

Ok(ParquetRecordBatchReader::try_new(batch_size, array_reader)?)
ParquetRecordBatchReader::try_new(batch_size, array_reader)
}
}

Expand Down
4 changes: 2 additions & 2 deletions rust/parquet/src/compression.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ mod brotli_codec {
BROTLI_DEFAULT_COMPRESSION_QUALITY,
BROTLI_DEFAULT_LG_WINDOW_SIZE,
);
encoder.write_all(&input_buf[..])?;
encoder.write_all(input_buf)?;
encoder.flush().map_err(|e| e.into())
}
}
Expand Down Expand Up @@ -308,7 +308,7 @@ mod zstd_codec {

fn compress(&mut self, input_buf: &[u8], output_buf: &mut Vec<u8>) -> Result<()> {
let mut encoder = zstd::Encoder::new(output_buf, ZSTD_COMPRESSION_LEVEL)?;
encoder.write_all(&input_buf[..])?;
encoder.write_all(input_buf)?;
match encoder.finish() {
Ok(_) => Ok(()),
Err(e) => Err(e.into()),
Expand Down
4 changes: 2 additions & 2 deletions rust/parquet/src/encodings/decoding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -995,7 +995,7 @@ mod tests {
let mut decoder: PlainDecoder<T> = PlainDecoder::new(type_length);
let result = decoder.set_data(data, num_values);
assert!(result.is_ok());
let result = decoder.get(&mut buffer[..]);
let result = decoder.get(buffer);
assert!(result.is_ok());
assert_eq!(decoder.values_left(), 0);
assert_eq!(buffer, expected);
Expand All @@ -1013,7 +1013,7 @@ mod tests {
let mut decoder: PlainDecoder<T> = PlainDecoder::new(type_length);
let result = decoder.set_data(data, num_values);
assert!(result.is_ok());
let result = decoder.get_spaced(&mut buffer[..], num_nulls, valid_bits);
let result = decoder.get_spaced(buffer, num_nulls, valid_bits);
assert!(result.is_ok());
assert_eq!(num_values + num_nulls, result.unwrap());
assert_eq!(decoder.values_left(), 0);
Expand Down
2 changes: 1 addition & 1 deletion rust/parquet/src/schema/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ impl<'a> Parser<'a> {
if let Some(id) = id {
builder = builder.with_id(id);
}
Ok(builder.build()?)
builder.build()
}
}

Expand Down