Skip to content

Commit

Permalink
fix expr bench
Browse files Browse the repository at this point in the history
Signed-off-by: Runji Wang <[email protected]>
  • Loading branch information
wangrunji0408 committed Oct 18, 2023
1 parent 2fc5a1e commit b4a0925
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions src/expr/impl/benches/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,7 @@ fn bench_expr(c: &mut Criterion) {
// 25: serial array
SerialArray::from_iter((1..=CHUNK_SIZE).map(|i| Serial::from(i as i64))).into_ref(),
// 26: jsonb array
JsonbArray::from_iter(
(1..=CHUNK_SIZE).map(|i| JsonbVal::from(serde_json::Value::Number(i.into()))),
)
.into_ref(),
JsonbArray::from_iter((1..=CHUNK_SIZE).map(|i| JsonbVal::from(i as i64))).into_ref(),
// 27: int256 array
Int256Array::from_iter((1..=CHUNK_SIZE).map(|_| Int256::from(1))).into_ref(),
// 28: extract field for interval
Expand Down Expand Up @@ -279,16 +276,16 @@ fn bench_expr(c: &mut Criterion) {
'sig: for sig in sigs {
if (sig.inputs_type.iter())
.chain([&sig.ret_type])
.any(|t| !t.is_exact())
.any(|t| !t.is_exact() || t.as_exact().is_array())
{
// TODO: support struct and list
// TODO: support struct and array
println!("todo: {sig:?}");
continue;
}
if [
"date_trunc(varchar, timestamptz) -> timestamptz",
"to_timestamp1(varchar, varchar) -> timestamptz",
"to_char(timestamptz, varchar) -> varchar",
"date_trunc(character varying, timestamp with time zone) -> timestamp with time zone",
"to_timestamp1(character varying, character varying) -> timestamp with time zone",
"to_char(timestamp with time zone, character varying) -> character varying",
]
.contains(&format!("{sig:?}").as_str())
{
Expand Down

0 comments on commit b4a0925

Please sign in to comment.