[jira] [Commented] (HIVE-1955) Support non-constant expressions for array indexes.

2012-12-12 Thread Navis (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-1955?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13530678#comment-13530678
 ] 

Navis commented on HIVE-1955:
-

Is there any reason index value should be constant?

 Support non-constant expressions for array indexes.
 ---

 Key: HIVE-1955
 URL: https://issues.apache.org/jira/browse/HIVE-1955
 Project: Hive
  Issue Type: Improvement
Reporter: Adam Kramer

 FAILED: Error in semantic analysis: line 4:8 Non Constant Expressions for 
 Array Indexes not Supported dut
 ...just wrote my own UDF to do this, and it is trivial. We should support 
 this natively.
 Let foo have these rows:
 arr   i
 [1,2,3]   1
 [3,4,5]   2
 [5,4,3]   2
 [0,0,1]   0
 Then,
 SELECT arr[i] FROM foo
 should return:
 2
 5
 3
 1
 Similarly, for the same table,
 SELECT 3 IN arr FROM foo
 should return:
 true
 true
 true
 false
 ...these use cases are needless limitations of functionality. We shouldn't 
 need UDFs to accomplish these goals.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] Commented: (HIVE-1955) Support non-constant expressions for array indexes.

2011-02-07 Thread Adam Kramer (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-1955?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12991708#comment-12991708
 ] 

Adam Kramer commented on HIVE-1955:
---

Also, IN should operate on non-constant arrays.

 Support non-constant expressions for array indexes.
 ---

 Key: HIVE-1955
 URL: https://issues.apache.org/jira/browse/HIVE-1955
 Project: Hive
  Issue Type: Improvement
Reporter: Adam Kramer

 FAILED: Error in semantic analysis: line 4:8 Non Constant Expressions for 
 Array Indexes not Supported dut
 ...just wrote my own UDF to do this, and it is trivial. We should support 
 this natively.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira