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
1,072 changes: 596 additions & 476 deletions src/generated/generated_temporal_udfs_0.cpp

Large diffs are not rendered by default.

5,531 changes: 2,240 additions & 3,291 deletions src/generated/generated_temporal_udfs_1.cpp

Large diffs are not rendered by default.

5,661 changes: 3,063 additions & 2,598 deletions src/generated/generated_temporal_udfs_2.cpp

Large diffs are not rendered by default.

4,375 changes: 2,496 additions & 1,879 deletions src/generated/generated_temporal_udfs_3.cpp

Large diffs are not rendered by default.

2,107 changes: 1,062 additions & 1,045 deletions src/generated/generated_temporal_udfs_4.cpp

Large diffs are not rendered by default.

2,174 changes: 1,042 additions & 1,132 deletions src/generated/generated_temporal_udfs_5.cpp

Large diffs are not rendered by default.

3,588 changes: 1,690 additions & 1,898 deletions src/generated/generated_temporal_udfs_6.cpp

Large diffs are not rendered by default.

3,926 changes: 2,121 additions & 1,805 deletions src/generated/generated_temporal_udfs_7.cpp

Large diffs are not rendered by default.

45 changes: 32 additions & 13 deletions tools/codegen_duck_udfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -748,6 +748,16 @@ def ret_temporal_type(name, arg_acc, group="", sql_ret=None):
"trgeometry": "TrgeometryTypes::trgeometry()",
"tposechain": "PosechainTypes::tposechain()",
}
# The container side of a two-operand restriction, keyed the same way: the SQL type name a
# `sqlSignatures` entry carries. Time containers and value spans sit in one map because the
# catalog names them the same way, and which of them an overload takes is the catalog's
# statement rather than something a caller decides.
SIG_CONTAINER_ACC = {
"tstzspan": "SpanTypes::tstzspan()", "tstzset": "SetTypes::tstzset()",
"tstzspanset": "SpansetTypes::tstzspanset()",
"intspan": "SpanTypes::intspan()", "bigintspan": "SpanTypes::bigintspan()",
"floatspan": "SpanTypes::floatspan()", "datespan": "SpanTypes::datespan()",
}
def sig_declared_accs(f):
"""The exact temporal-operand types this GENERIC (`Temporal *`) function is CREATE
FUNCTION'd for, read from the catalog's per-overload `sqlSignatures` (the SoT) — so the
Expand Down Expand Up @@ -4024,19 +4034,28 @@ def gen_cpp(fns, out_path, declared=None, aliases=None):
names = reg_names(f, sqlfn, aliases)
TSTZ_CONT = {"Span": "SpanTypes::tstzspan()", "Set": "SetTypes::tstzset()",
"SpanSet": "SpansetTypes::tstzspanset()"}
if flav == "num": # tnumber value span, paired (Span only)
pairs = [(NUMSPAN_PAIR[a], a) for a in reg_scope(fn)[1] if a in NUMSPAN_PAIR]
else:
# tstz time container, fixed. The BLANKET set is right only for the GENERIC
# `temporal_*` function; a family that owns its own time restriction — trgeometry
# does, because its varlena appends the reference geometry and the generic walker
# would drop it — must register over ITS OWN type alone. Registering the family
# function over every temporal type points e.g. `minusTime(tint, tstzset)` at
# `trgeometry_minus_tstzset`, which reads a tint blob as a pose skeleton plus a
# trailing geometry. The `num` branch above already scopes by name this way.
sc = reg_scope(fn)
accs = sc[1] if (sc and sc[0] == "types" and sc[1]) else ALL_TEMPORAL_ACCS
pairs = [(TSTZ_CONT[cont], a) for a in accs]
# THE OPERAND PAIRING IS THE CATALOG'S. Each `sqlSignatures` entry IS one CREATE
# FUNCTION overload, so its two argument types name the temporal type and the
# container that pair, for exactly the overloads the extension declares.
# Reading that pairing off the function NAME answers a different question and gets
# three things wrong at once. It cannot see which temporal types an overload set
# covers, so the time arm took a BLANKET list that omits tjsonb, tpcpatch and
# tpcpoint, while the value arm took a two-entry table that omits tbigint, having
# no bigintspan row at all. And it cannot see that a family owning its own time
# restriction — trgeometry does, its varlena appending the reference geometry the
# generic walker would drop — must register over its own type alone, so that had
# to be re-derived from a type scope beside it. The catalog states all three where
# the SQL is declared, which is the same move that retired the class-prefix list
# from the array-return shape.
pairs = []
for s in f.get("sqlSignatures") or ():
args = s.get("args") or ()
if len(args) != 2:
continue
tname, cname = (args[1], args[0]) if span_first else (args[0], args[1])
tacc, cacc = SIG_TEMPORAL_ACC.get(tname), SIG_CONTAINER_ACC.get(cname)
if tacc and cacc:
pairs.append((cacc, tacc))
for spacc, tacc in pairs:
sig = "{%s, %s}" % (tacc, spacc) if not span_first else "{%s, %s}" % (spacc, tacc)
rett = tacc if retk == "T" else "LogicalType::BOOLEAN" # at/minus span preserves type
Expand Down
2 changes: 1 addition & 1 deletion vcpkg_ports/meos/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# libmeos recompile per build) and makes two runs of the same commit build different
# sources. A recorded SHA keeps builds reproducible and the cache warm between
# advances.
set(_MEOS_REF "0a2a7fadfa48d5fe0d0007340f3ce4b0c02e0f29")
set(_MEOS_REF "3ac9555e23bc19587673c937e756de0e968ab638")
message(STATUS "MEOS port: building MobilityDB at recorded ${_MEOS_REF}")

# FETCH_REF names the branch (always advertised) so the fetch works even when the
Expand Down
Loading