Skip to content
Merged
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
4 changes: 2 additions & 2 deletions deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -230,14 +230,14 @@ ignore = [
"RUSTSEC-2021-0153",
# proc-macro-error is unmaintained, possible alternative: proc-macro-error2
"RUSTSEC-2024-0370",
# lexical-core: Multiple soundness issues, depends on arrow upgrading
"RUSTSEC-2023-0086",
# Use standard library's IsTerminal trait instead of `atty` (unmaintained)
"RUSTSEC-2024-0375",
# `derivative` is unmaintained; consider using an alternative (unmaintained)
"RUSTSEC-2024-0388",
# `instant` is unmaintained, and the author recommends using the maintained [`web-time`] crate instead.
"RUSTSEC-2024-0384",
# columnar: `Read` on uninitialized buffer may cause UB (ColumnarReadExt::read_typed_vec())
"RUSTSEC-2021-0087",

]

Expand Down
16 changes: 8 additions & 8 deletions src/sql/src/func.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1910,7 +1910,7 @@ pub static PG_CATALOG_BUILTINS: LazyLock<BTreeMap<&'static str, Func>> = LazyLoc
// concat uses nonstandard bool -> string casts
// to match historical baggage in PostgreSQL.
ScalarType::Bool => expr.call_unary(UnaryFunc::CastBoolToStringNonstandard(func::CastBoolToStringNonstandard)),
// TODO(materialize#7572): remove call to PadChar
// TODO(see <materialize#7572>): remove call to PadChar
ScalarType::Char { length } => expr.call_unary(UnaryFunc::PadChar(func::PadChar { length })),
_ => typeconv::to_string(ecx, expr)
});
Expand All @@ -1930,7 +1930,7 @@ pub static PG_CATALOG_BUILTINS: LazyLock<BTreeMap<&'static str, Func>> = LazyLoc
// concat uses nonstandard bool -> string casts
// to match historical baggage in PostgreSQL.
ScalarType::Bool => expr.call_unary(UnaryFunc::CastBoolToStringNonstandard(func::CastBoolToStringNonstandard)),
// TODO(materialize#7572): remove call to PadChar
// TODO(see <materialize#7572>): remove call to PadChar
ScalarType::Char { length } => expr.call_unary(UnaryFunc::PadChar(func::PadChar { length })),
_ => typeconv::to_string(ecx, expr)
});
Expand Down Expand Up @@ -2702,7 +2702,7 @@ pub static PG_CATALOG_BUILTINS: LazyLock<BTreeMap<&'static str, Func>> = LazyLoc
// https://www.postgresql.org/docs/current/functions-json.html
"to_jsonb" => Scalar {
params!(Any) => Operation::unary(|ecx, e| {
// TODO(materialize#7572): remove this
// TODO(see <materialize#7572>): remove this
let e = match ecx.scalar_type(&e) {
ScalarType::Char { length } => e.call_unary(UnaryFunc::PadChar(func::PadChar { length })),
_ => e,
Expand Down Expand Up @@ -3056,7 +3056,7 @@ pub static PG_CATALOG_BUILTINS: LazyLock<BTreeMap<&'static str, Func>> = LazyLoc
params!(Float32) => AggregateFunc::MaxFloat32 => Float32, 2119;
params!(Float64) => AggregateFunc::MaxFloat64 => Float64, 2120;
params!(String) => AggregateFunc::MaxString => String, 2129;
// TODO(materialize#7572): make this its own function
// TODO(see <materialize#7572>): make this its own function
params!(Char) => AggregateFunc::MaxString => Char, 2244;
params!(Date) => AggregateFunc::MaxDate => Date, 2122;
params!(Timestamp) => AggregateFunc::MaxTimestamp => Timestamp, 2126;
Expand All @@ -3077,7 +3077,7 @@ pub static PG_CATALOG_BUILTINS: LazyLock<BTreeMap<&'static str, Func>> = LazyLoc
params!(Float32) => AggregateFunc::MinFloat32 => Float32, 2135;
params!(Float64) => AggregateFunc::MinFloat64 => Float64, 2136;
params!(String) => AggregateFunc::MinString => String, 2145;
// TODO(materialize#7572): make this its own function
// TODO(see <materialize#7572>): make this its own function
params!(Char) => AggregateFunc::MinString => Char, 2245;
params!(Date) => AggregateFunc::MinDate => Date, 2138;
params!(Timestamp) => AggregateFunc::MinTimestamp => Timestamp, 2142;
Expand All @@ -3088,7 +3088,7 @@ pub static PG_CATALOG_BUILTINS: LazyLock<BTreeMap<&'static str, Func>> = LazyLoc
},
"jsonb_agg" => Aggregate {
params!(Any) => Operation::unary_ordered(|ecx, e, order_by| {
// TODO(materialize#7572): remove this
// TODO(see <materialize#7572>): remove this
let e = match ecx.scalar_type(&e) {
ScalarType::Char { length } => e.call_unary(UnaryFunc::PadChar(func::PadChar { length })),
_ => e,
Expand All @@ -3108,7 +3108,7 @@ pub static PG_CATALOG_BUILTINS: LazyLock<BTreeMap<&'static str, Func>> = LazyLoc
},
"jsonb_object_agg" => Aggregate {
params!(Any, Any) => Operation::binary_ordered(|ecx, key, val, order_by| {
// TODO(materialize#7572): remove this
// TODO(see <materialize#7572>): remove this
let key = match ecx.scalar_type(&key) {
ScalarType::Char { length } => key.call_unary(UnaryFunc::PadChar(func::PadChar { length })),
_ => key,
Expand Down Expand Up @@ -3717,7 +3717,7 @@ pub static MZ_CATALOG_BUILTINS: LazyLock<BTreeMap<&'static str, Func>> = LazyLoc
"map_agg" => Aggregate {
params!(String, Any) => Operation::binary_ordered(|ecx, key, val, order_by| {
let (value_type, val) = match ecx.scalar_type(&val) {
// TODO(materialize#7572): remove this
// TODO(see <materialize#7572>): remove this
ScalarType::Char { length } => (ScalarType::Char { length }, val.call_unary(UnaryFunc::PadChar(func::PadChar { length }))),
typ => (typ, val),
};
Expand Down
Loading