Skip to content

Commit f6c29e5

Browse files
committed
Allow deprecated functions
1 parent f296fab commit f6c29e5

File tree

4 files changed

+10
-2
lines changed

4 files changed

+10
-2
lines changed

datafusion/core/src/datasource/file_format/csv.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -770,7 +770,7 @@ mod tests {
770770
"c7: Int64",
771771
"c8: Int64",
772772
"c9: Int64",
773-
"c10: Int64",
773+
"c10: Utf8",
774774
"c11: Float64",
775775
"c12: Float64",
776776
"c13: Utf8"
@@ -906,7 +906,7 @@ mod tests {
906906
Field::new("c7", DataType::Int64, true),
907907
Field::new("c8", DataType::Int64, true),
908908
Field::new("c9", DataType::Int64, true),
909-
Field::new("c10", DataType::Int64, true),
909+
Field::new("c10", DataType::Utf8, true),
910910
Field::new("c11", DataType::Float64, true),
911911
Field::new("c12", DataType::Float64, true),
912912
Field::new("c13", DataType::Utf8, true),

datafusion/core/src/datasource/file_format/parquet.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ use parquet::arrow::arrow_writer::{
6969
use parquet::arrow::{
7070
arrow_to_parquet_schema, parquet_to_arrow_schema, AsyncArrowWriter,
7171
};
72+
#[allow(deprecated)]
7273
use parquet::file::footer::{decode_footer, decode_metadata};
7374
use parquet::file::metadata::{ParquetMetaData, RowGroupMetaData};
7475
use parquet::file::properties::WriterProperties;
@@ -448,6 +449,7 @@ pub async fn fetch_parquet_metadata(
448449
let mut footer = [0; 8];
449450
footer.copy_from_slice(&suffix[suffix_len - 8..suffix_len]);
450451

452+
#[allow(deprecated)]
451453
let length = decode_footer(&footer)?;
452454

453455
if meta.size < length + 8 {
@@ -470,10 +472,12 @@ pub async fn fetch_parquet_metadata(
470472
metadata.put(remaining_metadata.as_ref());
471473
metadata.put(&suffix[..suffix_len - 8]);
472474

475+
#[allow(deprecated)]
473476
Ok(decode_metadata(metadata.as_ref())?)
474477
} else {
475478
let metadata_start = meta.size - length - 8;
476479

480+
#[allow(deprecated)]
477481
Ok(decode_metadata(
478482
&suffix[metadata_start - footer_start..suffix_len - 8],
479483
)?)

datafusion/functions/src/regex/regexplike.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ fn regexp_like_func(args: &[ArrayRef]) -> Result<ArrayRef> {
158158
/// # }
159159
/// ```
160160
pub fn regexp_like<T: OffsetSizeTrait>(args: &[ArrayRef]) -> Result<ArrayRef> {
161+
#[allow(deprecated)]
161162
match args.len() {
162163
2 => {
163164
let values = as_generic_string_array::<T>(&args[0])?;

datafusion/physical-expr/src/expressions/binary.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ use crate::PhysicalExpr;
2727
use arrow::array::*;
2828
use arrow::compute::kernels::boolean::{and_kleene, not, or_kleene};
2929
use arrow::compute::kernels::cmp::*;
30+
#[allow(deprecated)]
3031
use arrow::compute::kernels::comparison::{
3132
regexp_is_match_utf8, regexp_is_match_utf8_scalar,
3233
};
@@ -147,6 +148,7 @@ fn boolean_op(
147148

148149
macro_rules! binary_string_array_flag_op {
149150
($LEFT:expr, $RIGHT:expr, $OP:ident, $NOT:expr, $FLAG:expr) => {{
151+
#[allow(deprecated)]
150152
match $LEFT.data_type() {
151153
DataType::Utf8View | DataType::Utf8 => {
152154
compute_utf8_flag_op!($LEFT, $RIGHT, $OP, StringArray, $NOT, $FLAG)
@@ -189,6 +191,7 @@ macro_rules! compute_utf8_flag_op {
189191

190192
macro_rules! binary_string_array_flag_op_scalar {
191193
($LEFT:expr, $RIGHT:expr, $OP:ident, $NOT:expr, $FLAG:expr) => {{
194+
#[allow(deprecated)]
192195
let result: Result<Arc<dyn Array>> = match $LEFT.data_type() {
193196
DataType::Utf8View | DataType::Utf8 => {
194197
compute_utf8_flag_op_scalar!($LEFT, $RIGHT, $OP, StringArray, $NOT, $FLAG)

0 commit comments

Comments
 (0)