[jira] [Commented] (CALCITE-3241) Calcite this is a very strange mistake

2019-08-22 Thread xzh_dz (Jira)


[ 
https://issues.apache.org/jira/browse/CALCITE-3241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16913068#comment-16913068
 ] 

xzh_dz commented on CALCITE-3241:
-

Maybe you can provide  a test case.

> Calcite this is a very strange mistake
> --
>
> Key: CALCITE-3241
> URL: https://issues.apache.org/jira/browse/CALCITE-3241
> Project: Calcite
>  Issue Type: Bug
>Reporter: ;ianghaibin
>Priority: Major
>
> 0: jdbc:calcite:model=/root/calcite/apache-ca> select sum("xxx") as a from 
> "xxx";
> java.lang.NumberFormatException: For input string: "13485468068"
> at 
> ru.yandex.clickhouse.response.ByteFragmentUtils.parseInt(ByteFragmentUtils.java:61)
> at 
> ru.yandex.clickhouse.response.ClickHouseResultSet.getInt(ClickHouseResultSet.java:342)
> at 
> org.apache.commons.dbcp2.DelegatingResultSet.getInt(DelegatingResultSet.java:623)
> at 
> org.apache.commons.dbcp2.DelegatingResultSet.getInt(DelegatingResultSet.java:623)
> at Baz$1$1.apply(Unknown Source)
> at 
> org.apache.calcite.runtime.ResultSetEnumerable$ResultSetEnumerator.current(ResultSetEnumerable.java:365)
> at org.apache.calcite.linq4j.Linq4j$EnumeratorIterator.next(Linq4j.java:683)
> at org.apache.calcite.avatica.util.IteratorCursor.next(IteratorCursor.java:46)
> at org.apache.calcite.avatica.AvaticaResultSet.next(AvaticaResultSet.java:217)
> at sqlline.BufferedRows.nextList(BufferedRows.java:110)
> at sqlline.BufferedRows.(BufferedRows.java:52)
> at sqlline.SqlLine.print(SqlLine.java:1640)
> at sqlline.Commands.executeSingleQuery(Commands.java:1017)
> at sqlline.Commands.execute(Commands.java:957)
> at sqlline.Commands.sql(Commands.java:921)
> at sqlline.SqlLine.dispatch(SqlLine.java:717)
> at sqlline.SqlLine.begin(SqlLine.java:536)
> at sqlline.SqlLine.start(SqlLine.java:266)
> at sqlline.SqlLine.main(SqlLine.java:205)
> The data I got is integer, and I am getting an error.
> However, this is not an error.
> select "xx","xx",sum("xx") as xx from "xx" group by "xx","xxx" limit 1;



--
This message was sent by Atlassian Jira
(v8.3.2#803003)


[jira] [Commented] (CALCITE-3241) Calcite this is a very strange mistake

2019-08-14 Thread Danny Chan (JIRA)


[ 
https://issues.apache.org/jira/browse/CALCITE-3241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16907044#comment-16907044
 ] 

Danny Chan commented on CALCITE-3241:
-

[~1693294577] Thanks, can you summarize and make an abstract the issue about 
the error, or even better, can you give a test case in Calcite to reproduce 
this problem ? It would helps a lot for the contributors who has willingness on 
this issue.

> Calcite this is a very strange mistake
> --
>
> Key: CALCITE-3241
> URL: https://issues.apache.org/jira/browse/CALCITE-3241
> Project: Calcite
>  Issue Type: Bug
>Reporter: ;ianghaibin
>Priority: Major
>
> 0: jdbc:calcite:model=/root/calcite/apache-ca> select sum("xxx") as a from 
> "xxx";
> java.lang.NumberFormatException: For input string: "13485468068"
> at 
> ru.yandex.clickhouse.response.ByteFragmentUtils.parseInt(ByteFragmentUtils.java:61)
> at 
> ru.yandex.clickhouse.response.ClickHouseResultSet.getInt(ClickHouseResultSet.java:342)
> at 
> org.apache.commons.dbcp2.DelegatingResultSet.getInt(DelegatingResultSet.java:623)
> at 
> org.apache.commons.dbcp2.DelegatingResultSet.getInt(DelegatingResultSet.java:623)
> at Baz$1$1.apply(Unknown Source)
> at 
> org.apache.calcite.runtime.ResultSetEnumerable$ResultSetEnumerator.current(ResultSetEnumerable.java:365)
> at org.apache.calcite.linq4j.Linq4j$EnumeratorIterator.next(Linq4j.java:683)
> at org.apache.calcite.avatica.util.IteratorCursor.next(IteratorCursor.java:46)
> at org.apache.calcite.avatica.AvaticaResultSet.next(AvaticaResultSet.java:217)
> at sqlline.BufferedRows.nextList(BufferedRows.java:110)
> at sqlline.BufferedRows.(BufferedRows.java:52)
> at sqlline.SqlLine.print(SqlLine.java:1640)
> at sqlline.Commands.executeSingleQuery(Commands.java:1017)
> at sqlline.Commands.execute(Commands.java:957)
> at sqlline.Commands.sql(Commands.java:921)
> at sqlline.SqlLine.dispatch(SqlLine.java:717)
> at sqlline.SqlLine.begin(SqlLine.java:536)
> at sqlline.SqlLine.start(SqlLine.java:266)
> at sqlline.SqlLine.main(SqlLine.java:205)
> The data I got is integer, and I am getting an error.
> However, this is not an error.
> select "xx","xx",sum("xx") as xx from "xx" group by "xx","xxx" limit 1;



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Commented] (CALCITE-3241) Calcite this is a very strange mistake

2019-08-13 Thread ;ianghaibin (JIRA)


[ 
https://issues.apache.org/jira/browse/CALCITE-3241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16906120#comment-16906120
 ] 

;ianghaibin commented on CALCITE-3241:
--

OK ,

 
 
  
Just table structure   is  INTEGER 
1: jdbc:calcite:model=/root/calcite/apache-ca> !describe "liucun"
+---+-++-+---+-+-+---+++--+-+-+
| TABLE_CAT | TABLE_SCHEM | TABLE_NAME | COLUMN_NAME | DATA_TYPE | TYPE_NAME | 
COLUMN_SIZE | BUFFER_LENGTH | DECIMAL_DIGITS | NUM_PREC_RADIX | NULLABLE | 
REMARKS | COLUMN_DEF |
+---+-++-+---+-+-+---+++--+-+-+

| | click | liucun | xx | 4 | INTEGER NOT NULL | -1 | null | null | 10 | 0 | | |
| | click | liucun | days| 4 | INTEGER NOT NULL | -1 | null | null | 10 | 0 | | 
|
+---+-++-+---+-+-+---+++--+-+-

 

This is the song error recurrence

 

1: jdbc:calcite:model=/root/calcite/apache-ca> select "xx",sum("days") from 
"liucun" group by "xx" limit 2;
+---++
|xx | EXPR$1 |
+---++
| 00016G442 | 452 |
| 00016Z551 | 478 |
+---++
2 rows selected (1.032 seconds)
1: jdbc:calcite:model=/root/calcite/apache-ca> select sum("days") from "liucun";
java.lang.NumberFormatException: For input string: "13485468068"
 at 
ru.yandex.clickhouse.response.ByteFragmentUtils.parseInt(ByteFragmentUtils.java:61)
 at 
ru.yandex.clickhouse.response.ClickHouseResultSet.getInt(ClickHouseResultSet.java:342)
 at 
org.apache.commons.dbcp2.DelegatingResultSet.getInt(DelegatingResultSet.java:623)
 at 
org.apache.commons.dbcp2.DelegatingResultSet.getInt(DelegatingResultSet.java:623)
 at Baz$1$1.apply(Unknown Source)
 at 
org.apache.calcite.runtime.ResultSetEnumerable$ResultSetEnumerator.current(ResultSetEnumerable.java:365)
 at org.apache.calcite.linq4j.Linq4j$EnumeratorIterator.next(Linq4j.java:683)
 at org.apache.calcite.avatica.util.IteratorCursor.next(IteratorCursor.java:46)
 at org.apache.calcite.avatica.AvaticaResultSet.next(AvaticaResultSet.java:217)
 at sqlline.BufferedRows.nextList(BufferedRows.java:110)
 at sqlline.BufferedRows.(BufferedRows.java:52)
 at sqlline.SqlLine.print(SqlLine.java:1640)
 at sqlline.Commands.executeSingleQuery(Commands.java:1017)
 at sqlline.Commands.execute(Commands.java:957)
 at sqlline.Commands.sql(Commands.java:921)
 at sqlline.SqlLine.dispatch(SqlLine.java:717)
 at sqlline.SqlLine.begin(SqlLine.java:536)
 at sqlline.SqlLine.start(SqlLine.java:266)
 at sqlline.SqlLine.main(SqlLine.java:205)
1: jdbc:calcite:model=/root/calcite/apache-ca>

 

Of course, this error does not occur in other integer fields in a table.

 

| | click | liucun | str_id | 12 | VARCHAR(0) NOT NULL | 0 | null | null | 10 | 
0 | | |
| | click | liucun | map_act_id | 4 | INTEGER NOT NULL | -1 | null | null | 10 
| 0 | | |
| | click | liucun | days | 4 | INTEGER NOT NULL | -1 | null | null | 10 | 0 | 
| |
+---+-++-+---+-+-+---+++--+-+-+
1: jdbc:calcite:model=/root/calcite/apache-ca> select sum("map_act_id") from 
"liucun";
+---+
| EXPR$0 |
+---+
| 956366751 |
+---+
1 row selected (0.363 seconds)
1: jdbc:calcite:model=/root/calcite/apache-ca> select sum("days") from "liucun";
java.lang.NumberFormatException: For input string: "13485468068"
 at 
ru.yandex.clickhouse.response.ByteFragmentUtils.parseInt(ByteFragmentUtils.java:61)
 at 
ru.yandex.clickhouse.response.ClickHouseResultSet.getInt(ClickHouseResultSet.java:342)
 at 
org.apache.commons.dbcp2.DelegatingResultSet.getInt(DelegatingResultSet.java:623)
 at 
org.apache.commons.dbcp2.DelegatingResultSet.getInt(DelegatingResultSet.java:623)
 at Baz$1$1.apply(Unknown Source)
 at 
org.apache.calcite.runtime.ResultSetEnumerable$ResultSetEnumerator.current(ResultSetEnumerable.java:365)
 at org.apache.calcite.linq4j.Linq4j$EnumeratorIterator.next(Linq4j.java:683)
 at org.apache.calcite.avatica.util.IteratorCursor.next(IteratorCursor.java:46)
 at org.apache.calcite.avatica.AvaticaResultSet.next(AvaticaResultSet.java:217)
 at sqlline.BufferedRows.nextList(BufferedRows.java:110)
 at sqlline.BufferedRows.(BufferedRows.java:52)
 at sqlline.SqlLine.print(SqlLine.java:1640)
 at sqlline.Commands.executeSingleQuery(Commands.java:1017)
 at sqlline.Commands.execute(Commands.java:957)
 at sqlline.Commands.sql(Commands.java:921)
 at sqlline.SqlLine.dispatch(SqlLine.java:717)
 at sqlline.SqlLine.begin(SqlLine.java:536)
 at 

[jira] [Commented] (CALCITE-3241) Calcite this is a very strange mistake

2019-08-12 Thread Julian Hyde (JIRA)


[ 
https://issues.apache.org/jira/browse/CALCITE-3241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16905500#comment-16905500
 ] 

Julian Hyde commented on CALCITE-3241:
--

[~1693294577], You need to make a much clearer case that this is a bug in 
Calcite, as opposed to some other project. I see a lot of other projects' code 
on the stack. Also, you need to be more precise what you think Calcite is doing 
wrong and what the correct behavior should be. Otherwise you are wasting our 
time asking us to investigate this.

> Calcite this is a very strange mistake
> --
>
> Key: CALCITE-3241
> URL: https://issues.apache.org/jira/browse/CALCITE-3241
> Project: Calcite
>  Issue Type: Bug
>Reporter: ;ianghaibin
>Priority: Major
>
> 0: jdbc:calcite:model=/root/calcite/apache-ca> select sum("xxx") as a from 
> "xxx";
> java.lang.NumberFormatException: For input string: "13485468068"
> at 
> ru.yandex.clickhouse.response.ByteFragmentUtils.parseInt(ByteFragmentUtils.java:61)
> at 
> ru.yandex.clickhouse.response.ClickHouseResultSet.getInt(ClickHouseResultSet.java:342)
> at 
> org.apache.commons.dbcp2.DelegatingResultSet.getInt(DelegatingResultSet.java:623)
> at 
> org.apache.commons.dbcp2.DelegatingResultSet.getInt(DelegatingResultSet.java:623)
> at Baz$1$1.apply(Unknown Source)
> at 
> org.apache.calcite.runtime.ResultSetEnumerable$ResultSetEnumerator.current(ResultSetEnumerable.java:365)
> at org.apache.calcite.linq4j.Linq4j$EnumeratorIterator.next(Linq4j.java:683)
> at org.apache.calcite.avatica.util.IteratorCursor.next(IteratorCursor.java:46)
> at org.apache.calcite.avatica.AvaticaResultSet.next(AvaticaResultSet.java:217)
> at sqlline.BufferedRows.nextList(BufferedRows.java:110)
> at sqlline.BufferedRows.(BufferedRows.java:52)
> at sqlline.SqlLine.print(SqlLine.java:1640)
> at sqlline.Commands.executeSingleQuery(Commands.java:1017)
> at sqlline.Commands.execute(Commands.java:957)
> at sqlline.Commands.sql(Commands.java:921)
> at sqlline.SqlLine.dispatch(SqlLine.java:717)
> at sqlline.SqlLine.begin(SqlLine.java:536)
> at sqlline.SqlLine.start(SqlLine.java:266)
> at sqlline.SqlLine.main(SqlLine.java:205)
> The data I got is integer, and I am getting an error.
> However, this is not an error.
> select "xx","xx",sum("xx") as xx from "xx" group by "xx","xxx" limit 1;



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Commented] (CALCITE-3241) Calcite this is a very strange mistake

2019-08-12 Thread Chris Baynes (JIRA)


[ 
https://issues.apache.org/jira/browse/CALCITE-3241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16905076#comment-16905076
 ] 

Chris Baynes commented on CALCITE-3241:
---

It looks like you are trying to sum a column that has a String type in 
Clickhouse. If that's the case, then this isn't going to work.

What are the column types you're interacting with here?

> Calcite this is a very strange mistake
> --
>
> Key: CALCITE-3241
> URL: https://issues.apache.org/jira/browse/CALCITE-3241
> Project: Calcite
>  Issue Type: Bug
>Reporter: ;ianghaibin
>Priority: Major
>
> 0: jdbc:calcite:model=/root/calcite/apache-ca> select sum("xxx") as a from 
> "xxx";
> java.lang.NumberFormatException: For input string: "13485468068"
> at 
> ru.yandex.clickhouse.response.ByteFragmentUtils.parseInt(ByteFragmentUtils.java:61)
> at 
> ru.yandex.clickhouse.response.ClickHouseResultSet.getInt(ClickHouseResultSet.java:342)
> at 
> org.apache.commons.dbcp2.DelegatingResultSet.getInt(DelegatingResultSet.java:623)
> at 
> org.apache.commons.dbcp2.DelegatingResultSet.getInt(DelegatingResultSet.java:623)
> at Baz$1$1.apply(Unknown Source)
> at 
> org.apache.calcite.runtime.ResultSetEnumerable$ResultSetEnumerator.current(ResultSetEnumerable.java:365)
> at org.apache.calcite.linq4j.Linq4j$EnumeratorIterator.next(Linq4j.java:683)
> at org.apache.calcite.avatica.util.IteratorCursor.next(IteratorCursor.java:46)
> at org.apache.calcite.avatica.AvaticaResultSet.next(AvaticaResultSet.java:217)
> at sqlline.BufferedRows.nextList(BufferedRows.java:110)
> at sqlline.BufferedRows.(BufferedRows.java:52)
> at sqlline.SqlLine.print(SqlLine.java:1640)
> at sqlline.Commands.executeSingleQuery(Commands.java:1017)
> at sqlline.Commands.execute(Commands.java:957)
> at sqlline.Commands.sql(Commands.java:921)
> at sqlline.SqlLine.dispatch(SqlLine.java:717)
> at sqlline.SqlLine.begin(SqlLine.java:536)
> at sqlline.SqlLine.start(SqlLine.java:266)
> at sqlline.SqlLine.main(SqlLine.java:205)
> The data I got is integer, and I am getting an error.
> However, this is not an error.
> select "xx","xx",sum("xx") as xx from "xx" group by "xx","xxx" limit 1;



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)