[jira] [Commented] (CALCITE-3235) Add CONCAT function for Redshift

2019-09-26 Thread Julian Hyde (Jira)


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

Julian Hyde commented on CALCITE-3235:
--

Please post your question to the dev list. Adding questions to closed bugs 
confuses people. I saw you also logged a bug with the same question. This 
behavior is [cross-posting|https://en.wikipedia.org/wiki/Crossposting] and it 
is not helpful. The dev list is the right place for such questions.

> Add CONCAT function for Redshift
> 
>
> Key: CALCITE-3235
> URL: https://issues.apache.org/jira/browse/CALCITE-3235
> Project: Calcite
>  Issue Type: Improvement
>Reporter: Ryan Fu
>Assignee: Julian Hyde
>Priority: Minor
>  Labels: pull-request-available
> Fix For: 1.21.0
>
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> Get this error:
> {{No match found for function signature CONCAT(, , 
> ...)}}
> When using CONCAT, e.g.
> {{SELECT CONCAT('a', city) FROM public.aircraft}}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Closed] (CALCITE-3375) calcite concat function

2019-09-26 Thread Julian Hyde (Jira)


 [ 
https://issues.apache.org/jira/browse/CALCITE-3375?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Julian Hyde closed CALCITE-3375.

Resolution: Invalid

This seems to be more of a question than a bug. Closing. Please ask the 
question on the dev list. We will re-open if we discover that there is a bug 
(i.e. we know the desired behavior and the observed behavior is different).

> calcite concat function
> ---
>
> Key: CALCITE-3375
> URL: https://issues.apache.org/jira/browse/CALCITE-3375
> Project: Calcite
>  Issue Type: Bug
>  Components: core
>Affects Versions: 1.21.0
>Reporter: cui
>Priority: Major
>   Original Estimate: 96h
>  Remaining Estimate: 96h
>
> I use calcite to connect mysql to test, I have two column test data , 
> age(int) and name(varchar) and the table name is test.score_new, and I have 
> two row test data following:
> --
> idnameage
> --
> 1 飞   16
> --
> when I use the sql : select '飞'||16 or select '飞'||'16' , it will return the 
> right result : EXPR$0=飞16
> But when I use the sql : select "name"||"age" from "test"."score_new", it 
> will return the result : EXPR$0=1,
> and sql : select "sid"||"sid" from "test"."score_new", it will return : 
> EXPR$0=1,
> and sql : select "name"||"name" from "test"."score_new", it will return : 
> EXPR$0=0,
> the result is not what I want, I want to get the result : 飞16, why ? and How 
> to solve this problem



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (CALCITE-1581) UDTF like in hive

2019-09-26 Thread pengzhiwei (Jira)


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

pengzhiwei commented on CALCITE-1581:
-

Hi [~julianhyde], can you take a look at this pr again?  I hope we can finish 
it  at 1.22.0.

> UDTF like in hive
> -
>
> Key: CALCITE-1581
> URL: https://issues.apache.org/jira/browse/CALCITE-1581
> Project: Calcite
>  Issue Type: New Feature
>Reporter: Xiaoyong Deng
>Assignee: pengzhiwei
>Priority: Major
>  Labels: pull-request-available, udtf
> Fix For: 1.22.0
>
>  Time Spent: 8h 10m
>  Remaining Estimate: 0h
>
> Support one row in and multi-column/multi-row out(one-to-many mapping), just 
> like udtf in hive.
> The query would like this:
> {code}
> select
>   func(c0, c1) as (f0, f1, f2)
> from table_name;
> {code}
> c0 and c1 are 'table_name' columns. f0, f1 and f2 are new generated columns.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Closed] (CALCITE-3350) Keep origin type for RexLiteral when deserialized from json string

2019-09-26 Thread Wang Yanlin (Jira)


 [ 
https://issues.apache.org/jira/browse/CALCITE-3350?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Wang Yanlin closed CALCITE-3350.

Resolution: Not A Problem

> Keep origin type for RexLiteral when deserialized from json string
> --
>
> Key: CALCITE-3350
> URL: https://issues.apache.org/jira/browse/CALCITE-3350
> Project: Calcite
>  Issue Type: Bug
>Reporter: Wang Yanlin
>Priority: Minor
>  Labels: pull-request-available
>  Time Spent: 2h
>  Remaining Estimate: 0h
>
> The json string of sql
> {noformat}
> select ename from emp where job = "abd"
> {noformat}
> is
> {noformat}
> {
>   "rels": [
> {
>   "id": "0",
>   "relOp": "LogicalTableScan",
>   "table": [
> "scott",
> "EMP"
>   ],
>   "inputs": []
> },
> {
>   "id": "1",
>   "relOp": "LogicalFilter",
>   "condition": {
> "op": {
>   "name": "=",
>   "kind": "EQUALS",
>   "syntax": "BINARY"
> },
> "operands": [
>   {
> "input": 2,
> "name": "$2"
>   },
>   {
> "literal": "abd",
> "type": {
>   "type": "VARCHAR",
>   "nullable": false,
>   "precision": 10
> }
>   }
> ]
>   }
> },
> {
>   "id": "2",
>   "relOp": "LogicalProject",
>   "fields": [
> "ENAME"
>   ],
>   "exprs": [
> {
>   "input": 1,
>   "name": "$1"
> }
>   ]
> }
>   ]
> }
> {noformat}
> The original type of literal "abd" is
> {noformat}
> VARCHAR(10) NOT NULL
> {noformat}
> When deserialized relnode from this json string, the type of literal "abd" is 
> changed to
> {noformat}
> CHAR(3) NOT NULL
> {noformat}
> Better to keep the same with original type when deserialized from string.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (CALCITE-3375) calcite concat function

2019-09-26 Thread cui (Jira)
cui created CALCITE-3375:


 Summary: calcite concat function
 Key: CALCITE-3375
 URL: https://issues.apache.org/jira/browse/CALCITE-3375
 Project: Calcite
  Issue Type: Bug
  Components: core
Affects Versions: 1.21.0
Reporter: cui


I use calcite to connect mysql to test, I have two column test data , age(int) 
and name(varchar) and the table name is test.score_new, and I have two row test 
data following:
--

id  nameage
--

1   飞   16
--
when I use the sql : select '飞'||16 or select '飞'||'16' , it will return the 
right result : EXPR$0=飞16
But when I use the sql : select "name"||"age" from "test"."score_new", it will 
return the result : EXPR$0=1,
and sql : select "sid"||"sid" from "test"."score_new", it will return : 
EXPR$0=1,
and sql : select "name"||"name" from "test"."score_new", it will return : 
EXPR$0=0,
the result is not what I want, I want to get the result : 飞16, why ? and How to 
solve this problem



--
This message was sent by Atlassian Jira
(v8.3.4#803005)