datawave icon indicating copy to clipboard operation
datawave copied to clipboard

Update contract for Projection classes

Open apmoriarty opened this issue 3 years ago • 1 comments

The Projection, KeyProjection, and DocumentProjection classes all rely on thrown exceptions to enforce immutability. One suggestion while working https://github.com/NationalSecurityAgency/datawave/pull/1481 was to remove the exceptions, force the collections to be immutable, and pass in any include/exclude fields as constructor args.

Decide on a contract and implement it.

apmoriarty avatar Apr 15 '22 10:04 apmoriarty

This seems like a case where if we can avoid excessive exceptions, then why not? Passing them in as constructor args is straightforward, and if need be, it would be simple enough to create builder classes for each projection that would allow for easy, fluent construction.

lbschanno avatar Apr 17 '22 20:04 lbschanno

Found ticket, working through to make any remaining changes.

MiguelRicardos avatar Jun 05 '23 19:06 MiguelRicardos