[
https://issues.apache.org/jira/browse/PHOENIX-2258?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Kevin Liew updated PHOENIX-2258:
--------------------------------
Description:
When using Avatica to request sql:
{noformat}select now(){noformat}
The results are returned as one column, one row as expected
{noformat}"DATE '292278994-08-17 07:12:55.807'"
2404-04-06{noformat}
However, the column name and row value are always incorrect (and the values
never change).
These functions do work when we select from a table.
ie. this works as expected: {noformat}select now() from test{noformat}
was:
request:{"request":"prepare","connectionId":"5f84ee29-82ce-42d5-ffe0-3ed2f35f95F5","sql":"{color:#59afe1}select
now(){color}","maxRowCount":"-1"}
{"response":"prepare","statement":{"connectionId":"5f84ee29-82ce-42d5-ffe0-3ed2f35f95F5","id":205173038,"signature":{"columns":[{"ordinal":0,"autoIncrement":false,"caseSensitive":true,"searchable":true,"currency":false,"nullable":0,"signed":false,"displaySize":23,"label":"DATE
'292278994-08-17 07:12:55.807'","columnName":"{color:#d04437}DATE
'292278994-08-17
07:12:55.807{color}'","schemaName":"","precision":0,"scale":0,"tableName":"","catalogName":"","type":{"type":"scalar","id":91,"name":"DATE","rep":"INTEGER"},"readOnly":true,"writable":false,"definitelyWritable":false,"columnClassName":"java.sql.Date"}],"sql":"select
now()","parameters":[],"cursorFactory":{"style":"LIST","clazz":null,"fieldNames":null}}}}
request:{"request":"fetch","connectionId":"5f84ee29-82ce-42d5-ffe0-3ed2f35f95F5","statementId":205173038,"parameterValues":[],"offset":0,"fetchMaxRowCount":100}
{"response":"fetch","frame":{"offset":0,"done":true,"rows":[[*{color:red}-622191233{color}*]]}}
The returned row and column name are constant between calls.
> Bad return value from now() and current_date()
> ----------------------------------------------
>
> Key: PHOENIX-2258
> URL: https://issues.apache.org/jira/browse/PHOENIX-2258
> Project: Phoenix
> Issue Type: Bug
> Affects Versions: 4.5.0
> Reporter: Kevin Liew
> Labels: queries, query
>
> When using Avatica to request sql:
> {noformat}select now(){noformat}
> The results are returned as one column, one row as expected
> {noformat}"DATE '292278994-08-17 07:12:55.807'"
> 2404-04-06{noformat}
> However, the column name and row value are always incorrect (and the values
> never change).
> These functions do work when we select from a table.
> ie. this works as expected: {noformat}select now() from test{noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)