NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
What about comparing Parse Trees?? (Score:1)
Functional equivalence could probably be determined by parsing the different SQL then analyzing the two parsed structures using various heuristics.
I use a similar technigue with Test::PDF [cpan.org] to do a basic test for "visual" similarity, by using Test::Deep to compare the data-structures CAM::PDF produces after it parses the PDF file.
Just a thought :)
- Stevan
Re:What about comparing Parse Trees?? (Score:2)
Maybe one of the deep-structure equivalence testing methods could be called after parsing both with SQL::Statement.
J. David works really hard, has a passion for writing good software, and knows many of the world's best Perl programmers
Re:What about comparing Parse Trees?? (Score:2)
SQL::Statement won't work for me due to the sheer complexity of much of our autogenerated SQL. For example, it won't handle case statements. There are a number of other constructs it won't handle, so while I'd like to have a specific parser for this problem domain, I would like a more general solution for where parsers are not available.
Reply to This
Parent