-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
In order to support Prepare statement I am thinking about adding 2 new functions. This is is preliminary thinking. If 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:
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:
- Phychical plan of
SELECT a, b FROM t WHERE x > 7 and Y = "Boston"
- Phychical plan of
Describe the solution you'd like
TBD
Describe alternatives you've considered
TBD
Additional context
metesynnada
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request