Forum: Building VoltDB Applications

Post: PartitionInfo specifies invalid column for procedure

PartitionInfo specifies invalid column for procedure
jeff_i
Aug 13, 2010
I am hoping to clear up my confusion. In the following stored proc, am tempted to do this (foo.Foo2: 1), since Foo2 is the second column - but the compiler complains "PartitionInfo specifies invalid column for procedure". The complaints go away if I say foo.Foo2: 0. Please explain.

Schema

Table foo
Foo1 VARCHAR(23) NOT NULL,
Foo2 VARCHAR(64) NOT NULL

Partitioning

Procedure
@ProcInfo(
partitionInfo = "foo.Foo2: 1",
singlePartition = true
)
public class SelectFoo extends VoltProcedure {
public final SQLStmt query = new SQLStmt("SELECT Foo1 from foo where Foo2 = ?");
forgot the partition info
jeff_i
Aug 13, 2010
forgot the partition info
partition table='foo' column='Foo2'
Hi Jeff, The partitioning
aweisberg
Aug 13, 2010
Hi Jeff,

The partitioning info in the procedure does not refer to the SQL statements the procedure contains. It refers to the arguments to the stored procedure's run method that are used to route the procedure to the correct partition. It specifies the partitioning column as table.column and index of the parameter in the run method's argument list. I suspect that the run method only takes one argument or that the second argument is not a string. The error could be clearer in that it talks about columns but not arguments to the procedure (either could be incorrect). I create an issue to address the error message. https://issues.voltdb.com/browse/ENG-702

-Ariel
Will be more clear in 1.2
jhugg
Sep 16, 2010
I've improved the language of these errors and added some additional checks for our 1.2 release coming up.