You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@phoenix.apache.org by GitBox <gi...@apache.org> on 2020/07/07 18:14:50 UTC

[GitHub] [phoenix-queryserver] joshelser commented on a change in pull request #42: PHOENIX-5994 SqlAlchemy schema filtering incorrect semantics

joshelser commented on a change in pull request #42:
URL: https://github.com/apache/phoenix-queryserver/pull/42#discussion_r451054286



##########
File path: python-phoenixdb/phoenixdb/tests/test_sqlalchemy.py
##########
@@ -52,6 +52,39 @@ def test_textual(self):
             finally:
                 connection.execute('drop table if exists ALCHEMY_TEST')
 
+    def test_schema_filtering(self):
+        engine = self._create_engine()
+        with engine.connect() as connection:
+            try:
+                connection.execute('drop table if exists ALCHEMY_TEST')
+                connection.execute('drop table if exists A.ALCHEMY_TEST_A')
+                connection.execute('drop table if exists B.ALCHEMY_TEST_B')
+
+                connection.execute(text('create table ALCHEMY_TEST (ID integer primary key)'))
+                connection.execute(text('create table A.ALCHEMY_TEST_A (ID_A integer primary key)'))
+                connection.execute(text('create table B.ALCHEMY_TEST_B (ID_B integer primary key)'))
+
+                inspector = db.inspect(engine)
+
+                self.assertEqual(inspector.get_schema_names(), [None, 'A', 'B', 'SYSTEM'])

Review comment:
       Is returning `None` vs `''` (empty string) intentional? i.e. is this convention for sqlalchemy?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org