[
https://issues.apache.org/jira/browse/CALCITE-1291?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15366850#comment-15366850
]
Josh Elser commented on CALCITE-1291:
-------------------------------------
Turns out this was just an issue with an invocation of sqlline by Phoenix. It
was not passing the {{--incremental=false}} option which caused the default
column width to be used instead of inspecting each batch of rows to display.
This did lead me to seeing that the {{DatabaseMetaData.getPrimaryKeys()}}
doesn't seem to be working correctly. Will dig into that too.
> Incorrect formatting from Avatica in sqlline's table outputformat
> -----------------------------------------------------------------
>
> Key: CALCITE-1291
> URL: https://issues.apache.org/jira/browse/CALCITE-1291
> Project: Calcite
> Issue Type: Bug
> Components: avatica
> Reporter: Josh Elser
> Assignee: Josh Elser
>
> {noformat}
> 0: jdbc:phoenix:thin:url=http://localhost:876> select * from STR_VIEW;
> +------------------------------------------+------------------------------------------+--------------------------------+
> | PK | VAL
> | LONG_VALUE |
> +------------------------------------------+------------------------------------------+--------------------------------+
> | ASDFASDFASDFASDFASDFASDFASDFASDFASDFASDFASDFASDF | value1
> | valuevaluevaluevalueva |
> +------------------------------------------+------------------------------------------+--------------------------------+
> 1 row selected (0.025 seconds)
> {noformat}
> {noformat}
> 0: jdbc:phoenix:localhost:2181:/hbase-1.2> select * from STR_VIEW;
> +---------------------------------------------------+---------+-----------------------------------------------------+
> | PK | VAL |
> LONG_VALUE |
> +---------------------------------------------------+---------+-----------------------------------------------------+
> | ASDFASDFASDFASDFASDFASDFASDFASDFASDFASDFASDFASDF | value1 |
> valuevaluevaluevaluevaluevaluevaluevaluevaluevalue |
> +---------------------------------------------------+---------+-----------------------------------------------------+
> 1 row selected (0.058 seconds)
> {noformat}
> This is the difference between using Apache Phoenix's avatica client and the
> normal client and sqlline 1.1.9. With {{!outputformat table}} above, we can
> see the difference in these two clients, while {{!outputformat xmlattr}}
> shows the complete (and expected) values.
> It seems like some column metadata is just not being properly sent by PQS (at
> least that's my hunch). The data is present in the results, just not rendered
> properly. I'll have to look into what sqlline pulls for the column width and
> figure out if PQS is sending that properly.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)