[
https://issues.apache.org/jira/browse/HIVE-26294?focusedWorklogId=794992&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-794992
]
ASF GitHub Bot logged work on HIVE-26294:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 25/Jul/22 17:26
Start Date: 25/Jul/22 17:26
Worklog Time Spent: 10m
Work Description: scarlin-cloudera commented on code in PR #3433:
URL: https://github.com/apache/hive/pull/3433#discussion_r929128673
##########
ql/src/test/queries/clientpositive/udf_substr.q:
##########
@@ -76,3 +76,8 @@ SELECT
substr("abc 玩玩玩 abc", 5),
substr("abc 玩玩玩 abc", 5, 3)
FROM src tablesample (1 rows);
+
+SELECT
+ substr('ABC', cast(1 as bigint), cast(0 as bigint)),
+ substr('ABC', cast(4 as bigint))
+FROM src tablesample (1 rows);
Review Comment:
Added.
I'm not sure what is best. I wavered between returning NULL or using
MAX_INT. I ultimately decided to use NULL since we use that in other functions
when we can't return the correct value. What do you think?
Issue Time Tracking
-------------------
Worklog Id: (was: 794992)
Time Spent: 1h (was: 50m)
> Allow substr to take bigint as parameters
> -----------------------------------------
>
> Key: HIVE-26294
> URL: https://issues.apache.org/jira/browse/HIVE-26294
> Project: Hive
> Issue Type: Improvement
> Components: Types
> Reporter: Steve Carlin
> Priority: Minor
> Labels: pull-request-available
> Time Spent: 1h
> Remaining Estimate: 0h
>
> Small enhancement
> Impala allows a bigint as an argument for the substr function. We should
> allow Hive to allow bigint arguments too.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)