Source: sqlreduce
Version: 1.2-1
Severity: serious
Justification: FTBFS
Tags: trixie sid ftbfs
User: [email protected]
Usertags: ftbfs-20240115 ftbfs-trixie
Hi,
During a rebuild of all packages in sid, your package failed to build
on amd64.
Relevant part (hopefully):
> make[1]: Entering directory '/<<PKGBUILDDIR>>'
> pg_virtualenv dh_auto_test
> Creating new PostgreSQL cluster 16/regress ...
> I: pybuild base:305: cd
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_sqlreduce/build; python3.12 -m pytest
> tests
> ============================= test session starts
> ==============================
> platform linux -- Python 3.12.1, pytest-7.4.4, pluggy-1.3.0
> rootdir: /<<PKGBUILDDIR>>
> collected 3 items
>
> tests/test_sqlreduce.py ..F
> [100%]
>
> =================================== FAILURES
> ===================================
> __________________________________ test_rules
> __________________________________
>
> def test_rules():
> for classname, rule in rules.items():
> print(f"{classname}:")
> tests = rule['tests']
> if tests is None:
> raise Exception(f"{classname} is missing tests")
> for test, expected in zip(tests[0::2], tests[1::2]):
> print(" test:", test)
> res, _ = run_reduce(test)
> print(" got:", res)
> if res != expected:
> print("expect:", expected)
> > raise Exception(f"{classname} test: {test}: expected
> > {expected}, got {res}")
> E Exception: FetchStmt test: fetch all in foo: expected
> FETCH ALL foo, got FETCH FORWARD ALL FROM foo
>
> tests/test_sqlreduce.py:59: Exception
> ----------------------------- Captured stdout call
> -----------------------------
> A_ArrayExpr:
> test: select array[2, foo]
> got: SELECT foo
> A_Const:
> test: select '1,1'::point = '1,1'
> got: SELECT CAST(NULL AS point) = NULL
> A_Expr:
> test: select 1 + moo
> got: SELECT moo
> test: select foo between 2 and 3
> got: SELECT foo
> test: select 1 between moo and 3
> got: SELECT moo
> test: select 1 between 2 and bar
> got: SELECT bar
> A_Indirection:
> test: select foo[2]
> got: SELECT foo
> test: select (select array[1])[foo]
> got: SELECT (SELECT ARRAY[NULL])[foo]
> AlterPolicyStmt:
> test: alter policy moo on bar using (true)
> got: ALTER POLICY moo ON bar USING (NULL)
> BoolExpr:
> test: select moo and foo
> got: SELECT moo
> test: select true and (foo or false)
> got: SELECT foo
> test: select set_config('a.b', 'blub', true) = 'blub' and
> set_config('work_mem', current_setting('a.b'), true) = '' and true
> got: SELECT set_config('a.b', 'blub', NULL) = 'blub' AND
> set_config('work_mem', current_setting('a.b'), NULL) = ''
> BooleanTest:
> test: select foo is true
> got: SELECT foo
> CallStmt:
> test: call foo()
> got: CALL foo()
> test: call foo(bar + 1)
> got: CALL foo(bar)
> CaseExpr:
> test: select case foo when 1 then 2 else bar end
> got: SELECT foo
> test: select case when moo then 1 else bar end
> got: SELECT moo
> test: select case when true then foo end
> got: SELECT foo
> test: select case when true then 1 else bar end
> got: SELECT bar
> CaseWhen:
> test: select case when bar then 1 else 2 end
> got: SELECT bar
> ClusterStmt:
> test: cluster foo
> got: CLUSTER foo
> CoalesceExpr:
> test: select coalesce(1, bar)
> got: SELECT bar
> test: select coalesce(1, '', 2)
> got: SELECT COALESCE('', 2)
> ColumnRef:
> test: select 'foo'
> got: SELECT
> CommonTableExpr:
> test: with a as (select moo) select from a
> got: SELECT moo
> test: with recursive a(a) as (select 5 union select 1 from a) cycle a set
> is_cycle using path, b(b) as (select null) select a = b from a, b
> got: WITH a(a) AS (SELECT NULL UNION SELECT 1), b(b) AS (SELECT NULL)
> SELECT a = b FROM a, b
> CopyStmt:
> test: copy (select foo) to 'bla'
> got: SELECT foo
> test: create table foo (id int); copy foo from stdin
> got: CREATE TABLE foo (id integer); COPY foo FROM STDIN
> CreatePolicyStmt:
> test: create policy foo ON bar for select using (moo % 2 = 0)
> got: CREATE POLICY foo ON bar AS PERMISSIVE FOR select TO PUBLIC USING
> (NULL)
> CreateSchemaStmt:
> test: create schema foo create table bar1 partition of moo for values in
> (1) create table bar2 partition of moo for values in (2)
> got: CREATE SCHEMA foo CREATE TABLE bar2 PARTITION OF moo FOR VALUES IN
> (2)
> CreateStmt:
> test: create table foo (a int)
> got: CREATE TABLE foo (a integer)
> test: create table foo (id int) partition by list(id)
> got: CREATE TABLE foo (id integer)
> CreateTableAsStmt:
> test: create table foo as select 1, moo
> got: SELECT moo
> test: create table foo as select 1, 2
> got: CREATE TABLE foo AS SELECT NULL, NULL
> DeclareCursorStmt:
> test: declare foo cursor for select bar
> got: SELECT bar
> DeleteStmt:
> test: delete from foo where bar
> got: DELETE FROM foo
> test: delete from foo using bar
> got: DELETE FROM foo
> test: delete from foo returning bar
> got: DELETE FROM foo
> test: delete from pg_database where bar and foo
> got: DELETE FROM pg_database WHERE bar
> ExecuteStmt:
> test: prepare foo as select $1; execute foo(bar + 1)
> got: PREPARE foo AS SELECT $1; EXECUTE foo(bar)
> ExplainStmt:
> test: explain select from foo, bar
> got: EXPLAIN SELECT FROM foo
> test: explain (analyze) select from foo
> got: EXPLAIN SELECT FROM foo
> FuncCall:
> test: select foo(bar)
> got: SELECT bar
> test: select foo() over ()
> got: SELECT foo()
> test: select lag(1) over (partition by bar, foo)
> got: SELECT lag(1) OVER (PARTITION BY bar)
> test: select foo(1 order by moo)
> got: SELECT foo(1)
> test: select count(1 order by moo, bar)
> got: SELECT moo
> test: select foo(1 + 1)
> got: SELECT foo(1)
> InsertStmt:
> test: insert into bar select from bar
> got: SELECT FROM bar
> test: create table bar(id int); insert into bar values(foo)
> got: VALUES (foo)
> test: insert into foo (id) select bar
> got: INSERT INTO foo SELECT
> test: insert into foo values (1) on conflict do nothing
> got: INSERT INTO foo SELECT
> test: with foo as (select 1) insert into bar select * from foo
> got: INSERT INTO bar SELECT
> test: insert into foo select returning bar, moo
> got: INSERT INTO foo SELECT
> test: create table foo (bar int); insert into foo select returning bar, moo
> got: CREATE TABLE foo (bar integer); INSERT INTO foo SELECT RETURNING moo
> JoinExpr:
> test: select from foo join bar on true
> got: SELECT FROM foo
> test: select from pg_database join pg_database on moo
> got: SELECT FROM pg_database INNER JOIN pg_database ON NULL
> test: select from pg_database a join pg_database b on foo
> got: SELECT foo
> NamedArgExpr:
> test: select foo(bar => moo)
> got: SELECT moo
> Null:
> test: select null
> got: SELECT
> NullTest:
> test: select moo is null
> got: SELECT moo
> OnConflictClause:
> test: create table foo(id int primary key); insert into foo values (1) on
> conflict (id) do update set a=1 where true
> got: CREATE TABLE foo (id integer PRIMARY KEY); INSERT INTO foo SELECT ON
> CONFLICT (id) DO UPDATE SET a = NULL
> test: create table foo(id int primary key); insert into foo values (1) on
> conflict (id) do update set id=1, b=1
> got: CREATE TABLE foo (id integer PRIMARY KEY); INSERT INTO foo SELECT ON
> CONFLICT (id) DO UPDATE SET b = NULL
> test: create table foo(id int primary key); insert into foo (id) values (1)
> on conflict (a) do update set id=1
> got: CREATE TABLE foo (id integer PRIMARY KEY); INSERT INTO foo SELECT ON
> CONFLICT (a) DO NOTHING
> PrepareStmt:
> test: prepare foo as select from bar, moo
> got: SELECT FROM bar
> RangeFunction:
> test: select from lateral foo()
> got: SELECT FROM foo()
> test: select from foo(1 + 1)
> got: SELECT FROM foo(1)
> test: select from rows from (f(1), f(2))
> got: SELECT FROM ROWS FROM (f(1), f())
> RangeSubselect:
> test: select from (select bar) sub
> got: SELECT bar
> RangeTableFunc:
> test: select from xmltable('/foo' passing bla columns foo integer, moo text)
> got: SELECT FROM xmltable(('/foo') PASSING bla COLUMNS moo text)
> RangeTableFuncCol:
> test: select from xmltable('/foo' passing bla columns foo integer, moo text)
> got: SELECT FROM xmltable(('/foo') PASSING bla COLUMNS moo text)
> RangeTableSample:
> test: select from bar tablesample system(1)
> got: SELECT FROM bar
> RangeVar:
> test: select from moo
> got: SELECT FROM moo
> RawStmt:
> test: select
> got: SELECT
> ResTarget:
> test: select foo as bar
> got: SELECT foo AS bar
> test: update foo set bar[2] = 1
> got: UPDATE foo SET bar = NULL
> RowExpr:
> test: select row(1, foo)
> got: SELECT foo
> test: select row(1, 2) = row(3, '')
> got: SELECT ROW(NULL, 2) = ROW(NULL, '')
> SelectStmt:
> test: select limit 1
> got: SELECT
> test: select offset 1
> got: SELECT
> test: select 1
> got: SELECT
> test: select foo, bar
> got: SELECT foo
> test: select where true
> got: SELECT
> test: select 1 from pg_database where foo
> got: SELECT WHERE foo
> test: select from foo union select from bar
> got: SELECT FROM foo
> test: select from foo, bar
> got: SELECT FROM foo
> test: select order by foo, bar
> got: SELECT ORDER BY foo
> test: select group by foo, bar
> got: SELECT GROUP BY foo
> test: values (1)
> got: SELECT
> test: values(1), (moo), (foo)
> got: VALUES (moo)
> test: select from (values (moo)) sub
> got: VALUES (moo)
> test: with moo as (select) select from foo
> got: SELECT FROM foo
> test: select distinct foo
> got: SELECT foo
> test: select distinct on (a, b) NULL
> got: SELECT DISTINCT ON (a) NULL
> SetToDefault:
> test: update foo set a = default
> got: UPDATE foo SET a = NULL
> SortBy:
> test: select foo(1 order by moo desc)
> got: SELECT foo(1)
> test: select avg(1 order by foo)
> got: SELECT foo
> SubLink:
> test: select (select moo)
> got: SELECT moo
> test: select exists(select moo)
> got: SELECT moo
> TruncateStmt:
> test: truncate foo, bar
> got: TRUNCATE TABLE foo
> TypeCast:
> test: select foo::int
> got: SELECT foo
> UpdateStmt:
> test: update foo set a=b, c=d
> got: UPDATE foo SET c = NULL
> test: update foo set a=b where true
> got: UPDATE foo SET a = NULL
> ViewStmt:
> test: create view foo as select bar
> got: SELECT bar
> test: create view foo (n) as select 1, 2; select n = '' from foo
> got: CREATE VIEW foo (n) AS SELECT 2; SELECT n = '' FROM foo
> WindowDef:
> test: select count(*) over (partition by bar, foo)
> got: SELECT count(*) OVER (PARTITION BY bar)
> test: select count(*) over (order by bar, foo)
> got: SELECT count(*) OVER (ORDER BY bar)
> test: select count(*) over (partition by bar order by bar, foo)
> got: SELECT count(*) OVER (ORDER BY bar)
> WithClause:
> test: with recursive a(a) as (select 5), whatever as (select), b(b) as
> (select '') select a = b from a, b
> got: WITH a(a) AS (SELECT 5), b(b) AS (SELECT NULL) SELECT a = b FROM a, b
> XmlExpr:
> test: select xmlelement(name bar, moo)
> got: SELECT moo
> test: select xmlforest(foo, bar)
> got: SELECT foo
> XmlSerialize:
> test: SELECT xmlserialize(content moo as text)
> got: SELECT moo
> AlterDatabaseSetStmt:
> test: alter database foo reset all
> got: ALTER DATABASE foo RESET ALL
> AlterDefaultPrivilegesStmt:
> test: alter default privileges for role foo revoke delete on tables from bar
> got: ALTER DEFAULT PRIVILEGES FOR ROLE foo REVOKE DELETE ON TABLES FROM bar
> AlterDomainStmt:
> test: alter domain moo add check (value <> '')
> got: ALTER DOMAIN moo ADD CHECK (value <> '')
> AlterEventTrigStmt:
> test: alter event trigger foo disable
> got: ALTER EVENT TRIGGER foo DISABLE
> AlterFunctionStmt:
> test: alter function foo() strict
> got: ALTER FUNCTION foo () RETURNS NULL ON NULL INPUT
> AlterObjectSchemaStmt:
> test: alter table foo set schema bla
> got: ALTER TABLE foo SET SCHEMA bla
> AlterOwnerStmt:
> test: alter large object 42 owner to moo
> got: ALTER LARGE OBJECT 42 OWNER TO moo
> AlterRoleSetStmt:
> test: alter role foo reset all
> got: ALTER ROLE foo RESET ALL
> test: alter role foo in database bar reset all
> got: ALTER ROLE foo IN DATABASE bar RESET ALL
> AlterRoleStmt:
> test: alter role foo superuser
> got: ALTER ROLE foo SUPERUSER
> AlterSeqStmt:
> test: alter sequence foo restart 1
> got: ALTER SEQUENCE foo RESTART WITH 1
> AlterTableStmt:
> test: alter table foo drop column bar
> got: ALTER TABLE foo DROP COLUMN bar
> CommentStmt:
> test: comment on table foo is 'bar'
> got: COMMENT ON TABLE foo IS 'bar'
> CompositeTypeStmt:
> test: create type foo as (a text, b integer, c timestamp)
> got: CREATE TYPE foo AS (a text, b integer, c timestamp)
> CreateCastStmt:
> test: create cast (foo as bar) without function
> got: CREATE CAST (foo AS bar) WITHOUT FUNCTION
> CreateConversionStmt:
> test: create conversion foo for 'LATIN1' to 'UTF8' from iso8859_1_to_utf8
> got: CREATE CONVERSION foo FOR 'LATIN1' TO 'UTF8' FROM iso8859_1_to_utf8
> CreatedbStmt:
> test: create database foo
> got: CREATE DATABASE foo
> CreateDomainStmt:
> test: create domain foo as int not null
> got: CREATE DOMAIN foo AS integer NOT NULL
> CreateEnumStmt:
> test: create type foo as enum ('foo', 'bar')
> got: CREATE TYPE foo AS ENUM ('foo', 'bar')
> CreateEventTrigStmt:
> test: create event trigger foo on ddl_command_start execute function moo()
> got: CREATE EVENT TRIGGER foo ON ddl_command_start EXECUTE PROCEDURE moo()
> CreateFdwStmt:
> test: create foreign data wrapper foo
> got: CREATE FOREIGN DATA WRAPPER foo
> CreateForeignServerStmt:
> test: create server bar foreign data wrapper foo
> got: CREATE SERVER bar FOREIGN DATA WRAPPER foo
> CreateForeignTableStmt:
> test: create foreign table foo (moo int not null) server bar
> got: CREATE FOREIGN TABLE foo (moo integer NOT NULL) SERVER bar
> CreateFunctionStmt:
> test: create function moo() returns void as $$ select 1 $$ language sql
> got: CREATE FUNCTION moo() RETURNS void AS $$ select 1 $$ LANGUAGE sql
> CreateRangeStmt:
> test: create type foo as range (subtype = bar)
> got: CREATE TYPE foo AS RANGE (subtype = bar)
> CreateOpClassStmt:
> test: create operator class foo for type bar using moo as storage bla
> got: CREATE OPERATOR CLASS foo FOR TYPE bar USING moo AS STORAGE bla
> CreatePublicationStmt:
> test: create publication foo
> got: CREATE PUBLICATION foo
> CreateRoleStmt:
> test: create role foo
> got: CREATE ROLE foo
> CreateSeqStmt:
> test: create sequence foo
> got: CREATE SEQUENCE foo
> CreateSubscriptionStmt:
> test: create subscription moo connection '' publication foo
> got: CREATE SUBSCRIPTION moo CONNECTION '' PUBLICATION foo
> CreateTrigStmt:
> test: create trigger foo before insert on bar execute procedure moo()
> got: CREATE TRIGGER foo BEFORE INSERT ON bar FOR EACH STATEMENT EXECUTE
> PROCEDURE moo()
> CreateUserMappingStmt:
> test: create user mapping for moo server bar
> got: CREATE USER MAPPING FOR moo SERVER bar
> DeallocateStmt:
> test: deallocate bar
> got: DEALLOCATE PREPARE bar
> DefineStmt:
> test: create aggregate moo (*) (sfunc = foo, stype = int4[], finalfunc =
> bar, initcond = '{}')
> got: CREATE AGGREGATE moo (*) (sfunc = foo, stype = int4[], finalfunc =
> bar, initcond = '{}')
> DiscardStmt:
> test: discard all
> got: DISCARD ALL
> DoStmt:
> test: do $$ begin end $$
> got: DO $$ begin end $$
> DropdbStmt:
> test: drop database foo
> got: DROP DATABASE foo
> DropOwnedStmt:
> test: drop owned by bar
> got: DROP OWNED BY bar RESTRICT
> DropRoleStmt:
> test: drop role moo
> got: DROP ROLE moo
> DropStmt:
> test: drop table foo
> got: DROP TABLE foo
> FetchStmt:
> test: fetch all in foo
> got: FETCH FORWARD ALL FROM foo
> expect: FETCH ALL foo
> =========================== short test summary info
> ============================
> FAILED tests/test_sqlreduce.py::test_rules - Exception: FetchStmt test:
> fetch...
> ========================= 1 failed, 2 passed in 18.52s
> =========================
> E: pybuild pybuild:391: test: plugin distutils failed with: exit code=1: cd
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_sqlreduce/build; python3.12 -m pytest
> tests
> I: pybuild base:305: cd
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_sqlreduce/build; python3.11 -m pytest
> tests
> ============================= test session starts
> ==============================
> platform linux -- Python 3.11.7, pytest-7.4.4, pluggy-1.3.0
> rootdir: /<<PKGBUILDDIR>>
> collected 3 items
>
> tests/test_sqlreduce.py ..F
> [100%]
>
> =================================== FAILURES
> ===================================
> __________________________________ test_rules
> __________________________________
>
> def test_rules():
> for classname, rule in rules.items():
> print(f"{classname}:")
> tests = rule['tests']
> if tests is None:
> raise Exception(f"{classname} is missing tests")
> for test, expected in zip(tests[0::2], tests[1::2]):
> print(" test:", test)
> res, _ = run_reduce(test)
> print(" got:", res)
> if res != expected:
> print("expect:", expected)
> > raise Exception(f"{classname} test: {test}: expected
> > {expected}, got {res}")
> E Exception: FetchStmt test: fetch all in foo: expected
> FETCH ALL foo, got FETCH FORWARD ALL FROM foo
>
> tests/test_sqlreduce.py:59: Exception
> ----------------------------- Captured stdout call
> -----------------------------
> A_ArrayExpr:
> test: select array[2, foo]
> got: SELECT foo
> A_Const:
> test: select '1,1'::point = '1,1'
> got: SELECT CAST(NULL AS point) = NULL
> A_Expr:
> test: select 1 + moo
> got: SELECT moo
> test: select foo between 2 and 3
> got: SELECT foo
> test: select 1 between moo and 3
> got: SELECT moo
> test: select 1 between 2 and bar
> got: SELECT bar
> A_Indirection:
> test: select foo[2]
> got: SELECT foo
> test: select (select array[1])[foo]
> got: SELECT (SELECT ARRAY[NULL])[foo]
> AlterPolicyStmt:
> test: alter policy moo on bar using (true)
> got: ALTER POLICY moo ON bar USING (NULL)
> BoolExpr:
> test: select moo and foo
> got: SELECT moo
> test: select true and (foo or false)
> got: SELECT foo
> test: select set_config('a.b', 'blub', true) = 'blub' and
> set_config('work_mem', current_setting('a.b'), true) = '' and true
> got: SELECT set_config('a.b', 'blub', NULL) = 'blub' AND
> set_config('work_mem', current_setting('a.b'), NULL) = ''
> BooleanTest:
> test: select foo is true
> got: SELECT foo
> CallStmt:
> test: call foo()
> got: CALL foo()
> test: call foo(bar + 1)
> got: CALL foo(bar)
> CaseExpr:
> test: select case foo when 1 then 2 else bar end
> got: SELECT foo
> test: select case when moo then 1 else bar end
> got: SELECT moo
> test: select case when true then foo end
> got: SELECT foo
> test: select case when true then 1 else bar end
> got: SELECT bar
> CaseWhen:
> test: select case when bar then 1 else 2 end
> got: SELECT bar
> ClusterStmt:
> test: cluster foo
> got: CLUSTER foo
> CoalesceExpr:
> test: select coalesce(1, bar)
> got: SELECT bar
> test: select coalesce(1, '', 2)
> got: SELECT COALESCE('', 2)
> ColumnRef:
> test: select 'foo'
> got: SELECT
> CommonTableExpr:
> test: with a as (select moo) select from a
> got: SELECT moo
> test: with recursive a(a) as (select 5 union select 1 from a) cycle a set
> is_cycle using path, b(b) as (select null) select a = b from a, b
> got: WITH a(a) AS (SELECT NULL UNION SELECT 1), b(b) AS (SELECT NULL)
> SELECT a = b FROM a, b
> CopyStmt:
> test: copy (select foo) to 'bla'
> got: SELECT foo
> test: create table foo (id int); copy foo from stdin
> got: CREATE TABLE foo (id integer); COPY foo FROM STDIN
> CreatePolicyStmt:
> test: create policy foo ON bar for select using (moo % 2 = 0)
> got: CREATE POLICY foo ON bar AS PERMISSIVE FOR select TO PUBLIC USING
> (NULL)
> CreateSchemaStmt:
> test: create schema foo create table bar1 partition of moo for values in
> (1) create table bar2 partition of moo for values in (2)
> got: CREATE SCHEMA foo CREATE TABLE bar2 PARTITION OF moo FOR VALUES IN
> (2)
> CreateStmt:
> test: create table foo (a int)
> got: CREATE TABLE foo (a integer)
> test: create table foo (id int) partition by list(id)
> got: CREATE TABLE foo (id integer)
> CreateTableAsStmt:
> test: create table foo as select 1, moo
> got: SELECT moo
> test: create table foo as select 1, 2
> got: CREATE TABLE foo AS SELECT NULL, NULL
> DeclareCursorStmt:
> test: declare foo cursor for select bar
> got: SELECT bar
> DeleteStmt:
> test: delete from foo where bar
> got: DELETE FROM foo
> test: delete from foo using bar
> got: DELETE FROM foo
> test: delete from foo returning bar
> got: DELETE FROM foo
> test: delete from pg_database where bar and foo
> got: DELETE FROM pg_database WHERE bar
> ExecuteStmt:
> test: prepare foo as select $1; execute foo(bar + 1)
> got: PREPARE foo AS SELECT $1; EXECUTE foo(bar)
> ExplainStmt:
> test: explain select from foo, bar
> got: EXPLAIN SELECT FROM foo
> test: explain (analyze) select from foo
> got: EXPLAIN SELECT FROM foo
> FuncCall:
> test: select foo(bar)
> got: SELECT bar
> test: select foo() over ()
> got: SELECT foo()
> test: select lag(1) over (partition by bar, foo)
> got: SELECT lag(1) OVER (PARTITION BY bar)
> test: select foo(1 order by moo)
> got: SELECT foo(1)
> test: select count(1 order by moo, bar)
> got: SELECT moo
> test: select foo(1 + 1)
> got: SELECT foo(1)
> InsertStmt:
> test: insert into bar select from bar
> got: SELECT FROM bar
> test: create table bar(id int); insert into bar values(foo)
> got: VALUES (foo)
> test: insert into foo (id) select bar
> got: INSERT INTO foo SELECT
> test: insert into foo values (1) on conflict do nothing
> got: INSERT INTO foo SELECT
> test: with foo as (select 1) insert into bar select * from foo
> got: INSERT INTO bar SELECT
> test: insert into foo select returning bar, moo
> got: INSERT INTO foo SELECT
> test: create table foo (bar int); insert into foo select returning bar, moo
> got: CREATE TABLE foo (bar integer); INSERT INTO foo SELECT RETURNING moo
> JoinExpr:
> test: select from foo join bar on true
> got: SELECT FROM foo
> test: select from pg_database join pg_database on moo
> got: SELECT FROM pg_database INNER JOIN pg_database ON NULL
> test: select from pg_database a join pg_database b on foo
> got: SELECT foo
> NamedArgExpr:
> test: select foo(bar => moo)
> got: SELECT moo
> Null:
> test: select null
> got: SELECT
> NullTest:
> test: select moo is null
> got: SELECT moo
> OnConflictClause:
> test: create table foo(id int primary key); insert into foo values (1) on
> conflict (id) do update set a=1 where true
> got: CREATE TABLE foo (id integer PRIMARY KEY); INSERT INTO foo SELECT ON
> CONFLICT (id) DO UPDATE SET a = NULL
> test: create table foo(id int primary key); insert into foo values (1) on
> conflict (id) do update set id=1, b=1
> got: CREATE TABLE foo (id integer PRIMARY KEY); INSERT INTO foo SELECT ON
> CONFLICT (id) DO UPDATE SET b = NULL
> test: create table foo(id int primary key); insert into foo (id) values (1)
> on conflict (a) do update set id=1
> got: CREATE TABLE foo (id integer PRIMARY KEY); INSERT INTO foo SELECT ON
> CONFLICT (a) DO NOTHING
> PrepareStmt:
> test: prepare foo as select from bar, moo
> got: SELECT FROM bar
> RangeFunction:
> test: select from lateral foo()
> got: SELECT FROM foo()
> test: select from foo(1 + 1)
> got: SELECT FROM foo(1)
> test: select from rows from (f(1), f(2))
> got: SELECT FROM ROWS FROM (f(1), f())
> RangeSubselect:
> test: select from (select bar) sub
> got: SELECT bar
> RangeTableFunc:
> test: select from xmltable('/foo' passing bla columns foo integer, moo text)
> got: SELECT FROM xmltable(('/foo') PASSING bla COLUMNS moo text)
> RangeTableFuncCol:
> test: select from xmltable('/foo' passing bla columns foo integer, moo text)
> got: SELECT FROM xmltable(('/foo') PASSING bla COLUMNS moo text)
> RangeTableSample:
> test: select from bar tablesample system(1)
> got: SELECT FROM bar
> RangeVar:
> test: select from moo
> got: SELECT FROM moo
> RawStmt:
> test: select
> got: SELECT
> ResTarget:
> test: select foo as bar
> got: SELECT foo AS bar
> test: update foo set bar[2] = 1
> got: UPDATE foo SET bar = NULL
> RowExpr:
> test: select row(1, foo)
> got: SELECT foo
> test: select row(1, 2) = row(3, '')
> got: SELECT ROW(NULL, 2) = ROW(NULL, '')
> SelectStmt:
> test: select limit 1
> got: SELECT
> test: select offset 1
> got: SELECT
> test: select 1
> got: SELECT
> test: select foo, bar
> got: SELECT foo
> test: select where true
> got: SELECT
> test: select 1 from pg_database where foo
> got: SELECT WHERE foo
> test: select from foo union select from bar
> got: SELECT FROM foo
> test: select from foo, bar
> got: SELECT FROM foo
> test: select order by foo, bar
> got: SELECT ORDER BY foo
> test: select group by foo, bar
> got: SELECT GROUP BY foo
> test: values (1)
> got: SELECT
> test: values(1), (moo), (foo)
> got: VALUES (moo)
> test: select from (values (moo)) sub
> got: VALUES (moo)
> test: with moo as (select) select from foo
> got: SELECT FROM foo
> test: select distinct foo
> got: SELECT foo
> test: select distinct on (a, b) NULL
> got: SELECT DISTINCT ON (a) NULL
> SetToDefault:
> test: update foo set a = default
> got: UPDATE foo SET a = NULL
> SortBy:
> test: select foo(1 order by moo desc)
> got: SELECT foo(1)
> test: select avg(1 order by foo)
> got: SELECT foo
> SubLink:
> test: select (select moo)
> got: SELECT moo
> test: select exists(select moo)
> got: SELECT moo
> TruncateStmt:
> test: truncate foo, bar
> got: TRUNCATE TABLE foo
> TypeCast:
> test: select foo::int
> got: SELECT foo
> UpdateStmt:
> test: update foo set a=b, c=d
> got: UPDATE foo SET c = NULL
> test: update foo set a=b where true
> got: UPDATE foo SET a = NULL
> ViewStmt:
> test: create view foo as select bar
> got: SELECT bar
> test: create view foo (n) as select 1, 2; select n = '' from foo
> got: CREATE VIEW foo (n) AS SELECT 2; SELECT n = '' FROM foo
> WindowDef:
> test: select count(*) over (partition by bar, foo)
> got: SELECT count(*) OVER (PARTITION BY bar)
> test: select count(*) over (order by bar, foo)
> got: SELECT count(*) OVER (ORDER BY bar)
> test: select count(*) over (partition by bar order by bar, foo)
> got: SELECT count(*) OVER (ORDER BY bar)
> WithClause:
> test: with recursive a(a) as (select 5), whatever as (select), b(b) as
> (select '') select a = b from a, b
> got: WITH a(a) AS (SELECT 5), b(b) AS (SELECT NULL) SELECT a = b FROM a, b
> XmlExpr:
> test: select xmlelement(name bar, moo)
> got: SELECT moo
> test: select xmlforest(foo, bar)
> got: SELECT foo
> XmlSerialize:
> test: SELECT xmlserialize(content moo as text)
> got: SELECT moo
> AlterDatabaseSetStmt:
> test: alter database foo reset all
> got: ALTER DATABASE foo RESET ALL
> AlterDefaultPrivilegesStmt:
> test: alter default privileges for role foo revoke delete on tables from bar
> got: ALTER DEFAULT PRIVILEGES FOR ROLE foo REVOKE DELETE ON TABLES FROM bar
> AlterDomainStmt:
> test: alter domain moo add check (value <> '')
> got: ALTER DOMAIN moo ADD CHECK (value <> '')
> AlterEventTrigStmt:
> test: alter event trigger foo disable
> got: ALTER EVENT TRIGGER foo DISABLE
> AlterFunctionStmt:
> test: alter function foo() strict
> got: ALTER FUNCTION foo () RETURNS NULL ON NULL INPUT
> AlterObjectSchemaStmt:
> test: alter table foo set schema bla
> got: ALTER TABLE foo SET SCHEMA bla
> AlterOwnerStmt:
> test: alter large object 42 owner to moo
> got: ALTER LARGE OBJECT 42 OWNER TO moo
> AlterRoleSetStmt:
> test: alter role foo reset all
> got: ALTER ROLE foo RESET ALL
> test: alter role foo in database bar reset all
> got: ALTER ROLE foo IN DATABASE bar RESET ALL
> AlterRoleStmt:
> test: alter role foo superuser
> got: ALTER ROLE foo SUPERUSER
> AlterSeqStmt:
> test: alter sequence foo restart 1
> got: ALTER SEQUENCE foo RESTART WITH 1
> AlterTableStmt:
> test: alter table foo drop column bar
> got: ALTER TABLE foo DROP COLUMN bar
> CommentStmt:
> test: comment on table foo is 'bar'
> got: COMMENT ON TABLE foo IS 'bar'
> CompositeTypeStmt:
> test: create type foo as (a text, b integer, c timestamp)
> got: CREATE TYPE foo AS (a text, b integer, c timestamp)
> CreateCastStmt:
> test: create cast (foo as bar) without function
> got: CREATE CAST (foo AS bar) WITHOUT FUNCTION
> CreateConversionStmt:
> test: create conversion foo for 'LATIN1' to 'UTF8' from iso8859_1_to_utf8
> got: CREATE CONVERSION foo FOR 'LATIN1' TO 'UTF8' FROM iso8859_1_to_utf8
> CreatedbStmt:
> test: create database foo
> got: CREATE DATABASE foo
> CreateDomainStmt:
> test: create domain foo as int not null
> got: CREATE DOMAIN foo AS integer NOT NULL
> CreateEnumStmt:
> test: create type foo as enum ('foo', 'bar')
> got: CREATE TYPE foo AS ENUM ('foo', 'bar')
> CreateEventTrigStmt:
> test: create event trigger foo on ddl_command_start execute function moo()
> got: CREATE EVENT TRIGGER foo ON ddl_command_start EXECUTE PROCEDURE moo()
> CreateFdwStmt:
> test: create foreign data wrapper foo
> got: CREATE FOREIGN DATA WRAPPER foo
> CreateForeignServerStmt:
> test: create server bar foreign data wrapper foo
> got: CREATE SERVER bar FOREIGN DATA WRAPPER foo
> CreateForeignTableStmt:
> test: create foreign table foo (moo int not null) server bar
> got: CREATE FOREIGN TABLE foo (moo integer NOT NULL) SERVER bar
> CreateFunctionStmt:
> test: create function moo() returns void as $$ select 1 $$ language sql
> got: CREATE FUNCTION moo() RETURNS void AS $$ select 1 $$ LANGUAGE sql
> CreateRangeStmt:
> test: create type foo as range (subtype = bar)
> got: CREATE TYPE foo AS RANGE (subtype = bar)
> CreateOpClassStmt:
> test: create operator class foo for type bar using moo as storage bla
> got: CREATE OPERATOR CLASS foo FOR TYPE bar USING moo AS STORAGE bla
> CreatePublicationStmt:
> test: create publication foo
> got: CREATE PUBLICATION foo
> CreateRoleStmt:
> test: create role foo
> got: CREATE ROLE foo
> CreateSeqStmt:
> test: create sequence foo
> got: CREATE SEQUENCE foo
> CreateSubscriptionStmt:
> test: create subscription moo connection '' publication foo
> got: CREATE SUBSCRIPTION moo CONNECTION '' PUBLICATION foo
> CreateTrigStmt:
> test: create trigger foo before insert on bar execute procedure moo()
> got: CREATE TRIGGER foo BEFORE INSERT ON bar FOR EACH STATEMENT EXECUTE
> PROCEDURE moo()
> CreateUserMappingStmt:
> test: create user mapping for moo server bar
> got: CREATE USER MAPPING FOR moo SERVER bar
> DeallocateStmt:
> test: deallocate bar
> got: DEALLOCATE PREPARE bar
> DefineStmt:
> test: create aggregate moo (*) (sfunc = foo, stype = int4[], finalfunc =
> bar, initcond = '{}')
> got: CREATE AGGREGATE moo (*) (sfunc = foo, stype = int4[], finalfunc =
> bar, initcond = '{}')
> DiscardStmt:
> test: discard all
> got: DISCARD ALL
> DoStmt:
> test: do $$ begin end $$
> got: DO $$ begin end $$
> DropdbStmt:
> test: drop database foo
> got: DROP DATABASE foo
> DropOwnedStmt:
> test: drop owned by bar
> got: DROP OWNED BY bar RESTRICT
> DropRoleStmt:
> test: drop role moo
> got: DROP ROLE moo
> DropStmt:
> test: drop table foo
> got: DROP TABLE foo
> FetchStmt:
> test: fetch all in foo
> got: FETCH FORWARD ALL FROM foo
> expect: FETCH ALL foo
> =========================== short test summary info
> ============================
> FAILED tests/test_sqlreduce.py::test_rules - Exception: FetchStmt test:
> fetch...
> ========================= 1 failed, 2 passed in 19.30s
> =========================
> E: pybuild pybuild:391: test: plugin distutils failed with: exit code=1: cd
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_sqlreduce/build; python3.11 -m pytest
> tests
> dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p "3.12
> 3.11" returned exit code 13
The full build log is available from:
http://qa-logs.debian.net/2024/01/15/sqlreduce_1.2-1_unstable.log
All bugs filed during this archive rebuild are listed at:
https://bugs.debian.org/cgi-bin/pkgreport.cgi?tag=ftbfs-20240115;[email protected]
or:
https://udd.debian.org/bugs/?release=na&merged=ign&fnewerval=7&flastmodval=7&fusertag=only&fusertagtag=ftbfs-20240115&[email protected]&allbugs=1&cseverity=1&ctags=1&caffected=1#results
A list of current common problems and possible solutions is available at
http://wiki.debian.org/qa.debian.org/FTBFS . You're welcome to contribute!
If you reassign this bug to another package, please mark it as 'affects'-ing
this package. See https://www.debian.org/Bugs/server-control#affects
If you fail to reproduce this, please provide a build log and diff it with mine
so that we can identify if something relevant changed in the meantime.