Skip to content

Commit

Permalink
fix fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
goldmedal committed Nov 27, 2024
1 parent 5769c31 commit a7df53f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 17 deletions.
15 changes: 3 additions & 12 deletions wren-core/core/src/mdl/function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,7 @@ impl ByPassScalarUDF {
name: name.to_string(),
return_type,
signature: Signature::one_of(
vec![
TypeSignature::VariadicAny,
TypeSignature::NullAry,
],
vec![TypeSignature::VariadicAny, TypeSignature::NullAry],
Volatility::Volatile,
),
}
Expand Down Expand Up @@ -118,10 +115,7 @@ impl ByPassAggregateUDF {
name: name.to_string(),
return_type,
signature: Signature::one_of(
vec![
TypeSignature::VariadicAny,
TypeSignature::NullAry,
],
vec![TypeSignature::VariadicAny, TypeSignature::NullAry],
Volatility::Volatile,
),
}
Expand Down Expand Up @@ -165,10 +159,7 @@ impl ByPassWindowFunction {
name: name.to_string(),
return_type,
signature: Signature::one_of(
vec![
TypeSignature::VariadicAny,
TypeSignature::NullAry,
],
vec![TypeSignature::VariadicAny, TypeSignature::NullAry],
Volatility::Volatile,
),
}
Expand Down
13 changes: 8 additions & 5 deletions wren-core/core/src/mdl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,9 @@ mod test {
use crate::mdl::function::RemoteFunction;
use crate::mdl::manifest::Manifest;
use crate::mdl::{self, transform_sql_with_ctx, AnalyzedWrenMDL};
use datafusion::arrow::array::{ArrayRef, Int64Array, RecordBatch, StringArray, TimestampNanosecondArray};
use datafusion::arrow::array::{
ArrayRef, Int64Array, RecordBatch, StringArray, TimestampNanosecondArray,
};
use datafusion::assert_batches_eq;
use datafusion::common::not_impl_err;
use datafusion::common::Result;
Expand Down Expand Up @@ -1136,7 +1138,8 @@ mod test {
ColumnBuilder::new(
"struct_array_col",
"array<struct<float_field float,time_field timestamp>>",
).build(),
)
.build(),
)
.build(),
)
Expand All @@ -1149,9 +1152,9 @@ mod test {
(SELECT struct_table.struct_col FROM (SELECT struct_table.struct_col AS struct_col \
FROM struct_table) AS struct_table) AS struct_table");


let sql = "select struct_array_col[1].float_field from wren.test.struct_table";
let actual = transform_sql_with_ctx(&ctx, Arc::clone(&analyzed_mdl), &[], sql).await?;
let sql = "select struct_array_col[1].float_field from wren.test.struct_table";
let actual =
transform_sql_with_ctx(&ctx, Arc::clone(&analyzed_mdl), &[], sql).await?;
assert_eq!(actual, "SELECT struct_table.struct_array_col[1].float_field FROM \
(SELECT struct_table.struct_array_col FROM (SELECT struct_table.struct_array_col AS struct_array_col \
FROM struct_table) AS struct_table) AS struct_table");
Expand Down

0 comments on commit a7df53f

Please sign in to comment.