On Tue, May 11, 2010 at 9:25 PM, Mark Wheeler <[email protected]> wrote: > Pipes has a WILDCARD stage, and a LOOKUP stage. Has anyone written a > "wildcard lookup" stage, where the keys in the master records are able to > contain wildcard characters like "*" and "%"? >
I assume you're talking about a scheme where the master keys have wildcards? The first problem it causes is that it is potentially ambigious which key matches a detail record. When you're forced to write a cascade of wildcard stages, you're forced to do something about that yourself. The FLOOR option already helps to match only the first part of the detail record (I used that for dataset name matching). The joy of lookup is that searching the table is much quicker that sequential probing. With wildcards you're mostly forced to sequential tests, so you might as well generate the cascade of selection stage. If you group the master keys in some smart way, you may be able to reduce the number of tests to make. Rob
