-- The decoder of a LionCount plan's custom_private (src/lion_plan_private.c), -- and its check of the rules between members, handed lists no planner makes: -- each one a plan of one equality clause with one thing changed, which they -- must refuse rather than read at the wrong offsets. The first two are the lists a planner does make, at the plan -- and the path stage, and so are the counts by cells beside an anti join -- further down. \set VERBOSITY terse SET client_min_messages = warning; CREATE EXTENSION IF NOT EXISTS pg_lion; CREATE EXTENSION IF NOT EXISTS lion_hooktest; SELECT lion_hooktest_priv_decode('plan') AS nclause; nclause --------- 1 (1 row) SELECT lion_hooktest_priv_decode('path') AS nclause; nclause --------- 1 (1 row) -- the shape marker, and the plan's number of members SELECT lion_hooktest_priv_decode('magic'); ERROR: LionCount: unrecognized custom_private shape (27 members) SELECT lion_hooktest_priv_decode('path at plan'); ERROR: LionCount: unrecognized custom_private shape (26 members) -- a member's node type, and its length against the number of clauses SELECT lion_hooktest_priv_decode('oids as ints'); ERROR: LionCount: malformed OIDS member of custom_private SELECT lion_hooktest_priv_decode('short oids'); ERROR: LionCount: custom_private member OIDS has length 3, not 4 SELECT lion_hooktest_priv_decode('partition length'); ERROR: LionCount: partition 0 has 3 Oids for 1 clauses SELECT lion_hooktest_priv_decode('or length'); ERROR: LionCount: malformed OR structure -- a kind there is no such clause of SELECT lion_hooktest_priv_decode('clause kind'); ERROR: LionCount: unknown clause kind 12 -- an expression column VCOLS does not have, and one that is no expression SELECT lion_hooktest_priv_decode('expression column'); ERROR: LionCount: expression column 1601 of 0 SELECT lion_hooktest_priv_decode('bare expression column'); ERROR: LionCount: malformed VCOLS member of custom_private -- the members that grow at plan time, still the path's SELECT lion_hooktest_priv_decode('path join at plan'); ERROR: LionCount: malformed join SELECT lion_hooktest_priv_decode('path wagg at plan'); ERROR: LionCount: malformed aggregates over keys -- a target list that reads state the plan has none of SELECT lion_hooktest_priv_decode('aggregate without aggregates'); ERROR: LionCount: malformed aggregates over keys SELECT lion_hooktest_priv_decode('distinct count without its column'); ERROR: LionCount: a distinct count without its column -- a dimension folded into a fact filter whose IN list is the join key's SELECT lion_hooktest_priv_decode('join filter on its key'); ERROR: LionCount: malformed join -- a count by cells: one that is no decoded walk, the path's member at plan -- time, a header that miscounts its dimensions, a value whose outcome is -- past the dimension's, a predicate of a dimension there is none of, one -- short of a truth for an outcome, and a cell's truth asked of a count with -- no cells SELECT lion_hooktest_priv_decode('cells without the decoded walk'); ERROR: LionCount: malformed count by cells SELECT lion_hooktest_priv_decode('path cells at plan'); ERROR: LionCount: custom_private member CELLS has length 5, not 3 SELECT lion_hooktest_priv_decode('cells header'); ERROR: LionCount: malformed CELLS member of custom_private SELECT lion_hooktest_priv_decode('cells value outcome'); ERROR: LionCount: malformed cells dimension SELECT lion_hooktest_priv_decode('cells predicate dimension'); ERROR: LionCount: malformed cells predicate SELECT lion_hooktest_priv_decode('cells predicate truths'); ERROR: LionCount: malformed cells predicate SELECT lion_hooktest_priv_decode('cell predicate without cells'); ERROR: LionCount: unknown target list kind 1342177280 -- the anti join over a small inner side without the child it reads, with no -- key to look up, and a column of its inner side in a plan without one SELECT lion_hooktest_priv_decode('anti join without its child'); ERROR: LionCount: malformed anti join SELECT lion_hooktest_priv_decode('anti join of no key'); ERROR: LionCount: malformed ANTI member of custom_private SELECT lion_hooktest_priv_decode('inner column without an anti join'); ERROR: LionCount: an inner column without an anti join -- counts no plan has, each anti join with the child it reads: fewer join -- clauses than scan keys, each of which is one; more join clauses, more -- restrictions, or more of the three together, than a List holds - the -- executor takes their sum of expressions off the end of custom_exprs; and -- a column of its inner side past the attribute numbers there are SELECT lion_hooktest_priv_decode('anti join of fewer join clauses than keys'); ERROR: LionCount: malformed ANTI member of custom_private SELECT lion_hooktest_priv_decode('anti join of more join clauses than a list holds'); ERROR: LionCount: malformed ANTI member of custom_private SELECT lion_hooktest_priv_decode('anti join of more restrictions than a list holds'); ERROR: LionCount: malformed ANTI member of custom_private SELECT lion_hooktest_priv_decode('anti join of more expressions than a list holds'); ERROR: LionCount: malformed ANTI member of custom_private SELECT lion_hooktest_priv_decode('inner column past the last attribute'); ERROR: LionCount: unknown target list kind 1610645504 -- a scan key without the order its values are sorted by, and a GROUP BY -- column's equality without the order its groups go up in past hash_mem SELECT lion_hooktest_priv_decode('anti join of a key without its order'); ERROR: LionCount: malformed ANTI member of custom_private SELECT lion_hooktest_priv_decode('anti join of a grouping equality without its order'); ERROR: LionCount: malformed ANTI member of custom_private -- a count by cells beside the anti join over a small inner side, serial and -- parallel, which a planner makes; the same with a GROUP BY column's -- equality the cells have no use for, the anti join beside a decoded walk -- of two columns, and a column of the table the anti join would read in a -- count by cells without one SELECT lion_hooktest_priv_decode('cells beside an anti join') AS nclause; nclause --------- 1 (1 row) SELECT lion_hooktest_priv_decode('parallel cells beside an anti join') AS nclause; nclause --------- 1 (1 row) SELECT lion_hooktest_priv_decode('cells beside an anti join with a grouping equality'); ERROR: LionCount: malformed anti join SELECT lion_hooktest_priv_decode('anti join beside the decoded walk'); ERROR: LionCount: malformed anti join SELECT lion_hooktest_priv_decode('table column of a count by cells without an anti join'); ERROR: LionCount: target list kind 1073741825 in a count by cells