aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/postgresql/cases/truncate.err
diff options
context:
space:
mode:
authorAlexander Smirnov <alex@ydb.tech>2024-11-20 11:14:58 +0000
committerAlexander Smirnov <alex@ydb.tech>2024-11-20 11:14:58 +0000
commit31773f157bf8164364649b5f470f52dece0a4317 (patch)
tree33d0f7eef45303ab68cf08ab381ce5e5e36c5240 /yql/essentials/tests/postgresql/cases/truncate.err
parent2c7938962d8689e175574fc1e817c05049f27905 (diff)
parenteff600952d5dfe17942f38f510a8ac2b203bb3a5 (diff)
downloadydb-31773f157bf8164364649b5f470f52dece0a4317.tar.gz
Merge branch 'rightlib' into mergelibs-241120-1113
Diffstat (limited to 'yql/essentials/tests/postgresql/cases/truncate.err')
-rw-r--r--yql/essentials/tests/postgresql/cases/truncate.err1273
1 files changed, 1273 insertions, 0 deletions
diff --git a/yql/essentials/tests/postgresql/cases/truncate.err b/yql/essentials/tests/postgresql/cases/truncate.err
new file mode 100644
index 0000000000..2856e03888
--- /dev/null
+++ b/yql/essentials/tests/postgresql/cases/truncate.err
@@ -0,0 +1,1273 @@
+<sql-statement>
+-- Test basic TRUNCATE functionality.
+CREATE TABLE truncate_a (col1 integer primary key);
+</sql-statement>
+<sql-statement>
+INSERT INTO truncate_a VALUES (1);
+</sql-statement>
+<sql-statement>
+INSERT INTO truncate_a VALUES (2);
+</sql-statement>
+<sql-statement>
+SELECT * FROM truncate_a;
+</sql-statement>
+<sql-statement>
+-- Roll truncate back
+BEGIN;
+</sql-statement>
+<sql-statement>
+TRUNCATE truncate_a;
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 257
+ TRUNCATE truncate_a;
+ ^
+<sql-statement>
+ROLLBACK;
+</sql-statement>
+<sql-statement>
+SELECT * FROM truncate_a;
+</sql-statement>
+<sql-statement>
+-- Commit the truncate this time
+BEGIN;
+</sql-statement>
+<sql-statement>
+TRUNCATE truncate_a;
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 257
+ TRUNCATE truncate_a;
+ ^
+<sql-statement>
+COMMIT;
+</sql-statement>
+<sql-statement>
+SELECT * FROM truncate_a;
+</sql-statement>
+<sql-statement>
+-- Test foreign-key checks
+CREATE TABLE trunc_b (a int REFERENCES truncate_a);
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: column constraint not supported
+ -- Test foreign-key checks
+ ^
+<sql-statement>
+CREATE TABLE trunc_c (a serial PRIMARY KEY);
+</sql-statement>
+<sql-statement>
+CREATE TABLE trunc_d (a int REFERENCES trunc_c);
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: column constraint not supported
+ CREATE TABLE trunc_d (a int REFERENCES trunc_c);
+ ^
+<sql-statement>
+CREATE TABLE trunc_e (a int REFERENCES truncate_a, b int REFERENCES trunc_c);
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: column constraint not supported
+ CREATE TABLE trunc_e (a int REFERENCES truncate_a, b int REFERENCES trunc_c);
+ ^
+<sql-statement>
+TRUNCATE TABLE truncate_a; -- fail
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 257
+ TRUNCATE TABLE truncate_a; -- fail
+ ^
+<sql-statement>
+TRUNCATE TABLE truncate_a,trunc_b; -- fail
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 257
+ TRUNCATE TABLE truncate_a,trunc_b; -- fail
+ ^
+<sql-statement>
+TRUNCATE TABLE truncate_a,trunc_b,trunc_e; -- ok
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 257
+ TRUNCATE TABLE truncate_a,trunc_b,trunc_e; -- ok
+ ^
+<sql-statement>
+TRUNCATE TABLE truncate_a,trunc_e; -- fail
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 257
+ TRUNCATE TABLE truncate_a,trunc_e; -- fail
+ ^
+<sql-statement>
+TRUNCATE TABLE trunc_c; -- fail
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 257
+ TRUNCATE TABLE trunc_c; -- fail
+ ^
+<sql-statement>
+TRUNCATE TABLE trunc_c,trunc_d; -- fail
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 257
+ TRUNCATE TABLE trunc_c,trunc_d; -- fail
+ ^
+<sql-statement>
+TRUNCATE TABLE trunc_c,trunc_d,trunc_e; -- ok
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 257
+ TRUNCATE TABLE trunc_c,trunc_d,trunc_e; -- ok
+ ^
+<sql-statement>
+TRUNCATE TABLE trunc_c,trunc_d,trunc_e,truncate_a; -- fail
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 257
+ TRUNCATE TABLE trunc_c,trunc_d,trunc_e,truncate_a; -- fail
+ ^
+<sql-statement>
+TRUNCATE TABLE trunc_c,trunc_d,trunc_e,truncate_a,trunc_b; -- ok
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 257
+ TRUNCATE TABLE trunc_c,trunc_d,trunc_e,truncate_a,trunc_b; -- ok
+ ^
+<sql-statement>
+TRUNCATE TABLE truncate_a RESTRICT; -- fail
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 257
+ TRUNCATE TABLE truncate_a RESTRICT; -- fail
+ ^
+<sql-statement>
+TRUNCATE TABLE truncate_a CASCADE; -- ok
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 257
+ TRUNCATE TABLE truncate_a CASCADE; -- ok
+ ^
+<sql-statement>
+-- circular references
+ALTER TABLE truncate_a ADD FOREIGN KEY (col1) REFERENCES trunc_c;
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
+ -- circular references
+ ^
+<sql-statement>
+-- Add some data to verify that truncating actually works ...
+INSERT INTO trunc_c VALUES (1);
+</sql-statement>
+<sql-statement>
+INSERT INTO truncate_a VALUES (1);
+</sql-statement>
+<sql-statement>
+INSERT INTO trunc_b VALUES (1);
+</sql-statement>
+-stdin-:<main>: Fatal: Table metadata loading
+
+ -stdin-:<main>: Fatal: ydb/library/yql/providers/yt/gateway/file/yql_yt_file_services.cpp:44: Table not found: plato.trunc_b
+
+<sql-statement>
+INSERT INTO trunc_d VALUES (1);
+</sql-statement>
+-stdin-:<main>: Fatal: Table metadata loading
+
+ -stdin-:<main>: Fatal: ydb/library/yql/providers/yt/gateway/file/yql_yt_file_services.cpp:44: Table not found: plato.trunc_d
+
+<sql-statement>
+INSERT INTO trunc_e VALUES (1,1);
+</sql-statement>
+-stdin-:<main>: Fatal: Table metadata loading
+
+ -stdin-:<main>: Fatal: ydb/library/yql/providers/yt/gateway/file/yql_yt_file_services.cpp:44: Table not found: plato.trunc_e
+
+<sql-statement>
+TRUNCATE TABLE trunc_c;
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 257
+ TRUNCATE TABLE trunc_c;
+ ^
+<sql-statement>
+TRUNCATE TABLE trunc_c,truncate_a;
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 257
+ TRUNCATE TABLE trunc_c,truncate_a;
+ ^
+<sql-statement>
+TRUNCATE TABLE trunc_c,truncate_a,trunc_d;
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 257
+ TRUNCATE TABLE trunc_c,truncate_a,trunc_d;
+ ^
+<sql-statement>
+TRUNCATE TABLE trunc_c,truncate_a,trunc_d,trunc_e;
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 257
+ TRUNCATE TABLE trunc_c,truncate_a,trunc_d,trunc_e;
+ ^
+<sql-statement>
+TRUNCATE TABLE trunc_c,truncate_a,trunc_d,trunc_e,trunc_b;
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 257
+ TRUNCATE TABLE trunc_c,truncate_a,trunc_d,trunc_e,trunc_b;
+ ^
+<sql-statement>
+-- Verify that truncating did actually work
+SELECT * FROM truncate_a
+ UNION ALL
+ SELECT * FROM trunc_c
+ UNION ALL
+ SELECT * FROM trunc_b
+ UNION ALL
+ SELECT * FROM trunc_d;
+</sql-statement>
+-stdin-:<main>: Fatal: Table metadata loading
+
+ -stdin-:<main>: Fatal: ydb/library/yql/providers/yt/gateway/file/yql_yt_file_services.cpp:44: Table not found: plato.trunc_b
+
+<sql-statement>
+SELECT * FROM trunc_e;
+</sql-statement>
+-stdin-:<main>: Fatal: Table metadata loading
+
+ -stdin-:<main>: Fatal: ydb/library/yql/providers/yt/gateway/file/yql_yt_file_services.cpp:44: Table not found: plato.trunc_e
+
+<sql-statement>
+-- Add data again to test TRUNCATE ... CASCADE
+INSERT INTO trunc_c VALUES (1);
+</sql-statement>
+<sql-statement>
+INSERT INTO truncate_a VALUES (1);
+</sql-statement>
+<sql-statement>
+INSERT INTO trunc_b VALUES (1);
+</sql-statement>
+-stdin-:<main>: Fatal: Table metadata loading
+
+ -stdin-:<main>: Fatal: ydb/library/yql/providers/yt/gateway/file/yql_yt_file_services.cpp:44: Table not found: plato.trunc_b
+
+<sql-statement>
+INSERT INTO trunc_d VALUES (1);
+</sql-statement>
+-stdin-:<main>: Fatal: Table metadata loading
+
+ -stdin-:<main>: Fatal: ydb/library/yql/providers/yt/gateway/file/yql_yt_file_services.cpp:44: Table not found: plato.trunc_d
+
+<sql-statement>
+INSERT INTO trunc_e VALUES (1,1);
+</sql-statement>
+-stdin-:<main>: Fatal: Table metadata loading
+
+ -stdin-:<main>: Fatal: ydb/library/yql/providers/yt/gateway/file/yql_yt_file_services.cpp:44: Table not found: plato.trunc_e
+
+<sql-statement>
+TRUNCATE TABLE trunc_c CASCADE; -- ok
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 257
+ TRUNCATE TABLE trunc_c CASCADE; -- ok
+ ^
+<sql-statement>
+SELECT * FROM truncate_a
+ UNION ALL
+ SELECT * FROM trunc_c
+ UNION ALL
+ SELECT * FROM trunc_b
+ UNION ALL
+ SELECT * FROM trunc_d;
+</sql-statement>
+-stdin-:<main>: Fatal: Table metadata loading
+
+ -stdin-:<main>: Fatal: ydb/library/yql/providers/yt/gateway/file/yql_yt_file_services.cpp:44: Table not found: plato.trunc_b
+
+<sql-statement>
+SELECT * FROM trunc_e;
+</sql-statement>
+-stdin-:<main>: Fatal: Table metadata loading
+
+ -stdin-:<main>: Fatal: ydb/library/yql/providers/yt/gateway/file/yql_yt_file_services.cpp:44: Table not found: plato.trunc_e
+
+<sql-statement>
+DROP TABLE truncate_a,trunc_c,trunc_b,trunc_d,trunc_e CASCADE;
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: CASCADE is not implemented
+ DROP TABLE truncate_a,trunc_c,trunc_b,trunc_d,trunc_e CASCADE;
+ ^
+<sql-statement>
+-- Test TRUNCATE with inheritance
+CREATE TABLE trunc_f (col1 integer primary key);
+</sql-statement>
+<sql-statement>
+INSERT INTO trunc_f VALUES (1);
+</sql-statement>
+<sql-statement>
+INSERT INTO trunc_f VALUES (2);
+</sql-statement>
+<sql-statement>
+CREATE TABLE trunc_fa (col2a text) INHERITS (trunc_f);
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: table inheritance not supported
+ CREATE TABLE trunc_fa (col2a text) INHERITS (trunc_f);
+ ^
+<sql-statement>
+INSERT INTO trunc_fa VALUES (3, 'three');
+</sql-statement>
+-stdin-:<main>: Fatal: Table metadata loading
+
+ -stdin-:<main>: Fatal: ydb/library/yql/providers/yt/gateway/file/yql_yt_file_services.cpp:44: Table not found: plato.trunc_fa
+
+<sql-statement>
+CREATE TABLE trunc_fb (col2b int) INHERITS (trunc_f);
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: table inheritance not supported
+ CREATE TABLE trunc_fb (col2b int) INHERITS (trunc_f);
+ ^
+<sql-statement>
+INSERT INTO trunc_fb VALUES (4, 444);
+</sql-statement>
+-stdin-:<main>: Fatal: Table metadata loading
+
+ -stdin-:<main>: Fatal: ydb/library/yql/providers/yt/gateway/file/yql_yt_file_services.cpp:44: Table not found: plato.trunc_fb
+
+<sql-statement>
+CREATE TABLE trunc_faa (col3 text) INHERITS (trunc_fa);
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: table inheritance not supported
+ CREATE TABLE trunc_faa (col3 text) INHERITS (trunc_fa);
+ ^
+<sql-statement>
+INSERT INTO trunc_faa VALUES (5, 'five', 'FIVE');
+</sql-statement>
+-stdin-:<main>: Fatal: Table metadata loading
+
+ -stdin-:<main>: Fatal: ydb/library/yql/providers/yt/gateway/file/yql_yt_file_services.cpp:44: Table not found: plato.trunc_faa
+
+<sql-statement>
+BEGIN;
+</sql-statement>
+<sql-statement>
+SELECT * FROM trunc_f;
+</sql-statement>
+<sql-statement>
+TRUNCATE trunc_f;
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 257
+ TRUNCATE trunc_f;
+ ^
+<sql-statement>
+SELECT * FROM trunc_f;
+</sql-statement>
+<sql-statement>
+ROLLBACK;
+</sql-statement>
+<sql-statement>
+BEGIN;
+</sql-statement>
+<sql-statement>
+SELECT * FROM trunc_f;
+</sql-statement>
+<sql-statement>
+TRUNCATE ONLY trunc_f;
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 257
+ TRUNCATE ONLY trunc_f;
+ ^
+<sql-statement>
+SELECT * FROM trunc_f;
+</sql-statement>
+<sql-statement>
+ROLLBACK;
+</sql-statement>
+<sql-statement>
+BEGIN;
+</sql-statement>
+<sql-statement>
+SELECT * FROM trunc_f;
+</sql-statement>
+<sql-statement>
+SELECT * FROM trunc_fa;
+</sql-statement>
+-stdin-:<main>: Fatal: Table metadata loading
+
+ -stdin-:<main>: Fatal: ydb/library/yql/providers/yt/gateway/file/yql_yt_file_services.cpp:44: Table not found: plato.trunc_fa
+
+<sql-statement>
+SELECT * FROM trunc_faa;
+</sql-statement>
+-stdin-:<main>: Fatal: Table metadata loading
+
+ -stdin-:<main>: Fatal: ydb/library/yql/providers/yt/gateway/file/yql_yt_file_services.cpp:44: Table not found: plato.trunc_faa
+
+<sql-statement>
+TRUNCATE ONLY trunc_fb, ONLY trunc_fa;
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 257
+ TRUNCATE ONLY trunc_fb, ONLY trunc_fa;
+ ^
+<sql-statement>
+SELECT * FROM trunc_f;
+</sql-statement>
+<sql-statement>
+SELECT * FROM trunc_fa;
+</sql-statement>
+-stdin-:<main>: Fatal: Table metadata loading
+
+ -stdin-:<main>: Fatal: ydb/library/yql/providers/yt/gateway/file/yql_yt_file_services.cpp:44: Table not found: plato.trunc_fa
+
+<sql-statement>
+SELECT * FROM trunc_faa;
+</sql-statement>
+-stdin-:<main>: Fatal: Table metadata loading
+
+ -stdin-:<main>: Fatal: ydb/library/yql/providers/yt/gateway/file/yql_yt_file_services.cpp:44: Table not found: plato.trunc_faa
+
+<sql-statement>
+ROLLBACK;
+</sql-statement>
+<sql-statement>
+BEGIN;
+</sql-statement>
+<sql-statement>
+SELECT * FROM trunc_f;
+</sql-statement>
+<sql-statement>
+SELECT * FROM trunc_fa;
+</sql-statement>
+-stdin-:<main>: Fatal: Table metadata loading
+
+ -stdin-:<main>: Fatal: ydb/library/yql/providers/yt/gateway/file/yql_yt_file_services.cpp:44: Table not found: plato.trunc_fa
+
+<sql-statement>
+SELECT * FROM trunc_faa;
+</sql-statement>
+-stdin-:<main>: Fatal: Table metadata loading
+
+ -stdin-:<main>: Fatal: ydb/library/yql/providers/yt/gateway/file/yql_yt_file_services.cpp:44: Table not found: plato.trunc_faa
+
+<sql-statement>
+TRUNCATE ONLY trunc_fb, trunc_fa;
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 257
+ TRUNCATE ONLY trunc_fb, trunc_fa;
+ ^
+<sql-statement>
+SELECT * FROM trunc_f;
+</sql-statement>
+<sql-statement>
+SELECT * FROM trunc_fa;
+</sql-statement>
+-stdin-:<main>: Fatal: Table metadata loading
+
+ -stdin-:<main>: Fatal: ydb/library/yql/providers/yt/gateway/file/yql_yt_file_services.cpp:44: Table not found: plato.trunc_fa
+
+<sql-statement>
+SELECT * FROM trunc_faa;
+</sql-statement>
+-stdin-:<main>: Fatal: Table metadata loading
+
+ -stdin-:<main>: Fatal: ydb/library/yql/providers/yt/gateway/file/yql_yt_file_services.cpp:44: Table not found: plato.trunc_faa
+
+<sql-statement>
+ROLLBACK;
+</sql-statement>
+<sql-statement>
+DROP TABLE trunc_f CASCADE;
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: CASCADE is not implemented
+ DROP TABLE trunc_f CASCADE;
+ ^
+<sql-statement>
+-- Test ON TRUNCATE triggers
+CREATE TABLE trunc_trigger_test (f1 int, f2 text, f3 text);
+</sql-statement>
+<sql-statement>
+CREATE TABLE trunc_trigger_log (tgop text, tglevel text, tgwhen text,
+ tgargv text, tgtable name, rowcount bigint);
+</sql-statement>
+<sql-statement>
+CREATE FUNCTION trunctrigger() RETURNS trigger as $$
+declare c bigint;
+begin
+ execute 'select count(*) from ' || quote_ident(tg_table_name) into c;
+ insert into trunc_trigger_log values
+ (TG_OP, TG_LEVEL, TG_WHEN, TG_ARGV[0], tg_table_name, c);
+ return null;
+end;
+$$ LANGUAGE plpgsql;
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 261
+ CREATE FUNCTION trunctrigger() RETURNS trigger as $$
+ ^
+<sql-statement>
+-- basic before trigger
+INSERT INTO trunc_trigger_test VALUES(1, 'foo', 'bar'), (2, 'baz', 'quux');
+</sql-statement>
+<sql-statement>
+CREATE TRIGGER t
+BEFORE TRUNCATE ON trunc_trigger_test
+FOR EACH STATEMENT
+EXECUTE PROCEDURE trunctrigger('before trigger truncate');
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 283
+ CREATE TRIGGER t
+ ^
+<sql-statement>
+SELECT count(*) as "Row count in test table" FROM trunc_trigger_test;
+</sql-statement>
+<sql-statement>
+SELECT * FROM trunc_trigger_log;
+</sql-statement>
+<sql-statement>
+TRUNCATE trunc_trigger_test;
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 257
+ TRUNCATE trunc_trigger_test;
+ ^
+<sql-statement>
+SELECT count(*) as "Row count in test table" FROM trunc_trigger_test;
+</sql-statement>
+<sql-statement>
+SELECT * FROM trunc_trigger_log;
+</sql-statement>
+<sql-statement>
+DROP TRIGGER t ON trunc_trigger_test;
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: Not supported object type for DROP
+ DROP TRIGGER t ON trunc_trigger_test;
+ ^
+<sql-statement>
+truncate trunc_trigger_log;
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 257
+ truncate trunc_trigger_log;
+ ^
+<sql-statement>
+-- same test with an after trigger
+INSERT INTO trunc_trigger_test VALUES(1, 'foo', 'bar'), (2, 'baz', 'quux');
+</sql-statement>
+<sql-statement>
+CREATE TRIGGER tt
+AFTER TRUNCATE ON trunc_trigger_test
+FOR EACH STATEMENT
+EXECUTE PROCEDURE trunctrigger('after trigger truncate');
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 283
+ CREATE TRIGGER tt
+ ^
+<sql-statement>
+SELECT count(*) as "Row count in test table" FROM trunc_trigger_test;
+</sql-statement>
+<sql-statement>
+SELECT * FROM trunc_trigger_log;
+</sql-statement>
+<sql-statement>
+TRUNCATE trunc_trigger_test;
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 257
+ TRUNCATE trunc_trigger_test;
+ ^
+<sql-statement>
+SELECT count(*) as "Row count in test table" FROM trunc_trigger_test;
+</sql-statement>
+<sql-statement>
+SELECT * FROM trunc_trigger_log;
+</sql-statement>
+<sql-statement>
+DROP TABLE trunc_trigger_test;
+</sql-statement>
+<sql-statement>
+DROP TABLE trunc_trigger_log;
+</sql-statement>
+<sql-statement>
+DROP FUNCTION trunctrigger();
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: DropStmt: alternative is not implemented yet : 386
+ DROP FUNCTION trunctrigger();
+ ^
+<sql-statement>
+-- test TRUNCATE ... RESTART IDENTITY
+CREATE SEQUENCE truncate_a_id1 START WITH 33;
+</sql-statement>
+-stdin-:<main>: Error: Pre type annotation
+
+ -stdin-:<main>:1:1: Error: Unexpected tag: pgObject
+ -- test TRUNCATE ... RESTART IDENTITY
+ ^
+<sql-statement>
+CREATE TABLE truncate_a (id serial,
+ id1 integer default nextval('truncate_a_id1'));
+</sql-statement>
+<sql-statement>
+ALTER SEQUENCE truncate_a_id1 OWNED BY truncate_a.id1;
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: alternative is not implemented yet : 231
+ ALTER SEQUENCE truncate_a_id1 OWNED BY truncate_a.id1;
+ ^
+<sql-statement>
+INSERT INTO truncate_a DEFAULT VALUES;
+</sql-statement>
+-stdin-:<main>: Fatal: tools/enum_parser/enum_serialization_runtime/enum_runtime.cpp:70: Key 'default_values' not found in enum NYql::EYtSettingType. Valid options are: 'initial', 'infer_scheme', 'force_infer_schema', 'do_not_fail_on_invalid_schema', 'direct_read', 'view', 'mode', 'scheme', 'weak_concat', 'anonymous', 'with_qb', 'inline', 'sample', 'joinLabel', 'ignore_non_existing', 'warn_non_existing', 'xlock', 'unordered', 'nonUnique', 'userschema', 'usercolumns', 'statcolumns', 'syscolumns', 'ignoretypev3', 'memUsage', 'itemsCount', 'rowFactor', 'ordered', 'keyFilter', 'keyFilter2', 'take', 'skip', 'limit', 'sortLimitBy', 'sortBy', 'reduceBy', 'reduceFilterBy', 'forceTransform', 'weakFields', 'sharded', 'combineChunks', 'jobCount', 'joinReduce', 'firstAsPrimary', 'flow', 'keepSorted', 'keySwitch', 'uniqueBy', 'opHash', 'mapOutputType', 'reduceInputType', 'noDq', 'split', 'compression_codec', 'erasure_codec', 'expiration', 'replication_factor', 'user_attrs', 'media', 'primary_medium', 'keep_meta', 'monotonic_keys', 'mutationid'.
+
+<sql-statement>
+INSERT INTO truncate_a DEFAULT VALUES;
+</sql-statement>
+-stdin-:<main>: Fatal: tools/enum_parser/enum_serialization_runtime/enum_runtime.cpp:70: Key 'default_values' not found in enum NYql::EYtSettingType. Valid options are: 'initial', 'infer_scheme', 'force_infer_schema', 'do_not_fail_on_invalid_schema', 'direct_read', 'view', 'mode', 'scheme', 'weak_concat', 'anonymous', 'with_qb', 'inline', 'sample', 'joinLabel', 'ignore_non_existing', 'warn_non_existing', 'xlock', 'unordered', 'nonUnique', 'userschema', 'usercolumns', 'statcolumns', 'syscolumns', 'ignoretypev3', 'memUsage', 'itemsCount', 'rowFactor', 'ordered', 'keyFilter', 'keyFilter2', 'take', 'skip', 'limit', 'sortLimitBy', 'sortBy', 'reduceBy', 'reduceFilterBy', 'forceTransform', 'weakFields', 'sharded', 'combineChunks', 'jobCount', 'joinReduce', 'firstAsPrimary', 'flow', 'keepSorted', 'keySwitch', 'uniqueBy', 'opHash', 'mapOutputType', 'reduceInputType', 'noDq', 'split', 'compression_codec', 'erasure_codec', 'expiration', 'replication_factor', 'user_attrs', 'media', 'primary_medium', 'keep_meta', 'monotonic_keys', 'mutationid'.
+
+<sql-statement>
+SELECT * FROM truncate_a;
+</sql-statement>
+<sql-statement>
+TRUNCATE truncate_a;
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 257
+ TRUNCATE truncate_a;
+ ^
+<sql-statement>
+INSERT INTO truncate_a DEFAULT VALUES;
+</sql-statement>
+-stdin-:<main>: Fatal: tools/enum_parser/enum_serialization_runtime/enum_runtime.cpp:70: Key 'default_values' not found in enum NYql::EYtSettingType. Valid options are: 'initial', 'infer_scheme', 'force_infer_schema', 'do_not_fail_on_invalid_schema', 'direct_read', 'view', 'mode', 'scheme', 'weak_concat', 'anonymous', 'with_qb', 'inline', 'sample', 'joinLabel', 'ignore_non_existing', 'warn_non_existing', 'xlock', 'unordered', 'nonUnique', 'userschema', 'usercolumns', 'statcolumns', 'syscolumns', 'ignoretypev3', 'memUsage', 'itemsCount', 'rowFactor', 'ordered', 'keyFilter', 'keyFilter2', 'take', 'skip', 'limit', 'sortLimitBy', 'sortBy', 'reduceBy', 'reduceFilterBy', 'forceTransform', 'weakFields', 'sharded', 'combineChunks', 'jobCount', 'joinReduce', 'firstAsPrimary', 'flow', 'keepSorted', 'keySwitch', 'uniqueBy', 'opHash', 'mapOutputType', 'reduceInputType', 'noDq', 'split', 'compression_codec', 'erasure_codec', 'expiration', 'replication_factor', 'user_attrs', 'media', 'primary_medium', 'keep_meta', 'monotonic_keys', 'mutationid'.
+
+<sql-statement>
+INSERT INTO truncate_a DEFAULT VALUES;
+</sql-statement>
+-stdin-:<main>: Fatal: tools/enum_parser/enum_serialization_runtime/enum_runtime.cpp:70: Key 'default_values' not found in enum NYql::EYtSettingType. Valid options are: 'initial', 'infer_scheme', 'force_infer_schema', 'do_not_fail_on_invalid_schema', 'direct_read', 'view', 'mode', 'scheme', 'weak_concat', 'anonymous', 'with_qb', 'inline', 'sample', 'joinLabel', 'ignore_non_existing', 'warn_non_existing', 'xlock', 'unordered', 'nonUnique', 'userschema', 'usercolumns', 'statcolumns', 'syscolumns', 'ignoretypev3', 'memUsage', 'itemsCount', 'rowFactor', 'ordered', 'keyFilter', 'keyFilter2', 'take', 'skip', 'limit', 'sortLimitBy', 'sortBy', 'reduceBy', 'reduceFilterBy', 'forceTransform', 'weakFields', 'sharded', 'combineChunks', 'jobCount', 'joinReduce', 'firstAsPrimary', 'flow', 'keepSorted', 'keySwitch', 'uniqueBy', 'opHash', 'mapOutputType', 'reduceInputType', 'noDq', 'split', 'compression_codec', 'erasure_codec', 'expiration', 'replication_factor', 'user_attrs', 'media', 'primary_medium', 'keep_meta', 'monotonic_keys', 'mutationid'.
+
+<sql-statement>
+SELECT * FROM truncate_a;
+</sql-statement>
+<sql-statement>
+TRUNCATE truncate_a RESTART IDENTITY;
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 257
+ TRUNCATE truncate_a RESTART IDENTITY;
+ ^
+<sql-statement>
+INSERT INTO truncate_a DEFAULT VALUES;
+</sql-statement>
+-stdin-:<main>: Fatal: tools/enum_parser/enum_serialization_runtime/enum_runtime.cpp:70: Key 'default_values' not found in enum NYql::EYtSettingType. Valid options are: 'initial', 'infer_scheme', 'force_infer_schema', 'do_not_fail_on_invalid_schema', 'direct_read', 'view', 'mode', 'scheme', 'weak_concat', 'anonymous', 'with_qb', 'inline', 'sample', 'joinLabel', 'ignore_non_existing', 'warn_non_existing', 'xlock', 'unordered', 'nonUnique', 'userschema', 'usercolumns', 'statcolumns', 'syscolumns', 'ignoretypev3', 'memUsage', 'itemsCount', 'rowFactor', 'ordered', 'keyFilter', 'keyFilter2', 'take', 'skip', 'limit', 'sortLimitBy', 'sortBy', 'reduceBy', 'reduceFilterBy', 'forceTransform', 'weakFields', 'sharded', 'combineChunks', 'jobCount', 'joinReduce', 'firstAsPrimary', 'flow', 'keepSorted', 'keySwitch', 'uniqueBy', 'opHash', 'mapOutputType', 'reduceInputType', 'noDq', 'split', 'compression_codec', 'erasure_codec', 'expiration', 'replication_factor', 'user_attrs', 'media', 'primary_medium', 'keep_meta', 'monotonic_keys', 'mutationid'.
+
+<sql-statement>
+INSERT INTO truncate_a DEFAULT VALUES;
+</sql-statement>
+-stdin-:<main>: Fatal: tools/enum_parser/enum_serialization_runtime/enum_runtime.cpp:70: Key 'default_values' not found in enum NYql::EYtSettingType. Valid options are: 'initial', 'infer_scheme', 'force_infer_schema', 'do_not_fail_on_invalid_schema', 'direct_read', 'view', 'mode', 'scheme', 'weak_concat', 'anonymous', 'with_qb', 'inline', 'sample', 'joinLabel', 'ignore_non_existing', 'warn_non_existing', 'xlock', 'unordered', 'nonUnique', 'userschema', 'usercolumns', 'statcolumns', 'syscolumns', 'ignoretypev3', 'memUsage', 'itemsCount', 'rowFactor', 'ordered', 'keyFilter', 'keyFilter2', 'take', 'skip', 'limit', 'sortLimitBy', 'sortBy', 'reduceBy', 'reduceFilterBy', 'forceTransform', 'weakFields', 'sharded', 'combineChunks', 'jobCount', 'joinReduce', 'firstAsPrimary', 'flow', 'keepSorted', 'keySwitch', 'uniqueBy', 'opHash', 'mapOutputType', 'reduceInputType', 'noDq', 'split', 'compression_codec', 'erasure_codec', 'expiration', 'replication_factor', 'user_attrs', 'media', 'primary_medium', 'keep_meta', 'monotonic_keys', 'mutationid'.
+
+<sql-statement>
+SELECT * FROM truncate_a;
+</sql-statement>
+<sql-statement>
+CREATE TABLE truncate_b (id int GENERATED ALWAYS AS IDENTITY (START WITH 44));
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: column constraint not supported
+ CREATE TABLE truncate_b (id int GENERATED ALWAYS AS IDENTITY (START WITH 44));
+ ^
+<sql-statement>
+INSERT INTO truncate_b DEFAULT VALUES;
+</sql-statement>
+-stdin-:<main>: Fatal: tools/enum_parser/enum_serialization_runtime/enum_runtime.cpp:70: Key 'default_values' not found in enum NYql::EYtSettingType. Valid options are: 'initial', 'infer_scheme', 'force_infer_schema', 'do_not_fail_on_invalid_schema', 'direct_read', 'view', 'mode', 'scheme', 'weak_concat', 'anonymous', 'with_qb', 'inline', 'sample', 'joinLabel', 'ignore_non_existing', 'warn_non_existing', 'xlock', 'unordered', 'nonUnique', 'userschema', 'usercolumns', 'statcolumns', 'syscolumns', 'ignoretypev3', 'memUsage', 'itemsCount', 'rowFactor', 'ordered', 'keyFilter', 'keyFilter2', 'take', 'skip', 'limit', 'sortLimitBy', 'sortBy', 'reduceBy', 'reduceFilterBy', 'forceTransform', 'weakFields', 'sharded', 'combineChunks', 'jobCount', 'joinReduce', 'firstAsPrimary', 'flow', 'keepSorted', 'keySwitch', 'uniqueBy', 'opHash', 'mapOutputType', 'reduceInputType', 'noDq', 'split', 'compression_codec', 'erasure_codec', 'expiration', 'replication_factor', 'user_attrs', 'media', 'primary_medium', 'keep_meta', 'monotonic_keys', 'mutationid'.
+
+<sql-statement>
+INSERT INTO truncate_b DEFAULT VALUES;
+</sql-statement>
+-stdin-:<main>: Fatal: tools/enum_parser/enum_serialization_runtime/enum_runtime.cpp:70: Key 'default_values' not found in enum NYql::EYtSettingType. Valid options are: 'initial', 'infer_scheme', 'force_infer_schema', 'do_not_fail_on_invalid_schema', 'direct_read', 'view', 'mode', 'scheme', 'weak_concat', 'anonymous', 'with_qb', 'inline', 'sample', 'joinLabel', 'ignore_non_existing', 'warn_non_existing', 'xlock', 'unordered', 'nonUnique', 'userschema', 'usercolumns', 'statcolumns', 'syscolumns', 'ignoretypev3', 'memUsage', 'itemsCount', 'rowFactor', 'ordered', 'keyFilter', 'keyFilter2', 'take', 'skip', 'limit', 'sortLimitBy', 'sortBy', 'reduceBy', 'reduceFilterBy', 'forceTransform', 'weakFields', 'sharded', 'combineChunks', 'jobCount', 'joinReduce', 'firstAsPrimary', 'flow', 'keepSorted', 'keySwitch', 'uniqueBy', 'opHash', 'mapOutputType', 'reduceInputType', 'noDq', 'split', 'compression_codec', 'erasure_codec', 'expiration', 'replication_factor', 'user_attrs', 'media', 'primary_medium', 'keep_meta', 'monotonic_keys', 'mutationid'.
+
+<sql-statement>
+SELECT * FROM truncate_b;
+</sql-statement>
+-stdin-:<main>: Fatal: Table metadata loading
+
+ -stdin-:<main>: Fatal: ydb/library/yql/providers/yt/gateway/file/yql_yt_file_services.cpp:44: Table not found: plato.truncate_b
+
+<sql-statement>
+TRUNCATE truncate_b;
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 257
+ TRUNCATE truncate_b;
+ ^
+<sql-statement>
+INSERT INTO truncate_b DEFAULT VALUES;
+</sql-statement>
+-stdin-:<main>: Fatal: tools/enum_parser/enum_serialization_runtime/enum_runtime.cpp:70: Key 'default_values' not found in enum NYql::EYtSettingType. Valid options are: 'initial', 'infer_scheme', 'force_infer_schema', 'do_not_fail_on_invalid_schema', 'direct_read', 'view', 'mode', 'scheme', 'weak_concat', 'anonymous', 'with_qb', 'inline', 'sample', 'joinLabel', 'ignore_non_existing', 'warn_non_existing', 'xlock', 'unordered', 'nonUnique', 'userschema', 'usercolumns', 'statcolumns', 'syscolumns', 'ignoretypev3', 'memUsage', 'itemsCount', 'rowFactor', 'ordered', 'keyFilter', 'keyFilter2', 'take', 'skip', 'limit', 'sortLimitBy', 'sortBy', 'reduceBy', 'reduceFilterBy', 'forceTransform', 'weakFields', 'sharded', 'combineChunks', 'jobCount', 'joinReduce', 'firstAsPrimary', 'flow', 'keepSorted', 'keySwitch', 'uniqueBy', 'opHash', 'mapOutputType', 'reduceInputType', 'noDq', 'split', 'compression_codec', 'erasure_codec', 'expiration', 'replication_factor', 'user_attrs', 'media', 'primary_medium', 'keep_meta', 'monotonic_keys', 'mutationid'.
+
+<sql-statement>
+INSERT INTO truncate_b DEFAULT VALUES;
+</sql-statement>
+-stdin-:<main>: Fatal: tools/enum_parser/enum_serialization_runtime/enum_runtime.cpp:70: Key 'default_values' not found in enum NYql::EYtSettingType. Valid options are: 'initial', 'infer_scheme', 'force_infer_schema', 'do_not_fail_on_invalid_schema', 'direct_read', 'view', 'mode', 'scheme', 'weak_concat', 'anonymous', 'with_qb', 'inline', 'sample', 'joinLabel', 'ignore_non_existing', 'warn_non_existing', 'xlock', 'unordered', 'nonUnique', 'userschema', 'usercolumns', 'statcolumns', 'syscolumns', 'ignoretypev3', 'memUsage', 'itemsCount', 'rowFactor', 'ordered', 'keyFilter', 'keyFilter2', 'take', 'skip', 'limit', 'sortLimitBy', 'sortBy', 'reduceBy', 'reduceFilterBy', 'forceTransform', 'weakFields', 'sharded', 'combineChunks', 'jobCount', 'joinReduce', 'firstAsPrimary', 'flow', 'keepSorted', 'keySwitch', 'uniqueBy', 'opHash', 'mapOutputType', 'reduceInputType', 'noDq', 'split', 'compression_codec', 'erasure_codec', 'expiration', 'replication_factor', 'user_attrs', 'media', 'primary_medium', 'keep_meta', 'monotonic_keys', 'mutationid'.
+
+<sql-statement>
+SELECT * FROM truncate_b;
+</sql-statement>
+-stdin-:<main>: Fatal: Table metadata loading
+
+ -stdin-:<main>: Fatal: ydb/library/yql/providers/yt/gateway/file/yql_yt_file_services.cpp:44: Table not found: plato.truncate_b
+
+<sql-statement>
+TRUNCATE truncate_b RESTART IDENTITY;
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 257
+ TRUNCATE truncate_b RESTART IDENTITY;
+ ^
+<sql-statement>
+INSERT INTO truncate_b DEFAULT VALUES;
+</sql-statement>
+-stdin-:<main>: Fatal: tools/enum_parser/enum_serialization_runtime/enum_runtime.cpp:70: Key 'default_values' not found in enum NYql::EYtSettingType. Valid options are: 'initial', 'infer_scheme', 'force_infer_schema', 'do_not_fail_on_invalid_schema', 'direct_read', 'view', 'mode', 'scheme', 'weak_concat', 'anonymous', 'with_qb', 'inline', 'sample', 'joinLabel', 'ignore_non_existing', 'warn_non_existing', 'xlock', 'unordered', 'nonUnique', 'userschema', 'usercolumns', 'statcolumns', 'syscolumns', 'ignoretypev3', 'memUsage', 'itemsCount', 'rowFactor', 'ordered', 'keyFilter', 'keyFilter2', 'take', 'skip', 'limit', 'sortLimitBy', 'sortBy', 'reduceBy', 'reduceFilterBy', 'forceTransform', 'weakFields', 'sharded', 'combineChunks', 'jobCount', 'joinReduce', 'firstAsPrimary', 'flow', 'keepSorted', 'keySwitch', 'uniqueBy', 'opHash', 'mapOutputType', 'reduceInputType', 'noDq', 'split', 'compression_codec', 'erasure_codec', 'expiration', 'replication_factor', 'user_attrs', 'media', 'primary_medium', 'keep_meta', 'monotonic_keys', 'mutationid'.
+
+<sql-statement>
+INSERT INTO truncate_b DEFAULT VALUES;
+</sql-statement>
+-stdin-:<main>: Fatal: tools/enum_parser/enum_serialization_runtime/enum_runtime.cpp:70: Key 'default_values' not found in enum NYql::EYtSettingType. Valid options are: 'initial', 'infer_scheme', 'force_infer_schema', 'do_not_fail_on_invalid_schema', 'direct_read', 'view', 'mode', 'scheme', 'weak_concat', 'anonymous', 'with_qb', 'inline', 'sample', 'joinLabel', 'ignore_non_existing', 'warn_non_existing', 'xlock', 'unordered', 'nonUnique', 'userschema', 'usercolumns', 'statcolumns', 'syscolumns', 'ignoretypev3', 'memUsage', 'itemsCount', 'rowFactor', 'ordered', 'keyFilter', 'keyFilter2', 'take', 'skip', 'limit', 'sortLimitBy', 'sortBy', 'reduceBy', 'reduceFilterBy', 'forceTransform', 'weakFields', 'sharded', 'combineChunks', 'jobCount', 'joinReduce', 'firstAsPrimary', 'flow', 'keepSorted', 'keySwitch', 'uniqueBy', 'opHash', 'mapOutputType', 'reduceInputType', 'noDq', 'split', 'compression_codec', 'erasure_codec', 'expiration', 'replication_factor', 'user_attrs', 'media', 'primary_medium', 'keep_meta', 'monotonic_keys', 'mutationid'.
+
+<sql-statement>
+SELECT * FROM truncate_b;
+</sql-statement>
+-stdin-:<main>: Fatal: Table metadata loading
+
+ -stdin-:<main>: Fatal: ydb/library/yql/providers/yt/gateway/file/yql_yt_file_services.cpp:44: Table not found: plato.truncate_b
+
+<sql-statement>
+-- check rollback of a RESTART IDENTITY operation
+BEGIN;
+</sql-statement>
+<sql-statement>
+TRUNCATE truncate_a RESTART IDENTITY;
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 257
+ TRUNCATE truncate_a RESTART IDENTITY;
+ ^
+<sql-statement>
+INSERT INTO truncate_a DEFAULT VALUES;
+</sql-statement>
+-stdin-:<main>: Fatal: tools/enum_parser/enum_serialization_runtime/enum_runtime.cpp:70: Key 'default_values' not found in enum NYql::EYtSettingType. Valid options are: 'initial', 'infer_scheme', 'force_infer_schema', 'do_not_fail_on_invalid_schema', 'direct_read', 'view', 'mode', 'scheme', 'weak_concat', 'anonymous', 'with_qb', 'inline', 'sample', 'joinLabel', 'ignore_non_existing', 'warn_non_existing', 'xlock', 'unordered', 'nonUnique', 'userschema', 'usercolumns', 'statcolumns', 'syscolumns', 'ignoretypev3', 'memUsage', 'itemsCount', 'rowFactor', 'ordered', 'keyFilter', 'keyFilter2', 'take', 'skip', 'limit', 'sortLimitBy', 'sortBy', 'reduceBy', 'reduceFilterBy', 'forceTransform', 'weakFields', 'sharded', 'combineChunks', 'jobCount', 'joinReduce', 'firstAsPrimary', 'flow', 'keepSorted', 'keySwitch', 'uniqueBy', 'opHash', 'mapOutputType', 'reduceInputType', 'noDq', 'split', 'compression_codec', 'erasure_codec', 'expiration', 'replication_factor', 'user_attrs', 'media', 'primary_medium', 'keep_meta', 'monotonic_keys', 'mutationid'.
+
+<sql-statement>
+SELECT * FROM truncate_a;
+</sql-statement>
+<sql-statement>
+ROLLBACK;
+</sql-statement>
+<sql-statement>
+INSERT INTO truncate_a DEFAULT VALUES;
+</sql-statement>
+-stdin-:<main>: Fatal: tools/enum_parser/enum_serialization_runtime/enum_runtime.cpp:70: Key 'default_values' not found in enum NYql::EYtSettingType. Valid options are: 'initial', 'infer_scheme', 'force_infer_schema', 'do_not_fail_on_invalid_schema', 'direct_read', 'view', 'mode', 'scheme', 'weak_concat', 'anonymous', 'with_qb', 'inline', 'sample', 'joinLabel', 'ignore_non_existing', 'warn_non_existing', 'xlock', 'unordered', 'nonUnique', 'userschema', 'usercolumns', 'statcolumns', 'syscolumns', 'ignoretypev3', 'memUsage', 'itemsCount', 'rowFactor', 'ordered', 'keyFilter', 'keyFilter2', 'take', 'skip', 'limit', 'sortLimitBy', 'sortBy', 'reduceBy', 'reduceFilterBy', 'forceTransform', 'weakFields', 'sharded', 'combineChunks', 'jobCount', 'joinReduce', 'firstAsPrimary', 'flow', 'keepSorted', 'keySwitch', 'uniqueBy', 'opHash', 'mapOutputType', 'reduceInputType', 'noDq', 'split', 'compression_codec', 'erasure_codec', 'expiration', 'replication_factor', 'user_attrs', 'media', 'primary_medium', 'keep_meta', 'monotonic_keys', 'mutationid'.
+
+<sql-statement>
+INSERT INTO truncate_a DEFAULT VALUES;
+</sql-statement>
+-stdin-:<main>: Fatal: tools/enum_parser/enum_serialization_runtime/enum_runtime.cpp:70: Key 'default_values' not found in enum NYql::EYtSettingType. Valid options are: 'initial', 'infer_scheme', 'force_infer_schema', 'do_not_fail_on_invalid_schema', 'direct_read', 'view', 'mode', 'scheme', 'weak_concat', 'anonymous', 'with_qb', 'inline', 'sample', 'joinLabel', 'ignore_non_existing', 'warn_non_existing', 'xlock', 'unordered', 'nonUnique', 'userschema', 'usercolumns', 'statcolumns', 'syscolumns', 'ignoretypev3', 'memUsage', 'itemsCount', 'rowFactor', 'ordered', 'keyFilter', 'keyFilter2', 'take', 'skip', 'limit', 'sortLimitBy', 'sortBy', 'reduceBy', 'reduceFilterBy', 'forceTransform', 'weakFields', 'sharded', 'combineChunks', 'jobCount', 'joinReduce', 'firstAsPrimary', 'flow', 'keepSorted', 'keySwitch', 'uniqueBy', 'opHash', 'mapOutputType', 'reduceInputType', 'noDq', 'split', 'compression_codec', 'erasure_codec', 'expiration', 'replication_factor', 'user_attrs', 'media', 'primary_medium', 'keep_meta', 'monotonic_keys', 'mutationid'.
+
+<sql-statement>
+SELECT * FROM truncate_a;
+</sql-statement>
+<sql-statement>
+DROP TABLE truncate_a;
+</sql-statement>
+<sql-statement>
+SELECT nextval('truncate_a_id1'); -- fail, seq should have been dropped
+</sql-statement>
+-stdin-:<main>: Fatal: Execution
+
+ -stdin-:<main>:1:1: Fatal: Execution of node: Result
+ SELECT nextval('truncate_a_id1'); -- fail, seq should have been dropped
+ ^
+ -stdin-:<main>:1:1: Fatal: ERROR: relation "truncate_a_id1" does not exist
+
+ SELECT nextval('truncate_a_id1'); -- fail, seq should have been dropped
+ ^
+<sql-statement>
+-- partitioned table
+CREATE TABLE truncparted (a int, b char) PARTITION BY LIST (a);
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: PARTITION BY clause not supported
+ -- partitioned table
+ ^
+<sql-statement>
+-- error, can't truncate a partitioned table
+TRUNCATE ONLY truncparted;
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 257
+ -- error, can't truncate a partitioned table
+ ^
+<sql-statement>
+CREATE TABLE truncparted1 PARTITION OF truncparted FOR VALUES IN (1);
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: table inheritance not supported
+ CREATE TABLE truncparted1 PARTITION OF truncparted FOR VALUES IN (1);
+ ^
+<sql-statement>
+INSERT INTO truncparted VALUES (1, 'a');
+</sql-statement>
+-stdin-:<main>: Fatal: Table metadata loading
+
+ -stdin-:<main>: Fatal: ydb/library/yql/providers/yt/gateway/file/yql_yt_file_services.cpp:44: Table not found: plato.truncparted
+
+<sql-statement>
+-- error, must truncate partitions
+TRUNCATE ONLY truncparted;
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 257
+ -- error, must truncate partitions
+ ^
+<sql-statement>
+TRUNCATE truncparted;
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 257
+ TRUNCATE truncparted;
+ ^
+<sql-statement>
+DROP TABLE truncparted;
+</sql-statement>
+<sql-statement>
+-- foreign key on partitioned table: partition key is referencing column.
+-- Make sure truncate did execute on all tables
+CREATE FUNCTION tp_ins_data() RETURNS void LANGUAGE plpgsql AS $$
+ BEGIN
+ INSERT INTO truncprim VALUES (1), (100), (150);
+ INSERT INTO truncpart VALUES (1), (100), (150);
+ END
+$$;
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 261
+ -- foreign key on partitioned table: partition key is referencing column.
+ ^
+<sql-statement>
+CREATE FUNCTION tp_chk_data(OUT pktb regclass, OUT pkval int, OUT fktb regclass, OUT fkval int)
+ RETURNS SETOF record LANGUAGE plpgsql AS $$
+ BEGIN
+ RETURN QUERY SELECT
+ pk.tableoid::regclass, pk.a, fk.tableoid::regclass, fk.a
+ FROM truncprim pk FULL JOIN truncpart fk USING (a)
+ ORDER BY 2, 4;
+ END
+$$;
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 261
+ CREATE FUNCTION tp_chk_data(OUT pktb regclass, OUT pkval int, OUT fktb regclass, OUT fkval int)
+ ^
+<sql-statement>
+CREATE TABLE truncprim (a int PRIMARY KEY);
+</sql-statement>
+<sql-statement>
+CREATE TABLE truncpart (a int REFERENCES truncprim)
+ PARTITION BY RANGE (a);
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: PARTITION BY clause not supported
+ CREATE TABLE truncpart (a int REFERENCES truncprim)
+ ^
+<sql-statement>
+CREATE TABLE truncpart_1 PARTITION OF truncpart FOR VALUES FROM (0) TO (100);
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: table inheritance not supported
+ CREATE TABLE truncpart_1 PARTITION OF truncpart FOR VALUES FROM (0) TO (100);
+ ^
+<sql-statement>
+CREATE TABLE truncpart_2 PARTITION OF truncpart FOR VALUES FROM (100) TO (200)
+ PARTITION BY RANGE (a);
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: table inheritance not supported
+ CREATE TABLE truncpart_2 PARTITION OF truncpart FOR VALUES FROM (100) TO (200)
+ ^
+<sql-statement>
+CREATE TABLE truncpart_2_1 PARTITION OF truncpart_2 FOR VALUES FROM (100) TO (150);
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: table inheritance not supported
+ CREATE TABLE truncpart_2_1 PARTITION OF truncpart_2 FOR VALUES FROM (100) TO (150);
+ ^
+<sql-statement>
+CREATE TABLE truncpart_2_d PARTITION OF truncpart_2 DEFAULT;
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: table inheritance not supported
+ CREATE TABLE truncpart_2_d PARTITION OF truncpart_2 DEFAULT;
+ ^
+<sql-statement>
+TRUNCATE TABLE truncprim; -- should fail
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 257
+ TRUNCATE TABLE truncprim; -- should fail
+ ^
+<sql-statement>
+select tp_ins_data();
+</sql-statement>
+-stdin-:<main>: Error: Type annotation
+
+ -stdin-:<main>:1:1: Error: At function: RemovePrefixMembers, At function: PgSelect, At function: PgSetItem, At function: PgResultItem
+ select tp_ins_data();
+ ^
+ -stdin-:<main>:1:8: Error: At function: PgCall
+ select tp_ins_data();
+ ^
+ -stdin-:<main>:1:8: Error: No such proc: tp_ins_data
+ select tp_ins_data();
+ ^
+<sql-statement>
+-- should truncate everything
+TRUNCATE TABLE truncprim, truncpart;
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 257
+ -- should truncate everything
+ ^
+<sql-statement>
+select * from tp_chk_data();
+</sql-statement>
+-stdin-:<main>: Error: Type annotation
+
+ -stdin-:<main>:1:1: Error: At function: RemovePrefixMembers, At function: PgSelect, At function: PgSetItem
+ select * from tp_chk_data();
+ ^
+ -stdin-:<main>:1:15: Error: At function: PgCall
+ select * from tp_chk_data();
+ ^
+ -stdin-:<main>:1:15: Error: No such proc: tp_chk_data
+ select * from tp_chk_data();
+ ^
+<sql-statement>
+select tp_ins_data();
+</sql-statement>
+-stdin-:<main>: Error: Type annotation
+
+ -stdin-:<main>:1:1: Error: At function: RemovePrefixMembers, At function: PgSelect, At function: PgSetItem, At function: PgResultItem
+ select tp_ins_data();
+ ^
+ -stdin-:<main>:1:8: Error: At function: PgCall
+ select tp_ins_data();
+ ^
+ -stdin-:<main>:1:8: Error: No such proc: tp_ins_data
+ select tp_ins_data();
+ ^
+<sql-statement>
+-- should truncate everything
+TRUNCATE TABLE truncprim CASCADE;
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 257
+ -- should truncate everything
+ ^
+<sql-statement>
+SELECT * FROM tp_chk_data();
+</sql-statement>
+-stdin-:<main>: Error: Type annotation
+
+ -stdin-:<main>:1:1: Error: At function: RemovePrefixMembers, At function: PgSelect, At function: PgSetItem
+ SELECT * FROM tp_chk_data();
+ ^
+ -stdin-:<main>:1:15: Error: At function: PgCall
+ SELECT * FROM tp_chk_data();
+ ^
+ -stdin-:<main>:1:15: Error: No such proc: tp_chk_data
+ SELECT * FROM tp_chk_data();
+ ^
+<sql-statement>
+SELECT tp_ins_data();
+</sql-statement>
+-stdin-:<main>: Error: Type annotation
+
+ -stdin-:<main>:1:1: Error: At function: RemovePrefixMembers, At function: PgSelect, At function: PgSetItem, At function: PgResultItem
+ SELECT tp_ins_data();
+ ^
+ -stdin-:<main>:1:8: Error: At function: PgCall
+ SELECT tp_ins_data();
+ ^
+ -stdin-:<main>:1:8: Error: No such proc: tp_ins_data
+ SELECT tp_ins_data();
+ ^
+<sql-statement>
+-- should truncate all partitions
+TRUNCATE TABLE truncpart;
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 257
+ -- should truncate all partitions
+ ^
+<sql-statement>
+SELECT * FROM tp_chk_data();
+</sql-statement>
+-stdin-:<main>: Error: Type annotation
+
+ -stdin-:<main>:1:1: Error: At function: RemovePrefixMembers, At function: PgSelect, At function: PgSetItem
+ SELECT * FROM tp_chk_data();
+ ^
+ -stdin-:<main>:1:15: Error: At function: PgCall
+ SELECT * FROM tp_chk_data();
+ ^
+ -stdin-:<main>:1:15: Error: No such proc: tp_chk_data
+ SELECT * FROM tp_chk_data();
+ ^
+<sql-statement>
+DROP TABLE truncprim, truncpart;
+</sql-statement>
+<sql-statement>
+DROP FUNCTION tp_ins_data(), tp_chk_data();
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: DropStmt: alternative is not implemented yet : 386
+ DROP FUNCTION tp_ins_data(), tp_chk_data();
+ ^
+<sql-statement>
+-- test cascade when referencing a partitioned table
+CREATE TABLE trunc_a (a INT PRIMARY KEY) PARTITION BY RANGE (a);
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: PARTITION BY clause not supported
+ -- test cascade when referencing a partitioned table
+ ^
+<sql-statement>
+CREATE TABLE trunc_a1 PARTITION OF trunc_a FOR VALUES FROM (0) TO (10);
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: table inheritance not supported
+ CREATE TABLE trunc_a1 PARTITION OF trunc_a FOR VALUES FROM (0) TO (10);
+ ^
+<sql-statement>
+CREATE TABLE trunc_a2 PARTITION OF trunc_a FOR VALUES FROM (10) TO (20)
+ PARTITION BY RANGE (a);
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: table inheritance not supported
+ CREATE TABLE trunc_a2 PARTITION OF trunc_a FOR VALUES FROM (10) TO (20)
+ ^
+<sql-statement>
+CREATE TABLE trunc_a21 PARTITION OF trunc_a2 FOR VALUES FROM (10) TO (12);
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: table inheritance not supported
+ CREATE TABLE trunc_a21 PARTITION OF trunc_a2 FOR VALUES FROM (10) TO (12);
+ ^
+<sql-statement>
+CREATE TABLE trunc_a22 PARTITION OF trunc_a2 FOR VALUES FROM (12) TO (16);
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: table inheritance not supported
+ CREATE TABLE trunc_a22 PARTITION OF trunc_a2 FOR VALUES FROM (12) TO (16);
+ ^
+<sql-statement>
+CREATE TABLE trunc_a2d PARTITION OF trunc_a2 DEFAULT;
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: table inheritance not supported
+ CREATE TABLE trunc_a2d PARTITION OF trunc_a2 DEFAULT;
+ ^
+<sql-statement>
+CREATE TABLE trunc_a3 PARTITION OF trunc_a FOR VALUES FROM (20) TO (30);
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: table inheritance not supported
+ CREATE TABLE trunc_a3 PARTITION OF trunc_a FOR VALUES FROM (20) TO (30);
+ ^
+<sql-statement>
+INSERT INTO trunc_a VALUES (0), (5), (10), (15), (20), (25);
+</sql-statement>
+-stdin-:<main>: Fatal: Table metadata loading
+
+ -stdin-:<main>: Fatal: ydb/library/yql/providers/yt/gateway/file/yql_yt_file_services.cpp:44: Table not found: plato.trunc_a
+
+<sql-statement>
+-- truncate a partition cascading to a table
+CREATE TABLE ref_b (
+ b INT PRIMARY KEY,
+ a INT REFERENCES trunc_a(a) ON DELETE CASCADE
+);
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: column constraint not supported
+ -- truncate a partition cascading to a table
+ ^
+<sql-statement>
+INSERT INTO ref_b VALUES (10, 0), (50, 5), (100, 10), (150, 15);
+</sql-statement>
+-stdin-:<main>: Fatal: Table metadata loading
+
+ -stdin-:<main>: Fatal: ydb/library/yql/providers/yt/gateway/file/yql_yt_file_services.cpp:44: Table not found: plato.ref_b
+
+<sql-statement>
+TRUNCATE TABLE trunc_a1 CASCADE;
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 257
+ TRUNCATE TABLE trunc_a1 CASCADE;
+ ^
+<sql-statement>
+SELECT a FROM ref_b;
+</sql-statement>
+-stdin-:<main>: Fatal: Table metadata loading
+
+ -stdin-:<main>: Fatal: ydb/library/yql/providers/yt/gateway/file/yql_yt_file_services.cpp:44: Table not found: plato.ref_b
+
+<sql-statement>
+DROP TABLE ref_b;
+</sql-statement>
+<sql-statement>
+-- truncate a partition cascading to a partitioned table
+CREATE TABLE ref_c (
+ c INT PRIMARY KEY,
+ a INT REFERENCES trunc_a(a) ON DELETE CASCADE
+) PARTITION BY RANGE (c);
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: PARTITION BY clause not supported
+ -- truncate a partition cascading to a partitioned table
+ ^
+<sql-statement>
+CREATE TABLE ref_c1 PARTITION OF ref_c FOR VALUES FROM (100) TO (200);
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: table inheritance not supported
+ CREATE TABLE ref_c1 PARTITION OF ref_c FOR VALUES FROM (100) TO (200);
+ ^
+<sql-statement>
+CREATE TABLE ref_c2 PARTITION OF ref_c FOR VALUES FROM (200) TO (300);
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: table inheritance not supported
+ CREATE TABLE ref_c2 PARTITION OF ref_c FOR VALUES FROM (200) TO (300);
+ ^
+<sql-statement>
+INSERT INTO ref_c VALUES (100, 10), (150, 15), (200, 20), (250, 25);
+</sql-statement>
+-stdin-:<main>: Fatal: Table metadata loading
+
+ -stdin-:<main>: Fatal: ydb/library/yql/providers/yt/gateway/file/yql_yt_file_services.cpp:44: Table not found: plato.ref_c
+
+<sql-statement>
+TRUNCATE TABLE trunc_a21 CASCADE;
+</sql-statement>
+-stdin-:<main>: Error: Parse Sql
+
+ -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 257
+ TRUNCATE TABLE trunc_a21 CASCADE;
+ ^
+<sql-statement>
+SELECT a as "from table ref_c" FROM ref_c;
+</sql-statement>
+-stdin-:<main>: Fatal: Table metadata loading
+
+ -stdin-:<main>: Fatal: ydb/library/yql/providers/yt/gateway/file/yql_yt_file_services.cpp:44: Table not found: plato.ref_c
+
+<sql-statement>
+SELECT a as "from table trunc_a" FROM trunc_a ORDER BY a;
+</sql-statement>
+-stdin-:<main>: Fatal: Table metadata loading
+
+ -stdin-:<main>: Fatal: ydb/library/yql/providers/yt/gateway/file/yql_yt_file_services.cpp:44: Table not found: plato.trunc_a
+
+<sql-statement>
+DROP TABLE trunc_a, ref_c;
+</sql-statement>