<commit_before>USE cs194;


CREATE TABLE IF NOT EXISTS badges (
    Date VARCHAR(255),
    UserId INT,
    Id INT, 
    Name VARCHAR(255)
);

CREATE TABLE IF NOT EXISTS comments (
    CreationDate VARCHAR(255),
    Text LONGTEXT,
    UserId INT,
    Score INT,
    PostId INT,
    Id INT
);

CREATE TABLE IF NOT EXISTS posts (
    Body LONGTEXT,
    ViewCount INT,
    LastActivityDate VARCHAR(255),
    Title MEDIUMTEXT,
    LastEditorUserId INT,
    LastEditorDisplayName VARCHAR(255),
    LastEditDate VARCHAR(255),
    CommentCount INT,
    AnswerCount INT,
    AcceptedAnswerId INT,
    Score INT,
    PostTypeId INT,
    OwnerUserId INT,
    Tags VARCHAR(255),
    CreationDate VARCHAR(255),
    FavorityCount INT,
    Id INT
);

CREATE TABLE IF NOT EXISTS users (
    DownVotes INT,
    DisplayName VARCHAR(255),
    Views INT,
    AboutMe MEDIUMTEXT,
    LastAccessDate VARCHAR(255),
    WebsiteUrl MEDIUMTEXT,
    EmailHash VARCHAR(255),
    Reputation INT,
    Location MEDIUMTEXT,
    UpVotes INT,
    CreationDate VARCHAR(255),
    Id INT
);

CREATE TABLE IF NOT EXISTS votes (
    VoteTypeId INT,
    PostId INT,
    Id INT,
    CreationDate VARCHAR(255)
);

LOAD DATA LOCAL INFILE 'badges.xml.dat' INTO TABLE badges FIELDS TERMINATED BY '' LINES TERMINATED BY '';
LOAD DATA LOCAL INFILE 'comments.xml.dat' INTO TABLE comments FIELDS TERMINATED BY '' LINES TERMINATED BY '';
LOAD DATA LOCAL INFILE 'posts.xml.dat' INTO TABLE posts FIELDS TERMINATED BY '' LINES TERMINATED BY '';
LOAD DATA LOCAL INFILE 'users.xml.dat' INTO TABLE users FIELDS TERMINATED BY '' LINES TERMINATED BY '';
LOAD DATA LOCAL INFILE 'votes.xml.dat' INTO TABLE votes FIELDS TERMINATED BY '' LINES TERMINATED BY '';<commit_msg>change Dates to use mysql DATE rather than VARCHAR<commit_after>USE cs194;


CREATE TABLE IF NOT EXISTS badges (
    Date DATETIME,
    UserId INT,
    Id INT, 
    Name VARCHAR(255)
);

CREATE TABLE IF NOT EXISTS comments (
    CreationDate DATETIME,
    Text LONGTEXT,
    UserId INT,
    Score INT,
    PostId INT,
    Id INT
);

CREATE TABLE IF NOT EXISTS posts (
    Body LONGTEXT,
    ViewCount INT,
    LastActivityDate DATETIME,
    Title MEDIUMTEXT,
    LastEditorUserId INT,
    LastEditorDisplayName VARCHAR(255),
    LastEditDate DATETIME,
    CommentCount INT,
    AnswerCount INT,
    AcceptedAnswerId INT,
    Score INT,
    PostTypeId INT,
    OwnerUserId INT,
    Tags VARCHAR(255),
    CreationDate DATETIME,
    FavorityCount INT,
    Id INT
);

CREATE TABLE IF NOT EXISTS users (
    DownVotes INT,
    DisplayName VARCHAR(255),
    Views INT,
    AboutMe MEDIUMTEXT,
    LastAccessDate DATETIME,
    WebsiteUrl MEDIUMTEXT,
    EmailHash VARCHAR(255),
    Reputation INT,
    Location MEDIUMTEXT,
    UpVotes INT,
    CreationDate DATETIME,
    Id INT
);

CREATE TABLE IF NOT EXISTS votes (
    VoteTypeId INT,
    PostId INT,
    Id INT,
    CreationDate DATETIME
);

LOAD DATA LOCAL INFILE 'badges.xml.dat' INTO TABLE badges FIELDS TERMINATED BY '' LINES TERMINATED BY '';
LOAD DATA LOCAL INFILE 'comments.xml.dat' INTO TABLE comments FIELDS TERMINATED BY '' LINES TERMINATED BY '';
LOAD DATA LOCAL INFILE 'posts.xml.dat' INTO TABLE posts FIELDS TERMINATED BY '' LINES TERMINATED BY '';
LOAD DATA LOCAL INFILE 'users.xml.dat' INTO TABLE users FIELDS TERMINATED BY '' LINES TERMINATED BY '';
LOAD DATA LOCAL INFILE 'votes.xml.dat' INTO TABLE votes FIELDS TERMINATED BY '' LINES TERMINATED BY '';
{'fraction_non_alphanumeric': 0.07542790832608065, 'fraction_numerical': 0.017406440382941687, 'mean_word_length': 3.2938978829389787, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 10}, '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': '7339356', 'n_tokens_mistral': 1265, 'n_tokens_neox': 1124, 'n_words': 384}