[
https://issues.apache.org/jira/browse/CALCITE-3716?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17027285#comment-17027285
]
Jin Xing edited comment on CALCITE-3716 at 1/31/20 8:45 AM:
------------------------------------------------------------
{color:#172b4d}Thanks a lot [~julianhyde] for review ~{color}
{quote}Does {{getColumnName}} need to be fixed also?
{quote}
* {color:#172b4d}I didn't find from {color}[JDBC
spec|https://docs.oracle.com/javase/8/docs/api/java/sql/ResultSetMetaData.html#getColumnName-int-]{color:#172b4d}
specifies that {color}*columnName*{color:#172b4d} should be empty string
rather than null when not applicable.{color}
* Constructor of ColumnMetaDatas[1] sets *columnName* by *label* (field name
in row type) if the param passed in is null.
I updated and replaced _assertEquals_ with _assertThat_
[1][https://github.com/apache/calcite-avatica/blob/dd65a2b18b8c35cfccf1c47b6be87ea7db3ad658/core/src/main/java/org/apache/calcite/avatica/ColumnMetaData.java#L122]
was (Author: [email protected]):
{color:#172b4d}Thanks a lot [~julianhyde] for review ~{color}
* {color:#172b4d}I didn't find from {color}[JDBC
spec|https://docs.oracle.com/javase/8/docs/api/java/sql/ResultSetMetaData.html#getColumnName-int-]{color:#172b4d}
specifies that {color}*columnName*{color:#172b4d} should be empty string
rather than null when not applicable.{color}
* Constructor of ColumnMetaDatas[1] sets *columnName* by *label* (field name
in row type) if the param passed in is null.
* I updated and replaced _assertEquals_ with _assertThat_
[1][https://github.com/apache/calcite-avatica/blob/dd65a2b18b8c35cfccf1c47b6be87ea7db3ad658/core/src/main/java/org/apache/calcite/avatica/ColumnMetaData.java#L122]
> ResultSetMetaData.getTableName should return empty string, not null, when
> column does not map to a table
> --------------------------------------------------------------------------------------------------------
>
> Key: CALCITE-3716
> URL: https://issues.apache.org/jira/browse/CALCITE-3716
> Project: Calcite
> Issue Type: Bug
> Reporter: Julian Hyde
> Assignee: Jin Xing
> Priority: Major
> Labels: pull-request-available
> Time Spent: 50m
> Remaining Estimate: 0h
>
> Per the [JDBC
> spec|https://docs.oracle.com/javase/8/docs/api/java/sql/ResultSetMetaData.html#getTableName-int-],
> {{ResultSetMetaData.getTableName}} should return empty string, not null,
> when column does not map to a table. Similarly getCatalogName, getSchemaName,
> getColumnName.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)