stoty commented on code in PR #124:
URL:
https://github.com/apache/phoenix-queryserver/pull/124#discussion_r1156746971
##########
python-phoenixdb/phoenixdb/tests/dbapi20.py:
##########
@@ -832,3 +832,18 @@ def test_ROWID(self):
self.assertTrue(hasattr(self.driver,'ROWID'),
'module.ROWID must be defined.'
)
+
+ # https://issues.apache.org/jira/browse/PHOENIX-6917
+ def test_alias(self):
+ con = self._connect()
+ try:
+ cur = con.cursor()
+ self.executeDDL2(cur)
+ cur.execute("CREATE TABLE IF NOT EXISTS STOCK_SYMBOL (SYMBOL
VARCHAR NOT NULL PRIMARY KEY, COMPANY VARCHAR)")
+ cur.execute("UPSERT INTO STOCK_SYMBOL VALUES ('CRM','SALESFORCE')")
+ cur.execute("UPSERT INTO STOCK_SYMBOL VALUES ('AAPL','APPLE Inc')")
+ cur.execute("SELECT symbol as symb, company as comp FROM
STOCK_SYMBOL")
+ self.assertEqual(cur.description[0][0], 'SYMB')
Review Comment:
Confirm that you can get the results via cur['SYMB'] and cur['COMP']
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]