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

Panic probably related to EXPLODE #886

Closed
juanjux opened this issue Jun 19, 2019 · 2 comments
Closed

Panic probably related to EXPLODE #886

juanjux opened this issue Jun 19, 2019 · 2 comments
Labels
bug Something isn't working

Comments

@juanjux
Copy link
Contributor

juanjux commented Jun 19, 2019

This query:

SELECT
    r.repository_id AS repo,
    c.committer_when AS date,
    file_path AS path,
    EXPLODE(UAST_EXTRACT(UAST(f.blob_content, 'Go', '//uast:Import/Path'), 'Value')) AS imports
FROM
    refs AS r
    NATURAL JOIN commits AS c
    NATURAL JOIN commit_files AS cm
    NATURAL JOIN files AS f
WHERE r.ref_name = 'HEAD'
    AND f.file_path REGEXP('.*.go$')
    AND f.file_path NOT REGEXP '^vendor.*'
    AND NOT IS_BINARY(f.blob_content)
    AND f.blob_size < 1000000
LIMIT 10

Produced a panic with this output (reduced):

time="2019-06-19T15:59:58Z" level=error msg=
"mysql_server caught panic:\nunresolved column is a placeholder node, but IsNullable was called
/usr/local/go/src/runtime/panic.go:513
...)"

Removing the EXPLODE made it works. Tested with beta2 and beta3.

@juanjux juanjux added the bug Something isn't working label Jun 19, 2019
@juanjux
Copy link
Contributor Author

juanjux commented Jun 20, 2019

I'll try to simplify the query.

Full panic:

"mysql_server caught panic:
unresolved column is a placeholder node, but IsNullable was called
/usr/local/go/src/runtime/panic.go:513 (0x42bdc8)
/go/pkg/mod/github.com/src-d/go-mysql-server@v0.4.1-0.20190619104848-eaab1795353a/sql/expression/unresolved.go:41 (0x9ac4d8)
/go/src/github.com/src-d/gitbase/internal/function/uast.go:68 (0xe65877)

/go/pkg/mod/github.com/src-d/go-mysql-server@v0.4.1-0.20190619104848-eaab1795353a/sql/expression/common.go:55 (0x9a10b2)
/go/pkg/mod/github.com/src-d/go-mysql-server@v0.4.1-0.20190619104848-eaab1795353a/sql/expression/function/explode.go:71 (0xc96ed2)
/go/pkg/mod/github.com/src-d/go-mysql-server@v0.4.1-0.20190619104848-eaab1795353a/sql/expression/common.go:34 (0x9a0f22)
/go/pkg/mod/github.com/src-d/go-mysql-server@v0.4.1-0.20190619104848-eaab1795353a/sql/analyzer/resolve_generators.go:47 (0xcd821f)
/go/pkg/mod/github.com/src-d/go-mysql-server@v0.4.1-0.20190619104848-eaab1795353a/sql/plan/project.go:78 (0x9ceba8)
/go/pkg/mod/github.com/src-d/go-mysql-server@v0.4.1-0.20190619104848-eaab1795353a/sql/plan/limit.go:45 (0x9ca3c0)
/go/pkg/mod/github.com/src-d/go-mysql-server@v0.4.1-0.20190619104848-eaab1795353a/sql/analyzer/resolve_generators.go:17 (0xcc5e1c)
/go/pkg/mod/github.com/src-d/go-mysql-server@v0.4.1-0.20190619104848-eaab1795353a/sql/analyzer/batch.go:67 (0xcbb627)
/go/pkg/mod/github.com/src-d/go-mysql-server@v0.4.1-0.20190619104848-eaab1795353a/sql/analyzer/batch.go:38 (0xcbb2ce)
/go/pkg/mod/github.com/src-d/go-mysql-server@v0.4.1-0.20190619104848-eaab1795353a/sql/analyzer/analyzer.go:171 (0xcb39db)
/go/pkg/mod/github.com/src-d/go-mysql-server@v0.4.1-0.20190619104848-eaab1795353a/engine.go:143 (0xcf427c)
/go/pkg/mod/github.com/src-d/go-mysql-server@v0.4.1-0.20190619104848-eaab1795353a/server/handler.go:90 (0xcf5f18)
/go/pkg/mod/vitess.io/vitess@v3.0.0-rc.3.0.20190602171040-12bfde34629c+incompatible/go/mysql/conn.go:819 (0xbf8897)
/go/pkg/mod/vitess.io/vitess@v3.0.0-rc.3.0.20190602171040-12bfde34629c+incompatible/go/mysql/conn.go:749 (0xbf82a9)
/go/pkg/mod/vitess.io/vitess@v3.0.0-rc.3.0.20190602171040-12bfde34629c+incompatible/go/mysql/server.go:441 (0xc082db)
/usr/local/go/src/runtime/asm_amd64.s:1333 (0x459690)"

@juanjux
Copy link
Contributor Author

juanjux commented Jun 20, 2019

This is for go-mysql-server since it's related to EXPLODE, closing, will open in the other project (btw I'm looking into it).

@juanjux juanjux closed this as completed Jun 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant