<commit_before>CREATE TABLE VarcharBYTES(
  ID INTEGER DEFAULT 0 NOT NULL,
  var2 VARCHAR(2 BYTES),
  var80 VARCHAR(80 BYTES),
  PRIMARY KEY (ID)
);

CREATE TABLE VarcharTB (
  ID INTEGER DEFAULT 0 NOT NULL,
  var2 VARCHAR(2),
  var80 VARCHAR(80),
  PRIMARY KEY (ID)
);

CREATE TABLE VarLength (
  ID INTEGER DEFAULT 0 NOT NULL,
  var1 VARCHAR(10),
  var2 VARCHAR(80),
  bin1 VARBINARY(10),
  bin2 VARBINARY(80),
  PRIMARY KEY (ID)
);

CREATE TABLE P1 (
  ID INTEGER DEFAULT '0' NOT NULL,
  DESC VARCHAR(300),
  NUM INTEGER,
  RATIO FLOAT,
  PRIMARY KEY (ID)
);
PARTITION TABLE P1 ON COLUMN ID;

CREATE TABLE R1 (
  ID INTEGER DEFAULT '0' NOT NULL,
  DESC VARCHAR(300),
  NUM INTEGER,
  RATIO FLOAT,
  PRIMARY KEY (ID)
);

CREATE TABLE P2 (
  ID INTEGER DEFAULT '0' NOT NULL,
  DESC VARCHAR(300),
  NUM INTEGER NOT NULL,
  RATIO FLOAT NOT NULL,
  CONSTRAINT P2_PK_TREE PRIMARY KEY (ID)
);
PARTITION TABLE P2 ON COLUMN ID;

CREATE TABLE R2 (
  ID INTEGER DEFAULT '0' NOT NULL,
  DESC VARCHAR(300),
  NUM INTEGER NOT NULL,
  RATIO FLOAT NOT NULL,
  CONSTRAINT R2_PK_TREE PRIMARY KEY (ID)
);

CREATE TABLE P1_DECIMAL (
  ID INTEGER DEFAULT '0' NOT NULL,
  CASH DECIMAL NOT NULL,
  CREDIT DECIMAL NOT NULL,
  RATIO FLOAT NOT NULL,
  PRIMARY KEY (ID)
);

CREATE TABLE R1_DECIMAL (
  ID INTEGER DEFAULT '0' NOT NULL,
  CASH DECIMAL NOT NULL,
  CREDIT DECIMAL NOT NULL,
  RATIO FLOAT NOT NULL,
  PRIMARY KEY (ID)
);

CREATE TABLE COUNT_NULL (
  TRICKY TINYINT,
  ID INTEGER DEFAULT '0' NOT NULL,
  NUM INTEGER DEFAULT '0' NOT NULL,
  PRIMARY KEY (ID)
);

CREATE TABLE OBJECT_DETAIL (
  OBJECT_DETAIL_ID INTEGER NOT NULL,
  NAME VARCHAR(256) NOT NULL,
  DESCRIPTION VARCHAR(1024) NOT NULL,
  PRIMARY KEY (OBJECT_DETAIL_ID)
);
PARTITION TABLE OBJECT_DETAIL ON COLUMN OBJECT_DETAIL_ID;

CREATE TABLE ASSET (
  ASSET_ID INTEGER NOT NULL,
  OBJECT_DETAIL_ID INTEGER NOT NULL,
  PRIMARY KEY (ASSET_ID)
);
PARTITION TABLE ASSET ON COLUMN ASSET_ID;

CREATE TABLE STRINGPART (
  NAME VARCHAR(9) NOT NULL,
  VAL1 INTEGER NOT NULL,
  VAL2 INTEGER ASSUMEUNIQUE,
  PRIMARY KEY(VAL1, NAME)
);
PARTITION TABLE STRINGPART ON COLUMN NAME;

CREATE TABLE test_ENG1232 (
    id bigint NOT NULL,
    PRIMARY KEY (id)
);

CREATE TABLE ENG1850 (
  cid INTEGER not null,
  aid INTEGER,
  pid INTEGER,
  attr INTEGER,
  constraint pk_cid primary key (cid)
);
PARTITION TABLE ENG1850 ON COLUMN cid;

create index eng1850_tree_pid_aid on ENG1850 (
  pid, aid
);

CREATE TABLE DEFAULT_NULL (
  ID INTEGER NOT NULL,
  num1 INTEGER DEFAULT NULL,
  num2 INTEGER ,
  ratio FLOAT DEFAULT NULL,
  num3 INTEGER DEFAULT NULL,
  desc VARCHAR(300) DEFAULT NULL,
  PRIMARY KEY (ID)
);

create index idx_num3 on DEFAULT_NULL (num3);


CREATE TABLE NO_JSON (
  ID INTEGER NOT NULL,
  var1 VARCHAR(300),
  var2 VARCHAR(300),
  var3 VARCHAR(300),
  PRIMARY KEY (ID)
);
CREATE INDEX test_field ON NO_JSON (var2, field(var3,'color'));

CREATE TABLE P3 (
  ID INTEGER NOT NULL,
  WAGE SMALLINT,
  DEPT SMALLINT,
  AGE SMALLINT,
  RENT SMALLINT,
  PRIMARY KEY (ID)
);
PARTITION TABLE P3 ON COLUMN ID;

-- to test inline varchar.
CREATE TABLE PWEE (
  ID INTEGER DEFAULT '0' NOT NULL,
  WEE VARCHAR(3),
  NUM INTEGER,
  RATIO FLOAT,
  PRIMARY KEY (ID)
);
PARTITION TABLE PWEE ON COLUMN ID;

CREATE TABLE PWEE_WITH_INDEX (
  ID INTEGER DEFAULT 0 NOT NULL,
  WEE VARCHAR(3),
  NUM INTEGER,
  PRIMARY KEY (ID)
);
CREATE INDEX my_num_idx ON PWEE_WITH_INDEX(NUM);

--
CREATE VIEW V_P3 (V_G1, V_G2, V_CNT, V_sum_age, V_sum_rent) AS
SELECT wage, dept, count(*), sum(age), sum(rent) FROM P3
GROUP BY wage, dept;

-- ENG6870
CREATE TABLE ENG6870
(
    C0 BIGINT NOT NULL,
	C1 INTEGER,
	C2 INTEGER,
	C3 INTEGER,
	C4 INTEGER,
        C5 BIGINT,
	C6 INTEGER,
        C7 SMALLINT,
        C8 TINYINT,
	C9 TINYINT,
	C10 TINYINT,
	C11 TINYINT,
	C12 INTEGER,
	C13 INTEGER,
	C14 TINYINT
);
PARTITION TABLE ENG6870 ON COLUMN C0;

CREATE INDEX SIX_TreeIdx ON ENG6870 (C5);
CREATE INDEX FOURTEEN_TreeIdx ON ENG6870 (C14);
<commit_msg>Update fixed-sql-ddl.sql<commit_after>CREATE TABLE VarcharBYTES(
  ID INTEGER DEFAULT 0 NOT NULL,
  var2 VARCHAR(2 BYTES),
  var80 VARCHAR(80 BYTES),
  PRIMARY KEY (ID)
);

CREATE TABLE VarcharTB (
  ID INTEGER DEFAULT 0 NOT NULL,
  var2 VARCHAR(2),
  var80 VARCHAR(80),
  PRIMARY KEY (ID)
);

CREATE TABLE VarLength (
  ID INTEGER DEFAULT 0 NOT NULL,
  var1 VARCHAR(10),
  var2 VARCHAR(80),
  bin1 VARBINARY(10),
  bin2 VARBINARY(80),
  PRIMARY KEY (ID)
);

CREATE TABLE P1 (
  ID INTEGER DEFAULT '0' NOT NULL,
  DESC VARCHAR(300),
  NUM INTEGER,
  RATIO FLOAT,
  PRIMARY KEY (ID)
);
PARTITION TABLE P1 ON COLUMN ID;

CREATE TABLE R1 (
  ID INTEGER DEFAULT '0' NOT NULL,
  DESC VARCHAR(300),
  NUM INTEGER,
  RATIO FLOAT,
  PRIMARY KEY (ID)
);

CREATE TABLE P2 (
  ID INTEGER DEFAULT '0' NOT NULL,
  DESC VARCHAR(300),
  NUM INTEGER NOT NULL,
  RATIO FLOAT NOT NULL,
  CONSTRAINT P2_PK_TREE PRIMARY KEY (ID)
);
PARTITION TABLE P2 ON COLUMN ID;

CREATE TABLE R2 (
  ID INTEGER DEFAULT '0' NOT NULL,
  DESC VARCHAR(300),
  NUM INTEGER NOT NULL,
  RATIO FLOAT NOT NULL,
  CONSTRAINT R2_PK_TREE PRIMARY KEY (ID)
);

CREATE TABLE P1_DECIMAL (
  ID INTEGER DEFAULT '0' NOT NULL,
  CASH DECIMAL NOT NULL,
  CREDIT DECIMAL NOT NULL,
  RATIO FLOAT NOT NULL,
  PRIMARY KEY (ID)
);

CREATE TABLE R1_DECIMAL (
  ID INTEGER DEFAULT '0' NOT NULL,
  CASH DECIMAL NOT NULL,
  CREDIT DECIMAL NOT NULL,
  RATIO FLOAT NOT NULL,
  PRIMARY KEY (ID)
);

CREATE TABLE COUNT_NULL (
  TRICKY TINYINT,
  ID INTEGER DEFAULT '0' NOT NULL,
  NUM INTEGER DEFAULT '0' NOT NULL,
  PRIMARY KEY (ID)
);

CREATE TABLE OBJECT_DETAIL (
  OBJECT_DETAIL_ID INTEGER NOT NULL,
  NAME VARCHAR(256) NOT NULL,
  DESCRIPTION VARCHAR(1024) NOT NULL,
  PRIMARY KEY (OBJECT_DETAIL_ID)
);
PARTITION TABLE OBJECT_DETAIL ON COLUMN OBJECT_DETAIL_ID;

CREATE TABLE ASSET (
  ASSET_ID INTEGER NOT NULL,
  OBJECT_DETAIL_ID INTEGER NOT NULL,
  PRIMARY KEY (ASSET_ID)
);
PARTITION TABLE ASSET ON COLUMN ASSET_ID;

CREATE TABLE STRINGPART (
  NAME VARCHAR(9) NOT NULL,
  VAL1 INTEGER NOT NULL,
  VAL2 INTEGER ASSUMEUNIQUE,
  PRIMARY KEY(VAL1, NAME)
);
PARTITION TABLE STRINGPART ON COLUMN NAME;

CREATE TABLE test_ENG1232 (
    id bigint NOT NULL,
    PRIMARY KEY (id)
);

CREATE TABLE ENG1850 (
  cid INTEGER not null,
  aid INTEGER,
  pid INTEGER,
  attr INTEGER,
  constraint pk_cid primary key (cid)
);
PARTITION TABLE ENG1850 ON COLUMN cid;

create index eng1850_tree_pid_aid on ENG1850 (
  pid, aid
);

CREATE TABLE DEFAULT_NULL (
  ID INTEGER NOT NULL,
  num1 INTEGER DEFAULT NULL,
  num2 INTEGER ,
  ratio FLOAT DEFAULT NULL,
  num3 INTEGER DEFAULT NULL,
  desc VARCHAR(300) DEFAULT NULL,
  PRIMARY KEY (ID)
);

create index idx_num3 on DEFAULT_NULL (num3);


CREATE TABLE NO_JSON (
  ID INTEGER NOT NULL,
  var1 VARCHAR(300),
  var2 VARCHAR(300),
  var3 VARCHAR(300),
  PRIMARY KEY (ID)
);
CREATE INDEX test_field ON NO_JSON (var2, field(var3,'color'));

CREATE TABLE P3 (
  ID INTEGER NOT NULL,
  WAGE SMALLINT,
  DEPT SMALLINT,
  AGE SMALLINT,
  RENT SMALLINT,
  PRIMARY KEY (ID)
);
PARTITION TABLE P3 ON COLUMN ID;

-- to test inline varchar.
CREATE TABLE PWEE (
  ID INTEGER DEFAULT '0' NOT NULL,
  WEE VARCHAR(3),
  NUM INTEGER,
  RATIO FLOAT,
  PRIMARY KEY (ID)
);
PARTITION TABLE PWEE ON COLUMN ID;

CREATE TABLE PWEE_WITH_INDEX (
  ID INTEGER DEFAULT 0 NOT NULL,
  WEE VARCHAR(3),
  NUM INTEGER,
  PRIMARY KEY (ID)
);
CREATE INDEX my_num_idx ON PWEE_WITH_INDEX(NUM);

--
CREATE VIEW V_P3 (V_G1, V_G2, V_CNT, V_sum_age, V_sum_rent) AS
SELECT wage, dept, count(*), sum(age), sum(rent) FROM P3
GROUP BY wage, dept;

-- ENG6870
CREATE TABLE ENG6870
(
    C0 BIGINT NOT NULL,
	C1 INTEGER,
	C2 INTEGER,
	C3 INTEGER,
	C4 INTEGER,
        C5 BIGINT,
	C6 INTEGER,
	C7 SMALLINT,
	C8 TINYINT,
	C9 TINYINT,
	C10 TINYINT,
	C11 TINYINT,
	C12 INTEGER,
	C13 INTEGER,
	C14 TINYINT
);
PARTITION TABLE ENG6870 ON COLUMN C0;

CREATE INDEX SIX_TreeIdx ON ENG6870 (C5);
CREATE INDEX FOURTEEN_TreeIdx ON ENG6870 (C14);

{'fraction_non_alphanumeric': 0.07972204674668351, 'fraction_numerical': 0.04144030322173089, 'mean_word_length': 3.731619844590556, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6275628', 'n_tokens_mistral': 3445, 'n_tokens_neox': 2990, 'n_words': 1063}