diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2020-09-05 19:45:04 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2020-09-06 09:55:27 -0400 |
commit | b0e9083eb2a786670a1a129d7968d768d1c4ab42 (patch) | |
tree | e13e21eb1743258c8a376ab8c816f998bab0abb8 /test/dialect/oracle/test_compiler.py | |
parent | fc612d17145453ad95e5f9ba6a40ba70d2f507c3 (diff) | |
download | sqlalchemy-b0e9083eb2a786670a1a129d7968d768d1c4ab42.tar.gz |
Don't rely on string col name in adapt_to_context
fixed an issue where even though the method claims to be
matching up columns positionally, it was failing on that by
looking in "keymap" based on string name.
Adds a new member to the _keymap recs MD_RESULT_MAP_INDEX
so that we can efficiently link from the generated keymap
back to the compiled._result_columns structure without
any ambiguity.
Fixes: #5559
Change-Id: Ie2fa9165c16625ef860ffac1190e00575e96761f
Diffstat (limited to 'test/dialect/oracle/test_compiler.py')
-rw-r--r-- | test/dialect/oracle/test_compiler.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/dialect/oracle/test_compiler.py b/test/dialect/oracle/test_compiler.py index a4a8cd99f..8bfaded8f 100644 --- a/test/dialect/oracle/test_compiler.py +++ b/test/dialect/oracle/test_compiler.py @@ -545,7 +545,7 @@ class CompileTest(fixtures.TestBase, AssertsCompiledSQL): stmt = select(type_coerce(column("x"), MyType).label("foo")).limit(1) dialect = oracle.dialect() compiled = stmt.compile(dialect=dialect) - assert isinstance(compiled._create_result_map()["foo"][-1], MyType) + assert isinstance(compiled._create_result_map()["foo"][-2], MyType) def test_use_binds_for_limits_disabled_one(self): t = table("sometable", column("col1"), column("col2")) @@ -1061,8 +1061,8 @@ class CompileTest(fixtures.TestBase, AssertsCompiledSQL): eq_( compiled._create_result_map(), { - "c3": ("c3", (t1.c.c3, "c3", "c3"), t1.c.c3.type), - "lower": ("lower", (fn, "lower", None), fn.type), + "c3": ("c3", (t1.c.c3, "c3", "c3"), t1.c.c3.type, 1), + "lower": ("lower", (fn, "lower", None), fn.type, 0), }, ) |