Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
65342ff
expr: Give EagerUnaryFunc::call a RowArena
antiguru Sep 18, 2026
f3264db
expr-derive-impl: Accept stateful unary and binary functions
antiguru Sep 18, 2026
d4d260f
expr-derive-impl: Fix comments claiming struct_ty is variadic-only
antiguru Sep 18, 2026
9867164
expr-derive-impl: Add a skip_display modifier
antiguru Sep 18, 2026
fb05bb2
expr-derive-impl: Fix skip_display test to match prettyplease output
antiguru Sep 18, 2026
86e5b43
expr: Convert RangeCreate to the sqlfunc macro
antiguru Sep 19, 2026
df9c0a9
expr-derive-impl: Correct the macro's modifier and generated-item docs
antiguru Sep 19, 2026
f87194d
expr-derive-impl: Reject sqlname with skip_display, and fix stale claims
antiguru Sep 19, 2026
94d6dd1
expr-derive-impl: Take inverse and negate as functions, and default i…
antiguru Sep 24, 2026
2aeabaa
expr-derive-impl: Report conflicts with Error::custom, and reject ski…
antiguru Sep 24, 2026
5c72eae
expr-derive-impl: Classify arity by the SQL arguments alone
antiguru Oct 14, 2026
dc6036e
expr-derive-impl: Resolve the output type in one function
antiguru Oct 14, 2026
7ec8ed2
expr-derive-impl: Move the expansion tests into their own file
antiguru Oct 14, 2026
a11bbd6
doc: Correct the sqlfunc reference against the macro
antiguru Oct 14, 2026
6154ee7
expr-derive-impl: Take every arity's parameters from sql_args
antiguru Oct 14, 2026
bc12401
expr-derive-impl: Validate modifiers in one place, at their spans
antiguru Oct 14, 2026
6d92c1a
expr-derive-impl: Share the binary and variadic nullability tail
antiguru Oct 14, 2026
13f3e95
expr-derive-impl: Classify a generic's output usage once
antiguru Oct 14, 2026
97a1efe
expr-derive-impl: Fix the remaining stale docs and test fixtures
antiguru Oct 14, 2026
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
169 changes: 118 additions & 51 deletions doc/developer/sqlfunc.md

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion src/catalog/tests/audit_log_details.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ use mz_audit_log::EventDetails;
use mz_catalog::durable::objects::serialization::RustType;
use mz_catalog_protos::objects::audit_log_event_v1;
use mz_expr::func::{EagerUnaryFunc, ParseCatalogAuditLogDetails};
use mz_repr::RowArena;
use mz_repr::adt::jsonb::Jsonb;
use proptest::prelude::*;

Expand All @@ -42,8 +43,9 @@ proptest! {
let proto_json = serde_json::to_value(&proto).expect("proto serializes");
let jsonb = Jsonb::from_serde_json(proto_json).expect("valid jsonb");

let temp_storage = RowArena::new();
let got = ParseCatalogAuditLogDetails
.call(jsonb.as_ref())
.call(jsonb.as_ref(), &temp_storage)
.expect("helper succeeded");
let got_json = got.as_ref().to_serde_json();

Expand Down
11 changes: 8 additions & 3 deletions src/catalog/tests/sql_parse_catalog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,25 @@ use mz_repr::adt::jsonb::Jsonb;
use mz_repr::adt::mz_acl_item::{AclMode, MzAclItem};
use mz_repr::network_policy_id::NetworkPolicyId;
use mz_repr::role_id::RoleId;
use mz_repr::{CatalogItemId, GlobalId};
use mz_repr::{CatalogItemId, GlobalId, RowArena};
use mz_sql::names::{DatabaseId, SchemaId};
use proptest::prelude::*;

fn serialize_and_parse_catalog_id(val: &impl serde::Serialize) -> String {
let json = serde_json::to_value(val).unwrap();
let jsonb = Jsonb::from_serde_json(json).unwrap();
ParseCatalogId.call(jsonb.as_ref()).unwrap()
let temp_storage = RowArena::new();
ParseCatalogId.call(jsonb.as_ref(), &temp_storage).unwrap()
}

fn serialize_and_parse_catalog_privileges(val: &impl serde::Serialize) -> Vec<MzAclItem> {
let json = serde_json::to_value(val).unwrap();
let jsonb = Jsonb::from_serde_json(json).unwrap();
ParseCatalogPrivileges.call(jsonb.as_ref()).unwrap().0
let temp_storage = RowArena::new();
ParseCatalogPrivileges
.call(jsonb.as_ref(), &temp_storage)
.unwrap()
.0
}

proptest! {
Expand Down
2 changes: 1 addition & 1 deletion src/compute-types/tests/snapshots/func_registry.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading