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

Vineet Garg updated HIVE-23950:
-------------------------------
    Description: 
PREPARE and EXECUTE statements provide an ability to create a parameterized 
query and re-use it to execute with different parameters.

e.g.
{code:sql}
PREPARE pcount from 
    select count(*) from src where key > ?;
EXECUTE pcount using 200;

-- execute with different value
EXECUTE pcount using 101;


PREPARE pquery2 from 
   select count(*) from daysales where dt=? and customer=?;
EXECUTE pquery2 using '2001-01-01',1;
{code}

  was:
PREPARE and EXECUTE statements provide an ability to create a parameterized 
query and re-use it to execute with different parameters.

e.g.
{code:sql}
PREPARE pcount from 
    select count(*) from src where key > ?;
EXECUTE pcount using 200;


PREPARE pquery2 from 
   select count(*) from daysales where dt=? and customer=?;
EXECUTE pquery2 using '2001-01-01',1;
{code}


> [Umbrella] Support PREPARE and EXECUTE statements
> -------------------------------------------------
>
>                 Key: HIVE-23950
>                 URL: https://issues.apache.org/jira/browse/HIVE-23950
>             Project: Hive
>          Issue Type: New Feature
>          Components: Query Planning
>            Reporter: Vineet Garg
>            Assignee: Vineet Garg
>            Priority: Major
>
> PREPARE and EXECUTE statements provide an ability to create a parameterized 
> query and re-use it to execute with different parameters.
> e.g.
> {code:sql}
> PREPARE pcount from 
>     select count(*) from src where key > ?;
> EXECUTE pcount using 200;
> -- execute with different value
> EXECUTE pcount using 101;
> PREPARE pquery2 from 
>    select count(*) from daysales where dt=? and customer=?;
> EXECUTE pquery2 using '2001-01-01',1;
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to