[jira] [Updated] (DRILL-5476) Calculate return type precision value for substring functions (substring, substr, left, right, trim)

2017-10-09 Thread Arina Ielchiieva (JIRA)

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

Arina Ielchiieva updated DRILL-5476:

Summary: Calculate return type precision value for substring functions 
(substring, substr, left, right, trim)   (was: Calculate return type precision 
value for substring functions (substring, substr, left, right) )

> Calculate return type precision value for substring functions (substring, 
> substr, left, right, trim) 
> -
>
> Key: DRILL-5476
> URL: https://issues.apache.org/jira/browse/DRILL-5476
> Project: Apache Drill
>  Issue Type: Improvement
>Affects Versions: 1.10.0
>Reporter: Arina Ielchiieva
>Priority: Minor
>
> Currently when applying substring / substr / left / right / trim functions 
> Drill doesn't calculate return length. Since we know calculation rules for 
> these functions, we can predict return length.
> For example:
> substring(cast(col as varchar(10), 1, 5) -> varchar(5)
> substring(cast(col as varchar(10), 5) -> varchar(5)
> Similar changes has been done in DRILL-5419 for other string functions.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (DRILL-5476) Calculate return type precision value for substring functions (substring, substr, left, right, trim)

2017-10-09 Thread Arina Ielchiieva (JIRA)

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

Arina Ielchiieva updated DRILL-5476:

Description: 
Currently when applying substring / substr / left / right / trim functions 
Drill doesn't calculate return length. Since we know calculation rules for 
these functions, we can predict return length.
For example:
substring(cast(col as varchar(10), 1, 5) -> varchar(5)
substring(cast(col as varchar(10), 5) -> varchar(5)

Similar changes has been done in DRILL-5419 for other string functions.

Note: should return the same value for regular queries and limit 0 queries 
(when limit 0 optimization is enabled).

  was:
Currently when applying substring / substr / left / right / trim functions 
Drill doesn't calculate return length. Since we know calculation rules for 
these functions, we can predict return length.
For example:
substring(cast(col as varchar(10), 1, 5) -> varchar(5)
substring(cast(col as varchar(10), 5) -> varchar(5)

Similar changes has been done in DRILL-5419 for other string functions.


> Calculate return type precision value for substring functions (substring, 
> substr, left, right, trim) 
> -
>
> Key: DRILL-5476
> URL: https://issues.apache.org/jira/browse/DRILL-5476
> Project: Apache Drill
>  Issue Type: Improvement
>Affects Versions: 1.10.0
>Reporter: Arina Ielchiieva
>Priority: Minor
>
> Currently when applying substring / substr / left / right / trim functions 
> Drill doesn't calculate return length. Since we know calculation rules for 
> these functions, we can predict return length.
> For example:
> substring(cast(col as varchar(10), 1, 5) -> varchar(5)
> substring(cast(col as varchar(10), 5) -> varchar(5)
> Similar changes has been done in DRILL-5419 for other string functions.
> Note: should return the same value for regular queries and limit 0 queries 
> (when limit 0 optimization is enabled).



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)