mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-10-03 02:25:35 +00:00
* feat: add experimental Jev SQL filtering Signed-off-by: Lei, HUANG <ratuthomm@gmail.com> * feat: gate Jev filtering behind an opt-in Cargo feature Signed-off-by: Lei, HUANG <ratuthomm@gmail.com> * ci: verify Jev registration with default features Run the existing registry regression without the jev feature in both PR tests and merge-queue coverage, alongside the existing feature-enabled test runs. Signed-off-by: Lei, HUANG <ratuthomm@gmail.com> * docs: clarify Jev concurrency scope and stabilization work Document the per-expression/batch concurrency bound and track process-wide limiting, rate-limit backoff, and request budgets and metrics as stabilization prerequisites. Signed-off-by: Lei, HUANG <ratuthomm@gmail.com> * feat: enable renamed ai-functions feature by default Rename the Jev Cargo feature across the command, query, and function crates and enable it in their defaults. Update CI and documentation, retaining an isolated no-default-features registry check and the runtime API opt-in. Signed-off-by: Lei, HUANG <ratuthomm@gmail.com> * ci: remove extra AI feature-off checks Use the regular AI-enabled unit and coverage runs for the default feature configuration. Keep feature-off validation available locally and update the usage guide to match. Signed-off-by: Lei, HUANG <ratuthomm@gmail.com> * refactor: rename AI feature to ai_functions Signed-off-by: Lei, HUANG <ratuthomm@gmail.com> --------- Signed-off-by: Lei, HUANG <ratuthomm@gmail.com>
33 lines
1.1 KiB
SQL
33 lines
1.1 KiB
SQL
-- No credentials or external service needed: NULL propagates without an API call.
|
|
SELECT jev(NULL, 'The event reports a failed payment.', 0.8) AS matched;
|
|
|
|
SELECT jev('message', NULL, 0.8) AS matched;
|
|
|
|
SELECT jev('message', 'The event reports a failed payment.', NULL) AS matched;
|
|
|
|
-- Validate SQL registration, coercion, and asynchronous filtering on a real table.
|
|
CREATE TABLE jev_events (
|
|
occurred_at TIMESTAMP TIME INDEX,
|
|
"service" STRING,
|
|
"message" STRING,
|
|
PRIMARY KEY ("service")
|
|
);
|
|
|
|
INSERT INTO jev_events VALUES
|
|
('2026-09-19T01:00:00Z', 'payments', NULL),
|
|
('2026-09-19T02:00:00Z', 'auth', NULL);
|
|
|
|
SELECT occurred_at, service, message FROM jev_events
|
|
WHERE occurred_at >= '2026-09-19T00:00:00Z'
|
|
AND occurred_at < '2026-09-20T00:00:00Z'
|
|
AND service = 'payments'
|
|
AND jev((message), 'The event reports that a payment still failed after retries.', 0.8)
|
|
ORDER BY occurred_at;
|
|
|
|
DROP TABLE jev_events;
|
|
|
|
-- Invalid thresholds fail locally before any HTTP request.
|
|
SELECT jev('message', 'condition', -0.1);
|
|
|
|
SELECT jev('message', 'condition', 1.1);
|