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

Edward Capriolo commented on HIVE-645:
--------------------------------------

Raghotham,

This does not require limit 1. My test case just uses limit 1 to specify static 
data. As is the case with the second query the number of rows selected is 
returned. You could add another level of sub queries to count up the number of 
0's returned.

So this:
{noformat}
SELECT
dboutput('jdbc:derby:../build/test_dboutput_db','','',
'INSERT INTO app_info (kkey,vvalue) VALUES (?,?)',key,value)
{noformat}

Becomes something like this: (bad syntax but you get the idea)
{noformat}
from (
SELECT
dboutput('jdbc:derby:../build/test_dboutput_db','','',
'INSERT INTO app_info (kkey,vvalue) VALUES (?,?)',key,value) as x
) sum (x) where x=0
{noformat}

On a side note, I always try to release some patches along the way so people 
know what I am up to and for suggestions. I spent a lot of time with HIVE-487 
reflection and then we went with the shims. It is a lot of throw away work if I 
switch from UDF to UDAF at this point since I am pretty much at the phase where 
I am crossing i's and dotting t's.

> A UDF that can export data to JDBC databases.
> ---------------------------------------------
>
>                 Key: HIVE-645
>                 URL: https://issues.apache.org/jira/browse/HIVE-645
>             Project: Hadoop Hive
>          Issue Type: New Feature
>          Components: Contrib
>            Reporter: Edward Capriolo
>            Assignee: Edward Capriolo
>            Priority: Minor
>         Attachments: hive-645-2.patch, hive-645-3.patch, hive-645-4.patch, 
> hive-645-5.patch, hive-645.patch
>
>
> A UDF that can export data to JDBC databases.

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

Reply via email to