+1 on Till's comments. Steven On Sunday, August 14, 2016, Till Westmann <[email protected]> wrote:
> Hi, > > generally, I’m always in favor or removing redundant code! In this specific > case, I think that it would be good to consider 2 options: > > 1) Have one rule that does both. > 2) Have 2 rules that inherit from a common superclass and only specialize > what’s needed for either collections or indexes. > > Without knowing the the code in much detail, I see a few advantages in > option 2: > a) Having 2 rules provides a little more flexibility. E.g. The optimizer > could decide to not run the indexing rule if no indexes are available. > We > don't do such optimizations today, but we've been thinking about them > and > I'd like to keep moving into a direction that allows for them. > b) The created classes/methods are probably smaller and easier to maintain. > > Cheers, > Till > > On 14 Aug 2016, at 13:08, Menaka Jayawardena wrote: > > > Hello, > > > > With the approach of index centralization, both collection and indexing > > functions have become very similar and shares most of the same code. > > > > It's very clear in above two classes that there's not much difference > > instead of creating the proper DataSource object. > > > > So, I suppose that instead of two separate rules, this can be merged into > > two sections of one common rule for index and collections. > > > > I'd like to have any feedback about this suggestion. > > > > Thank you very much > > Menaka > > > > -- > > *Menaka Madushanka Jayawardena* > > Faculty of Engineering, <http://www.pdn.ac.lk/eng> > > University of Peradeniyaya. > > LinkedIn <http://lk.linkedin.com/in/menakajayawardena> > > TP:- 071 885 1183/ 071 350 5470 >
