...
Protocol changes: if server side client request handler detects that PA feature supported it need to prepare PA structure (if possible) and send it back to the client.
Client protocol changes:
- New feature flag SQL_PARTITION_AWARENESS
Let`s consider the scope of use cases this improvement can be applied to:
...
| Code Block |
|---|
| language | sql |
|---|
| title | All cases where calculations for colocation keys are requires additional data demand |
|---|
|
SELECT * FROM T WHERE col1 = ? AND col2 = (SELECT MIN(a) FROM T2); |
| Code Block |
|---|
| language | sql |
|---|
| title | Insertion with explicit casts: |
|---|
|
INSERT INTO T (id, col2) VALUES(0, '100'::INTEGER); |
| Code Block |
|---|
| language | sql |
|---|
| title | Forms of INSERT INTO SELECT where condition is not covers all colocation columns |
|---|
|
INSERT INTO T SELECT * FROM T2 WHERE condition; |
- All forms of SELECT\DELETE\UPDATE\MERGE statements with IN, ANY, ALL, OR, Inner sub-queries, functions calls, functional defaults related to colocation keys.
- Multi-statement and explicit transaction statements also need to bypass partition awareness and fall back into default implementation.
- Probably no need to calculate partition aware information for Insert queries with pure literals defined for colocation columns.
Risks and Assumptions
...
- .
...
// Links to discussions on the devlist, if applicable.
Reference Links
[1] IEP-95: Client Partition Awareness
...
| Jira |
|---|
| server | ASF JIRA |
|---|
| columnIds | issuekey,summary,issuetype,created,updated,duedate,assignee,reporter,priority,status,resolution |
|---|
| columns | key,summary,type,created,updated,due,assignee,reporter,priority,status,resolution |
|---|
| maximumIssues | 20 |
|---|
| jqlQuery | "Epic Link"="SQL and JDBC partition awareness" |
|---|
| serverId | 5aa69414-a9e9-3523-82ec-879b028fb15b |
|---|
|
// Links or report with relevant JIRA tickets.