[
https://issues.apache.org/jira/browse/SPARK-20965?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Hyukjin Kwon updated SPARK-20965:
---------------------------------
Labels: bulk-closed (was: )
> Support PREPARE/EXECUTE/DECLARE/FETCH statements
> ------------------------------------------------
>
> Key: SPARK-20965
> URL: https://issues.apache.org/jira/browse/SPARK-20965
> Project: Spark
> Issue Type: Improvement
> Components: SQL
> Affects Versions: 2.1.1
> Reporter: Takeshi Yamamuro
> Priority: Minor
> Labels: bulk-closed
>
> It might help to implement PREPARE/EXECUTE/DECLARE/FETCH statements by
> referring the ANSI/SQL standard.
> An example query in PostgreSQL (MySQL also support these statements) is as
> follows;
> {code}
> // Prepared statement
> PREPARE pstmt(int) AS SELECT * FROM t WEHERE id = $1;
> EXECUTE pstmt(1);
> DEALLOCATE pstmt;
> // Cursor
> DECLARE cursor CURSOR FOR SELECT * FROM t;
> FETCH 1 FROM cursor;
> CLOSE cursor;
> {code}
> I probably think one of ideas to implement these statements is to put
> register implementations
> in `SessionState` to hold prepared statements and open cursors like;
> prototype:
> https://github.com/apache/spark/compare/master...maropu:SPARK-20965#diff-06e7b9d9e1afd7aca1a3b2cd18561953R63
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]