NGA-TRAN opened a new issue, #4426:
URL: https://github.com/apache/arrow-datafusion/issues/4426

   **Is your feature request related to a problem or challenge? Please describe 
what you are trying to do.**
   In order to support [Prepare 
statement](https://en.wikipedia.org/wiki/Prepared_statement) I am thinking 
about adding 2 new functions. This is is preliminary thinking. I you have some 
idea please advice.
   
   ### Function 1: Compile a SQL with question marks/parameters
   
   - Input: a SQL with question marks
   - Output:
        -  Logical plan that understands question marks/parameter (not sure how 
yet)
        - List of data type of the parameters of the question marks
   
   Example:
   - Input: 
        ```SQL
        SELECT  a, b FROM t WHERE x > ? and Y = ?;
        ```
   - Output:
        - Logical plan that understands question marks/parameter 
        - [ i64, String ]  where i64 and String are data types of X and Y 
respectively
   
   ### Function 2: Run the compiled SQL with provided values of the parameters
   
   - Input:
        - Logical plan that understands question marks/parameter
        - List of values of the corresponding question marks
   - Output 
        -  Physical plan of the logical plan with all question marks replaced 
with the corresponding values in the list
     
   Same example above
   
   - Input 
        - Logical plan that understands question marks/parameter generated for 
SQL above
        - [ 7, "Boston" ]
   - Output:
        -  Psychical plan of  `SELECT  a, b FROM t WHERE x > 7 and Y = "Boston"`
   
   
   **Describe the solution you'd like**
   TBD
   
   **Describe alternatives you've considered**
   TBD
   
   **Additional context**
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to