diff --git a/dbs/bigquery.sql b/dbs/bigquery.sql deleted file mode 100644 index 9d38911..0000000 --- a/dbs/bigquery.sql +++ /dev/null @@ -1,33 +0,0 @@ -DROP TABLE IF EXISTS `dataprep-bigquery.dataprep.test_table`; - -CREATE TABLE`dataprep-bigquery.dataprep.test_table`( - test_int INT64, - test_string STRING, - test_float FLOAT64, - test_bool BOOL, -); - -INSERT INTO `dataprep-bigquery.dataprep.test_table` VALUES (1, 'str1', 1.1, TRUE); -INSERT INTO `dataprep-bigquery.dataprep.test_table` VALUES (2, 'str2', 2.2, FALSE); -INSERT INTO `dataprep-bigquery.dataprep.test_table` VALUES (2333, NULL, NULL, TRUE); -INSERT INTO `dataprep-bigquery.dataprep.test_table` VALUES (4, NULL, -4.44, FALSE); -INSERT INTO `dataprep-bigquery.dataprep.test_table` VALUES (5, 'str05', NULL, NULL); - - -DROP TABLE IF EXISTS `dataprep-bigquery.dataprep.test_types`; - -CREATE TABLE IF NOT EXISTS `dataprep-bigquery.dataprep.test_types`( - test_int INTEGER, - test_numeric NUMERIC(5, 2), - test_bool BOOL, - test_date DATE, - test_time TIME, - test_datetime DATETIME, - test_timestamp TIMESTAMP, - test_str STRING, - test_bytes BYTES, -); - -INSERT INTO `dataprep-bigquery.dataprep.test_types` VALUES (1, 1.23, TRUE, '1937-01-28', '00:00:00', NULL, '1970-01-01 00:00:01.00Z', '😁😂😜', CAST('😁😂😜' AS BYTES)); -INSERT INTO `dataprep-bigquery.dataprep.test_types` VALUES (2, 234.56, NULL, '2053-07-25', '12:59:59', '2053-07-25 12:59:59', NULL, 'こんにちはЗдра́в', CAST('こんにちはЗдра́в' AS BYTES)); -INSERT INTO `dataprep-bigquery.dataprep.test_types` VALUES (NULL, NULL, FALSE, NULL, NULL, '1937-01-28 00:00:00', '2004-2-29 12:00:01.30+3:00', NULL, NULL); diff --git a/dbs/clickhouse.sql b/dbs/clickhouse.sql deleted file mode 100644 index 80e4b9c..0000000 --- a/dbs/clickhouse.sql +++ /dev/null @@ -1,31 +0,0 @@ -DROP TABLE IF EXISTS test_table; - -CREATE TABLE IF NOT EXISTS test_table( - test_int UInt64, - test_str String -) ENGINE = MergeTree() -PRIMARY KEY test_int; - -INSERT INTO test_table VALUES (1, 'abc'); -INSERT INTO test_table VALUES (2, 'defg'); -INSERT INTO test_table VALUES (3, 'hijkl'); -INSERT INTO test_table VALUES (4, 'mnopqr'); -INSERT INTO test_table VALUES (5, 'st'); -INSERT INTO test_table VALUES (6, 'u'); - -DROP TABLE IF EXISTS test_types; - -CREATE TABLE IF NOT EXISTS test_types( - test_int Int32, - test_float Float64, - test_date DATE, - test_datetime DATETIME, - test_decimal DECIMAL(15,2), - test_varchar VARCHAR(15), - test_char CHAR(10) -) ENGINE = MergeTree() -PRIMARY KEY test_int; - -INSERT INTO test_types VALUES (1, 2.3, '1999-07-25', '1999-07-25 23:14:07', 2.22, 'こんにちは', '0123456789'); -INSERT INTO test_types VALUES (2, 3.3, '1979-04-07', '1979-04-07 03:04:37', 3.33, 'Ha好ち😁ðy', 'abcdefghij'); -INSERT INTO test_types VALUES (3, 4.3, '1999-09-22', '1999-07-25 20:21:14', 4.44, 'b', '321'); \ No newline at end of file diff --git a/dbs/docker-compose.yml b/dbs/docker-compose.yml index de4a099..3ca3387 100644 --- a/dbs/docker-compose.yml +++ b/dbs/docker-compose.yml @@ -8,7 +8,7 @@ services: POSTGRES_USER: user POSTGRES_PASSWORD: pass healthcheck: - test: [CMD-SHELL, pg_isready -U user db] + test: [CMD-SHELL, pg_isready -U user -d db] interval: 5s timeout: 5s retries: 5 diff --git a/dbs/mem_monitor.sh b/dbs/mem_monitor.sh deleted file mode 100755 index fc5b659..0000000 --- a/dbs/mem_monitor.sh +++ /dev/null @@ -1,17 +0,0 @@ -echo "user: $USER" -pgid=$(ps -o pgid,comm -u $USER | grep just | awk '{print $1}') -echo "pgid of command: $pgid" -max=0 - -for((i=0;i<1000000;i++)) -do - ps -o pid,ppid,pgid,comm,rss -u $USER | grep $pgid - sum=$(ps -o pid,ppid,pgid,comm,rss -u $USER | grep $pgid | awk '{sum += $NF} END {print sum}') - echo "current sum: $sum" - if (( sum > max )); then - max=$sum - fi - echo "current max: $max" - [ -z $sum ] && exit 0 || echo "continue..." - sleep 2 -done diff --git a/dbs/mssql.sql b/dbs/mssql.sql deleted file mode 100644 index 8dbce28..0000000 --- a/dbs/mssql.sql +++ /dev/null @@ -1,76 +0,0 @@ -DROP TABLE IF EXISTS test_table; - -CREATE TABLE test_table( - test_int INTEGER NOT NULL, - test_nullint INTEGER, - test_str VARCHAR(128), - test_float FLOAT(53), - test_bool BIT -); - - -INSERT INTO test_table VALUES (1, 3, 'str1', NULL, 1); -INSERT INTO test_table VALUES (2, NULL, 'str2', 2.2, 0); -INSERT INTO test_table VALUES (0, 5, 'a', 3.1, NULL); -INSERT INTO test_table VALUES (3, 7, 'b', 3, 0); -INSERT INTO test_table VALUES (4, 9, 'c', 7.8, NULL); -INSERT INTO test_table VALUES (1314, 2, NULL, -10, 1); - -DROP TABLE IF EXISTS test_str; -CREATE TABLE test_str( - id INTEGER NOT NULL, - test_language NVARCHAR(max), - test_hello NVARCHAR(max), -); - -INSERT INTO test_str VALUES (0, N'English', N'Hello'); -INSERT INTO test_str VALUES (1, N'中文', N'你好'); -INSERT INTO test_str VALUES (2, N'日本語', N'こんにちは'); -INSERT INTO test_str VALUES (3, N'русский', N'Здра́вствуйте'); -INSERT INTO test_str VALUES (4, N'Emoji', N'😁😂😜'); -INSERT INTO test_str VALUES (5, N'Latin1', N'¥§¤®ð'); -INSERT INTO test_str VALUES (6, N'Extra', N'y̆'); -INSERT INTO test_str VALUES (7, N'Mixed', N'Ha好ち😁ðy̆'); -INSERT INTO test_str VALUES (8, N'', NULL); - - -DROP TABLE IF EXISTS test_types; - -CREATE TABLE test_types( - test_int1 TINYINT, -​ test_int2 SMALLINT, -​ test_int4 INT, -​ test_int8 BIGINT, -​ test_float24 REAL, -​ test_float53 DOUBLE PRECISION, -​ test_floatn FLOAT(18), - test_date DATE, - test_time TIME, - test_datetime DATETIMEOFFSET, - test_smalldatetime SMALLDATETIME, -​ test_naivedatetime DATETIME, -​ test_naivedatetime2 DATETIME2, - test_new_decimal NUMERIC(5, 2), - test_decimal DECIMAL, - test_varchar VARCHAR(15), - test_char CHAR(10), - test_varbinary VARBINARY(10), - test_binary BINARY(5), - test_nchar NCHAR(4), - test_text TEXT, - test_ntext NTEXT, - test_uuid UNIQUEIDENTIFIER, - test_money MONEY, - test_smallmoney SMALLMONEY -); - -INSERT INTO test_types VALUES (0, -32768, -2147483648, -9223372036854775808, NULL, NULL, NULL, '1999-07-25', '00:00:00', NULL, '1990-01-01 10:00:00', '1753-01-01 12:00:00', '1900-01-01 12:00:00.12345', 1.1, 1, NULL, NULL, NULL, NULL, '1234', 'text', 'ntext', '86b494cc-96b2-11eb-9298-3e22fbb9fe9d', NULL, NULL); -INSERT INTO test_types VALUES (255, 32767, 2147483647, 9223372036854775807, -1.18E-38, -2.23E-308, 0, NULL, '23:59:59', '2020-12-31 23:59:59 +00:00', NULL, '2038-12-31 01:00:00', NULl, 2.2, 2, 'varchar2', 'char2', CONVERT(VARBINARY(10), '1234'), CONVERT(BINARY(5), '12'), NULL, 't', 'nt', NULL, 922337203685477.5807, 214748.3647); -INSERT INTO test_types VALUES (NULL, NULL, NULL, NULL, 3.40E+38, 1.79E+308, 123.1234567, '2021-01-28', NULL, '2021-01-28 12:30:30 +01:00', '2079-06-05 23:00:00', NULL, '2027-03-18 14:30:30.54321', NULL, NULL, 'varchar3', 'char3', CONVERT(VARBINARY(10), ''), CONVERT(BINARY(5), ''), '12', NULL, NULL, '86b49b84-96b2-11eb-9298-3e22fbb9fe9d', -922337203685477.5808, -214748.3648); - -CREATE FUNCTION increment(@val int) -RETURNS int -AS -BEGIN - RETURN @val + 1; -END; \ No newline at end of file diff --git a/dbs/mysql.sql b/dbs/mysql.sql deleted file mode 100644 index 7906415..0000000 --- a/dbs/mysql.sql +++ /dev/null @@ -1,69 +0,0 @@ -show variables like 'char%'; - -DROP TABLE IF EXISTS test_table; - -CREATE TABLE IF NOT EXISTS test_table( - test_int INTEGER, - test_float DOUBLE, - test_enum ENUM('even', 'odd'), - test_null INTEGER -); - -INSERT INTO test_table VALUES (1, 1.1, 'odd', NULL); -INSERT INTO test_table VALUES (2, 2.2,'even', NULL); -INSERT INTO test_table VALUES (3, 3.3, 'odd', NULL); -INSERT INTO test_table VALUES (4, 4.4, 'even', NULL); -INSERT INTO test_table VALUES (5, 5.5, 'odd', NULL); -INSERT INTO test_table VALUES (6, 6.6, 'even', NULL); - - -DROP TABLE IF EXISTS test_table_extra; - -CREATE TABLE IF NOT EXISTS test_table_extra( - test_int INTEGER, - test_str VARCHAR(30) -); - -INSERT INTO test_table_extra VALUES (1, 'Ha好ち😁ðy̆'); -INSERT INTO test_table_extra VALUES (2, 'こんにちは'); -INSERT INTO test_table_extra VALUES (3, 'русский'); - -DROP TABLE IF EXISTS test_types; - -CREATE TABLE IF NOT EXISTS test_types( - test_timestamp TIMESTAMP NULL, - test_date DATE, - test_time TIME, - test_datetime DATETIME, - test_new_decimal DECIMAL(15,2), - test_decimal DECIMAL, - test_varchar VARCHAR(15), - test_char CHAR(10), - test_tiny TINYINT, - test_short SMALLINT, - test_int24 MEDIUMINT, - test_long INT, - test_longlong BIGINT, - test_tiny_unsigned TINYINT UNSIGNED, - test_short_unsigned SMALLINT UNSIGNED, - test_int24_unsigned MEDIUMINT UNSIGNED, - test_long_unsigned INT UNSIGNED, - test_longlong_unsigned BIGINT UNSIGNED, - test_long_notnull INT NOT NULL, - test_short_unsigned_notnull SMALLINT UNSIGNED NOT NULL, - test_float FLOAT, - test_double DOUBLE, - test_double_notnull DOUBLE NOT NULL, - test_year YEAR, - test_tinyblob TINYBLOB, - test_blob BLOB, - test_mediumblob MEDIUMBLOB, - test_longblob LONGBLOB, - test_enum ENUM('apple', 'banana', 'orange', 'mango'), - test_json JSON, - test_mediumtext MEDIUMTEXT -); - -INSERT INTO test_types VALUES ('1970-01-01 00:00:01', NULL, '00:00:00', '1970-01-01 00:00:01', 1.1, 1, NULL, 'char1', -128, -32768, -8388608, -2147483648, -9223372036854775808, NULL, NULL, NULL, NULL, NULL, 1, 1, NULL, -2.2E-308, 1.2345, 1901, NULL, NULL, NULL, NULL, 'apple', '{"name": "piggy", "age": 1}', NULL); -INSERT INTO test_types VALUES ('2038-01-19 00:00:00', '1970-01-01', NULL, '2038-01-19 00:0:00', NULL, 2, 'varchar2', NULL, 127, 32767, 8388607, 2147483647, 9223372036854775807, 255, 65535, 16777215, 4294967295, 1.844674407E19, 2147483647, 65535, -1.1E-38, NULL, -1.1E-3, 2155, 'tinyblob2', 'blobblobblobblob2', 'mediumblob2', 'longblob2', NULL, '{"name": "kitty", "age": 2}', ''); -INSERT INTO test_types VALUES (NULL, '2038-01-19', '23:59:59', NULL, 3.3, NULL, 'varchar3', 'char3', NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, -2147483648, 0, 3.4E38, 1.7E308, 1.7E30, NULL, 'tinyblob3', 'blobblobblobblob3', 'mediumblob3', 'longblob3', 'mango', NULL, 'medium text!!!!'); \ No newline at end of file diff --git a/dbs/oracle.sql b/dbs/oracle.sql deleted file mode 100644 index e70766e..0000000 --- a/dbs/oracle.sql +++ /dev/null @@ -1,52 +0,0 @@ -DROP TABLE test_table; -DROP TABLE test_types; -DROP TABLE test_issue; - -CREATE TABLE test_table( - test_int NUMBER(7), - test_char CHAR(5), - test_float FLOAT(53) -); - -INSERT INTO test_table VALUES (1, 'str1', 1.1); -INSERT INTO test_table VALUES (2, 'str2', 2.2); -INSERT INTO test_table VALUES (2333, NULL, NULL); -INSERT INTO test_table VALUES (4, NULL, -4.44); -INSERT INTO test_table VALUES (5, 'str05', NULL); - -CREATE TABLE test_issue( - v BINARY_FLOAT -); - -INSERT INTO test_issue VALUES (1.111); -INSERT INTO test_issue VALUES (2.222); -INSERT INTO test_issue VALUES (3.333); -INSERT INTO test_issue VALUES (NULL); - - -CREATE TABLE test_types( - test_num_int NUMBER(8), - test_int INTEGER, - test_num_float NUMBER(10,1), - test_float FLOAT(38), - test_binary_float BINARY_FLOAT, - test_binary_double BINARY_DOUBLE, - test_char CHAR(5), - test_varchar VARCHAR2(10), - test_nchar NCHAR(6), - test_nvarchar NVARCHAR2(20), - test_date DATE, - test_timestamp TIMESTAMP, - test_timestamptz TIMESTAMP WITH TIME ZONE, - test_clob CLOB, - test_blob BLOB -); - - -INSERT INTO test_types VALUES (1, -10, 2.3, 2.34, -3.456, 9999.99991, 'char1', 'varchar1', 'y123', 'aK>?KJ@#$%', TO_DATE('2019-05-21', 'YYYY-MM-DD'), TO_TIMESTAMP('2019-05-21 01:02:33', 'YYYY-MM-DD HH24:MI:SS'), TO_TIMESTAMP_TZ('1999-12-01 11:00:00 -8:00', - 'YYYY-MM-DD HH:MI:SS TZH:TZM'), '13ab', '39af'); -INSERT INTO test_types VALUES (5, 22, -0.1, 123.455, 3.1415926535, -111111.2345, 'char2', 'varchar222', 'aab123', ')>KDS)(F*&%J', TO_DATE('2020-05-21', 'YYYY-MM-DD'), TO_TIMESTAMP('2020-05-21 01:02:33', 'YYYY-MM-DD HH24:MI:SS'), TO_TIMESTAMP_TZ('1899-12-01 11:00:00 +1:00', - 'YYYY-MM-DD HH:MI:SS TZH:TZM'), '13ab', '39af'); -INSERT INTO test_types VALUES (5, 22, -0.1, 123.455, 3.1415926535, -111111.2345, 'char2', 'varchar222', 'aab123', ')>KDS)(F*&%J', TO_DATE('2020-05-21', 'YYYY-MM-DD'), TO_TIMESTAMP('2020-05-21 01:02:33', 'YYYY-MM-DD HH24:MI:SS'), TO_TIMESTAMP_TZ('1899-12-01 11:00:00 +1:00', - 'YYYY-MM-DD HH:MI:SS TZH:TZM'), '13ab', '39af'); -INSERT INTO test_types VALUES (NULL, 100, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); diff --git a/dbs/redshift.sql b/dbs/redshift.sql deleted file mode 100644 index 5c1ab2a..0000000 --- a/dbs/redshift.sql +++ /dev/null @@ -1,45 +0,0 @@ -DROP TABLE IF EXISTS test_table; -DROP TABLE IF EXISTS test_str; -DROP TABLE IF EXISTS test_types; - -CREATE TABLE IF NOT EXISTS test_table( - test_int INTEGER NOT NULL, - test_nullint INTEGER, - test_str TEXT, - test_float DOUBLE PRECISION, - test_bool BOOLEAN -); - -INSERT INTO test_table VALUES (1, 3, 'str1', NULL, TRUE); -INSERT INTO test_table VALUES (2, NULL, 'str2', 2.2, FALSE); -INSERT INTO test_table VALUES (0, 5, 'a', 3.1, NULL); -INSERT INTO test_table VALUES (3, 7, 'b', 3, FALSE); -INSERT INTO test_table VALUES (4, 9, 'c', 7.8, NULL); -INSERT INTO test_table VALUES (1314, 2, NULL, -10, TRUE); - -CREATE TABLE IF NOT EXISTS test_str( - id INTEGER NOT NULL, - test_language TEXT, - test_hello TEXT -); - -INSERT INTO test_str VALUES (0, 'English', 'Hello'); -INSERT INTO test_str VALUES (1, '中文', '你好'); -INSERT INTO test_str VALUES (2, '日本語', 'こんにちは'); -INSERT INTO test_str VALUES (3, 'русский', 'Здра́вствуйте'); -INSERT INTO test_str VALUES (4, 'Emoji', '😁😂😜'); -INSERT INTO test_str VALUES (5, 'Latin1', '¥§¤®ð'); -INSERT INTO test_str VALUES (6, 'Extra', 'y̆'); -INSERT INTO test_str VALUES (7, 'Mixed', 'Ha好ち😁ðy̆'); - -CREATE TABLE IF NOT EXISTS test_types( - test_int16 SMALLINT, - test_char CHAR, - test_time TIME, - test_datetime DATETIME -); - -INSERT INTO test_types VALUES (0, 'a', '08:12:40', '2007-01-01 10:00:19'); -INSERT INTO test_types VALUES (1, 'b', '10:03:00', '2005-01-01 22:03:00'); -INSERT INTO test_types VALUES (2, 'c', '23:00:10', NULL); -INSERT INTO test_types VALUES (3, 'd', '18:30:00', '1987-01-01 11:00:00');