Aarchy commented on code in PR #1665:
URL: https://github.com/apache/phoenix/pull/1665#discussion_r1317258995
##########
phoenix-core/src/test/java/org/apache/phoenix/jdbc/PhoenixResultSetMetadataTest.java:
##########
@@ -54,18 +54,20 @@ public void testNullTypeName() throws Exception {
public void testCaseSensitiveExpression() throws Exception {
Connection conn = DriverManager.getConnection(getUrl());
conn.createStatement().execute(
- "CREATE TABLE T (pk1 CHAR(15) not null, pk2 VARCHAR not null,
\"v1\" VARCHAR(15), v2 DATE, v3 VARCHAR " +
+ "CREATE TABLE T (pk1 CHAR(15) not null, pk2 VARCHAR not null,
\"v1\" VARCHAR(15), v2 DATE, \"v3\" VARCHAR " +
"CONSTRAINT pk PRIMARY KEY (pk1, pk2)) ");
ResultSet rs = conn.createStatement().executeQuery("SELECT pk1 AS
testalias1, pk2, " +
- "\"v1\" AS \"testalias2\", v2 FROM T");
+ "\"v1\" AS \"testalias2\", v2, \"v3\" FROM T");
assertEquals("PK1", rs.getMetaData().getColumnName(1));
assertEquals("TESTALIAS1", rs.getMetaData().getColumnLabel(1));
assertEquals("PK2", rs.getMetaData().getColumnName(2));
assertEquals("PK2", rs.getMetaData().getColumnLabel(2));
- assertEquals("\"v1\"", rs.getMetaData().getColumnName(3));
+ assertEquals("v1", rs.getMetaData().getColumnName(3));
Review Comment:
Added some test cases for it.
As it is very not straightforward what should this function return, created
a separate [ticket](https://issues.apache.org/jira/browse/PHOENIX-7030) to find
a proper solution.
--
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]