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

regression: table "" does not have column "MAX(commits.commit_author_when)" #846

Closed
smacker opened this issue May 31, 2019 · 1 comment · Fixed by #847
Closed

regression: table "" does not have column "MAX(commits.commit_author_when)" #846

smacker opened this issue May 31, 2019 · 1 comment · Fixed by #847
Assignees
Labels
blocked Some other issue is blocking this bug Something isn't working

Comments

@smacker
Copy link

smacker commented May 31, 2019

Query:

SELECT q1.repository_id, when_max, lines,
CASE WHEN when_max < DATE_SUB(NOW(), INTERVAL 3 MONTH) THEN 'unmaintained' ELSE 'maintained' END
FROM (
    SELECT rc.repository_id, MAX(c.commit_author_when) AS when_max
    FROM ref_commits rc
    NATURAL JOIN commits c
    WHERE rc.ref_name = 'HEAD'
    GROUP BY rc.repository_id
) q1 JOIN (
    SELECT rf.repository_id, SUM(ARRAY_LENGTH(SPLIT(f.blob_content, '\n'))-1) as lines
    FROM refs rf
    NATURAL JOIN commits c
    NATURAL JOIN commit_files cf
    NATURAL JOIN files f
    WHERE rf.ref_name = 'HEAD'
    AND f.file_path NOT REGEXP '^vendor.*'
    AND NOT IS_BINARY(f.blob_content)
    GROUP BY rf.repository_id
) q2 ON q1.repository_id = q2.repository_id

returns

unknown error: table "" does not have column "MAX(commits.commit_author_when)"

but it was working on v0.20-rc1.

@smacker smacker changed the title table "" does not have column "MAX(commits.commit_author_when)" regression: table "" does not have column "MAX(commits.commit_author_when)" May 31, 2019
@ajnavarro ajnavarro added the bug Something isn't working label May 31, 2019
@erizocosmico erizocosmico self-assigned this May 31, 2019
@erizocosmico erizocosmico added the blocked Some other issue is blocking this label Jun 3, 2019
@erizocosmico
Copy link
Contributor

Will be fixed once src-d/go-mysql-server#739 is merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Some other issue is blocking this bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants