hadoop-hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Namit Jain (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HIVE-655) Add support for user defined table generating functions
Date Tue, 17 Nov 2009 22:06:39 GMT

    [ https://issues.apache.org/jira/browse/HIVE-655?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12779169#action_12779169
] 

Namit Jain commented on HIVE-655:
---------------------------------

 /** 	
				121 		* forwardUDTFOutput is typically called indirectly by the GenericUDTF when 	
				122 		* the GenericUDTF has generated output data that should be passed on to the 	
				123 		* next operator in the DAG. 	
				124 		* 	
				125 		* @param o 	
				126 		* @throws HiveException 	
				127 		*/ 	
				128 		public void forwardUDTFOutput(Object o) throws HiveException { 	
				129 		// Now that we have the data for the UDTF, repack the row by including 	
				130 		// the columns not used by the UDTF. 	
				131 		StandardStructObjectInspector soi = 	
				132 		(StandardStructObjectInspector) inputObjInspectors[previousTag]; 	
				133 		List<Object> newRow = new ArrayList<Object>(); 	
				134 		List<? extends StructField> fields = soi.getAllStructFieldRefs(); 	
				135 		boolean insertedUDTFCol = false; 	
				136 			
				137 		for(StructField sf : fields) { 	
				138 		if(udtfInputColNamesSet.contains(sf.getFieldName())) { 	
				139 		if(!insertedUDTFCol) { 	
				140 		newRow.add(o); 	
				141 		insertedUDTFCol = true; 	
				142 		} 	
				143 		} else { 	
				144 		newRow.add(soi.getStructFieldData(previousRow, sf)); 	
				145 		} 	
				146 		} 	
				147 		forward(newRow, outputObjInspector); 	
				148 		} 	
				149 		


Are we planning to support:

select udtf(..) as (a,b)...
select udtf(..) as (a int,b int)...

If not, why do you need previousTag etc.



> Add support for user defined table generating functions
> -------------------------------------------------------
>
>                 Key: HIVE-655
>                 URL: https://issues.apache.org/jira/browse/HIVE-655
>             Project: Hadoop Hive
>          Issue Type: New Feature
>          Components: Query Processor
>            Reporter: Raghotham Murthy
>            Assignee: Paul Yang
>         Attachments: HIVE-655.1.patch, HIVE-655.2.patch, HIVE-655.3.patch
>
>
> Provide a way for users to add a table generating function, i.e., functions that generate
multiple rows from a single input row. Currently, the only way to do it is via the TRANSFORM
clause which requires streaming the data.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message