Alter table inherit does not work with round robin partitioned tables
Hi,
I'm working with GridSQL 2.0 - haven't been able to move my project to Stado yet -
We are using the "alter table <tablename> inherit <parent table>" syntax to add a child table to a parent. This works fine when the table is "partitioned" (or distributed across nodes) using a specific column.
However, this does not work if I specify the "ROUND ROBIN on ALL" clause to distribute the table across nodes.
Sample SQL code:
{code}
GridSQL -> create table p1 (f1 int, f2 varchar(10)) round robin on all;
OK
GridSQL -> create table p2 (f1 int, f2 varchar(10)) round robin on all;
OK
GridSQL -> alter table p2 inherit p1;
SQLException: ERROR: Can not prepare request: Partitioning of table p2 differs from p1
{code}
I see where this is happening in the source code - in SqlAlterInherit
{code}
if (!parentTable.
}
{code}
The equals() method on RobinPartitionMap returns false unconditionally and so this valdiation fails and the "alter table inherit" does not go through. The two tables in the example above are distributed in round robin fashion on both nodes in my test database.
Is there any specific / inherent reason that GridSQL cannot support the "alter table inherit" when the parent and child tables are "round robin on all"? Or is this just an unnecessary (possibly over-restrictive validation) ?
Thanks in advance for your reply,
Ranga
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Stado Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Ranga Gopalan
- Solved:
- Last query:
- Last reply: