Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why resource_group_id is varchar type in exact_match_source_selectors? #178

Open
byungnam opened this issue Aug 26, 2022 · 1 comment
Open

Comments

@byungnam
Copy link

Hi. I have a question about a table named exact_match_source_selectors.

There is a column named resource_group_id, which has bigint type for every table but except from exact_match_source_selectors. It has varchar type on there.

Why is that? Even the committer wrote "WTF" from the comment.

CREATE TABLE IF NOT EXISTS exact_match_source_selectors (
resource_group_id VARCHAR(256) NOT NULL, -- WTF varchar?!

Is it intended? If so, what was the reason to do that?

@byungnam byungnam changed the title varchar type of resource_group_id in exact_match_source_selectors table? Why resource_group_id is varchar type in exact_match_source_selectors? Nov 14, 2022
@rwilliams-r7
Copy link

rwilliams-r7 commented Mar 20, 2023

Any update on this the script does not work in its current state. This is the update I had to make to the script to run.

CREATE TABLE IF NOT EXISTS exact_match_source_selectors (
    resource_group_id VARCHAR(128) NOT NULL,  -- WTF varchar?!
    update_time DATETIME NOT NULL,

    -- Selector fields which must exactly match a query
    source VARCHAR(256) NOT NULL, -- (reduced from 512)
    environment VARCHAR(128),
    query_type VARCHAR(128), -- (reduced from 512)

    PRIMARY KEY (environment, source, query_type),
    UNIQUE (source, environment, query_type, resource_group_id)
);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants