...
| 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
// Describe project risks, such as API or binary compatibility issues, major protocol changes, etc.
Discussion Links
...
Client Protocol Changes
- New feature flag SQL_PARTITION_AWARENESS
Reference Links
[1] IEP-95: Client Partition Awareness
...