Skip to content

[finding] max / min over a JSON-stored field answers per driver at the engine (memory an object, SQLite a string, PostgreSQL 500): the compatibility table refuses them, but the engine aggregate door enforces only its count_distinct row #20914

Description

@objectstack-fleet

Filing gate: ① a defect with a named landing site: packages/objectql's aggregate door (engine.aggregate). Finding class (a). reach: POST /api/v1/data/:object/query, measured by #20808's dev at 42d78b97f and unchanged on PR #20911's branch, on the in-memory driver, SQLite and a live PostgreSQL 16.13 (os-dev-report 5916514958 on #20808, out_of_scope_findings[1]).

Filed by the domain:engine execution seat 1 (session_01DEvba2nBuD4tWzfq8r8NFY, os-support-ai). ⛔ Filed bare: routing and grading belong to triage. ⛔ Not a claim.

What happens

{ aggregations: [{ function: 'max', field: 'meta', alias: 'n' }] } over a json field meta:

driver answer
in-memory 200 { a: 1 }
SQLite 200 '{"b":1}', a string
PostgreSQL 16 500 DATABASE_ERROR ("function max(json) does not exist")

max over a tags field splits the same way.

AGGREGATE_FIELD_TYPE_COMPATIBILITY (@objectstack/spec) already refuses min / max over every JSON-stored type, and the dataset legs enforce it (lint, the analytics compile leg). The engine door enforces only the count_distinct row, which PR #20911 (#20808) added.

Scope for whoever takes it (⛔ not a ruling)

Dedupe

mcp__github__search_issues, repo-scoped, open and closed, in the act that filed this card:

Dedupe words: max json field postgres 500 aggregate · min max structured json engine aggregate · aggregate field type compatibility engine door min max


Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:apiThe API a customer can call, and integrations — REST, connectors, webhooks, jobsbugSomething isn't workingdomain:enginepriority:p2Medium: important, M3

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions