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 running great expectations unittests #1324

Closed
max-hoffman opened this issue Feb 12, 2021 · 2 comments
Closed

panic running great expectations unittests #1324

max-hoffman opened this issue Feb 12, 2021 · 2 comments

Comments

@max-hoffman
Copy link
Contributor

replicating takes a bit of work, ping me for details:

  • great expectations repo
  • command:pytest --no-spark --mysql --no-postgresql tests/test_definitions/test_expectations.py
  • table not found error code fix required
  • test concurrency stabilization fix required

create table:

TRACE: received query DESCRIBE `expect_table_row_count_to_equal_other_table_data_1`
DEBUG: executing query
TRACE: Error running query DESCRIBE `expect_table_row_count_to_equal_other_table_data_1`: table not found: expect_table_row_count_to_equal_other_table_data_1
TRACE: received query ROLLBACK
DEBUG: executing query
TRACE: received query
CREATE TABLE expect_table_row_count_to_equal_other_table_data_1 (
	c1 INTEGER,
	c2 TEXT,
	c3 TEXT,
	c4 DECIMAL
)


DEBUG: executing query
TRACE: received query COMMIT
DEBUG: executing query
TRACE: received query INSERT INTO expect_table_row_count_to_equal_other_table_data_1 (c1, c2, c3, c4) VALUES (4, 'a', NULL, 4.0e0),(5, 'b', NULL, 3.0e0),(6, 'c', NULL, 3.5e0),(7, 'd', NULL, 1.2e0)
DEBUG: executing query
TRACE: returning OK result &{[] 4 0  [] <nil>}
TRACE: received query COMMIT

run 2:

TRACE: received query DESCRIBE `expect_table_row_count_to_equal_other_table_data_1`
DEBUG: executing query
INFO: kill query: pid 173
INFO: ConnectionClosed: client 17
ERROR: mysql_server caught panic:
runtime error: index out of range [0] with length 0
/usr/local/go/src/runtime/panic.go:88 (0x10365a4)
	goPanicIndex: panic(boundsError{x: int64(x), signed: true, y: y, code: boundsIndex})
/Users/max-hoffman/go/src/github.com/dolthub/go-mysql-server/sql/plan/showcolumns.go:170 (0x1dc2744)
	com/dolthub/go-mysql-server/sql/plan.(*ShowColumns).isFirstColInUniqueKey: firstIndexCol := GetColumnFromIndexExpr(idx.Expressions()[0], table)
/Users/max-hoffman/go/src/github.com/dolthub/go-mysql-server/sql/plan/showcolumns.go:96 (0x1dc1fb3)
	com/dolthub/go-mysql-server/sql/plan.(*ShowColumns).RowIter: } else if s.isFirstColInUniqueKey(col, table) {
/Users/max-hoffman/go/src/github.com/dolthub/go-mysql-server/sql/plan/process.go:47 (0x1db3f44)
	com/dolthub/go-mysql-server/sql/plan.(*QueryProcess).RowIter: iter, err := p.Child.RowIter(ctx, row)
/Users/max-hoffman/go/src/github.com/dolthub/go-mysql-server/engine.go:214 (0x1e6aa0d)
	com/dolthub/go-mysql-server.(*Engine).QueryWithBindings: iter, err = analyzed.RowIter(ctx, nil)
/Users/max-hoffman/go/src/github.com/dolthub/go-mysql-server/engine.go:151 (0x2148058)
	com/dolthub/go-mysql-server.(*Engine).Query: return e.QueryWithBindings(ctx, query, nil)
/Users/max-hoffman/go/src/github.com/dolthub/go-mysql-server/server/handler.go:309 (0x2148009)
	com/dolthub/go-mysql-server/server.(*Handler).doQuery: schema, rows, err = h.e.Query(ctx, query)
/Users/max-hoffman/go/src/github.com/dolthub/go-mysql-server/server/handler.go:159 (0x214601b)
	com/dolthub/go-mysql-server/server.(*Handler).ComQuery: return h.doQuery(c, query, nil, callback)
/Users/max-hoffman/go/pkg/mod/github.com/dolthub/vitess@v0.0.0-20201204232015-9e3805156304/go/mysql/conn.go:1167 (0x1529a8e)
	com/dolthub/vitess/go/mysql.(*Conn).execQuery: err := handler.ComQuery(c, query, func(qr *sqltypes.Result) error {
/Users/max-hoffman/go/pkg/mod/github.com/dolthub/vitess@v0.0.0-20201204232015-9e3805156304/go/mysql/conn.go:806 (0x15279e8)
	com/dolthub/vitess/go/mysql.(*Conn).handleNextCommand: if err := c.execQuery(sql, handler, more); err != nil {
/Users/max-hoffman/go/pkg/mod/github.com/dolthub/vitess@v0.0.0-20201204232015-9e3805156304/go/mysql/server.go:472 (0x1544c3b)
	com/dolthub/vitess/go/mysql.(*Listener).handle: err := c.handleNextCommand(l.handler)
/usr/local/go/src/runtime/asm_amd64.s:1374 (0x1071840)
	goexit: BYTE	$0x90	// NOP
@zachmu
Copy link
Member

zachmu commented Feb 12, 2021

This looks very similar to a bug @andrew-wm-arthur fixed for keyless tables. Care to comment, Andy?

@max-hoffman
Copy link
Contributor Author

upgrading to the newest version of dolt fixes this, closing

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