MonetDB / sqlalchemy-monetdb

A SQLAlchemy dialect for MonetDB
MIT License
41 stars 17 forks source link

test_bound_limit test fail #18

Closed gijzelaerr closed 7 years ago

gijzelaerr commented 7 years ago

  File "/home/gijs/Work/sqlalchemy-monetdb/.venv3/lib/python3.5/site-packages/sqlalchemy/sql/elements.py", line 676, in __getattr__
    return getattr(self.comparator, key)
AttributeError: 'Comparator' object has no attribute '_limit_offset_value'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/gijs/Work/sqlalchemy-monetdb/.venv3/lib/python3.5/site-packages/sqlalchemy/sql/selectable.py", line 96, in _offset_or_limit_clause_asint
    value = clause._limit_offset_value
  File "/home/gijs/Work/sqlalchemy-monetdb/.venv3/lib/python3.5/site-packages/sqlalchemy/sql/elements.py", line 682, in __getattr__
    key)
AttributeError: Neither 'BindParameter' object nor 'Comparator' object has an attribute '_limit_offset_value'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/gijs/Work/sqlalchemy-monetdb/.venv3/lib/python3.5/site-packages/sqlalchemy/testing/suite/test_select.py", line 172, in test_bound_limit
    params={"l": 2}
  File "/home/gijs/Work/sqlalchemy-monetdb/.venv3/lib/python3.5/site-packages/sqlalchemy/testing/suite/test_select.py", line 123, in _assert_result
    config.db.execute(select, params).fetchall(),
  File "/home/gijs/Work/sqlalchemy-monetdb/.venv3/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 2064, in execute
    return connection.execute(statement, *multiparams, **params)
  File "/home/gijs/Work/sqlalchemy-monetdb/.venv3/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 945, in execute
    return meth(self, multiparams, params)
  File "/home/gijs/Work/sqlalchemy-monetdb/.venv3/lib/python3.5/site-packages/sqlalchemy/sql/elements.py", line 263, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/home/gijs/Work/sqlalchemy-monetdb/.venv3/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 1046, in _execute_clauseelement
    if not self.schema_for_object.is_default else None)
  File "<string>", line 1, in <lambda>
  File "/home/gijs/Work/sqlalchemy-monetdb/.venv3/lib/python3.5/site-packages/sqlalchemy/sql/elements.py", line 436, in compile
    return self._compiler(dialect, bind=bind, **kw)
  File "/home/gijs/Work/sqlalchemy-monetdb/.venv3/lib/python3.5/site-packages/sqlalchemy/sql/elements.py", line 442, in _compiler
    return dialect.statement_compiler(dialect, self, **kw)
  File "/home/gijs/Work/sqlalchemy-monetdb/.venv3/lib/python3.5/site-packages/sqlalchemy/sql/compiler.py", line 435, in __init__
    Compiled.__init__(self, dialect, statement, **kwargs)
  File "/home/gijs/Work/sqlalchemy-monetdb/.venv3/lib/python3.5/site-packages/sqlalchemy/sql/compiler.py", line 216, in __init__
    self.string = self.process(self.statement, **compile_kwargs)
  File "/home/gijs/Work/sqlalchemy-monetdb/.venv3/lib/python3.5/site-packages/sqlalchemy/sql/compiler.py", line 242, in process
    return obj._compiler_dispatch(self, **kwargs)
  File "/home/gijs/Work/sqlalchemy-monetdb/.venv3/lib/python3.5/site-packages/sqlalchemy/sql/visitors.py", line 81, in _compiler_dispatch
    return meth(self, **kw)
  File "/home/gijs/Work/sqlalchemy-monetdb/.venv3/lib/python3.5/site-packages/sqlalchemy/sql/compiler.py", line 1738, in visit_select
    text, select, inner_columns, froms, byfrom, kwargs)
  File "/home/gijs/Work/sqlalchemy-monetdb/.venv3/lib/python3.5/site-packages/sqlalchemy/sql/compiler.py", line 1842, in _compose_select_body
    text += self.limit_clause(select, **kwargs)
  File "/home/gijs/Work/sqlalchemy-monetdb/sqlalchemy_monetdb/compiler.py", line 84, in limit_clause
    if select._limit is not None:
  File "/home/gijs/Work/sqlalchemy-monetdb/.venv3/lib/python3.5/site-packages/sqlalchemy/sql/selectable.py", line 2077, in _limit
    return _offset_or_limit_clause_asint(self._limit_clause, "limit")
  File "/home/gijs/Work/sqlalchemy-monetdb/.venv3/lib/python3.5/site-packages/sqlalchemy/sql/selectable.py", line 100, in _offset_or_limit_clause_asint
    "integer value for %s" % attrname)
sqlalchemy.exc.CompileError: This SELECT structure does not use a simple integer value for limit