beam
beam copied to clipboard
Call to `finalSolution` hangs
In my case, verifySchema returned VerificationFailed with one predicate:
(TableHasPrimaryKey: Table QualifiedName Nothing "transactions" has primary key ["requestkey","block"])
The change I made was to add the block field to the primary key for the table.
When I print all the PotentialActions in the ChooseActions value returned by heuristicSolver, I get a bunch of the following action types:
- Drop column
- Add not null constraint
- Drop not null constraint
So perhaps it is hanging because there are no actions being considered that can possibly satisfy the predicate that is needed.
The reason this hangs is because beam-migrate currently implements a graph search algorithm. It currently retraverses paths that are the same, but due to the way the traversal is structured and how dynamic it is, it's difficult to express that duplication in the current system.
The truth is the system is not 'hanging' per se. The algorithm will absolutely converge or report a negative result, because the recursion is strictly structural. But I think it's O(2^n). This is an example where theory and practice simply do not meet however.