Closed Hopding closed 7 years ago
Hi Andrew, Nice Job!
Remember you'll need to make an "Issue" to explain the work and then reference it here (in the Pull Request), as "Fixes ###" so that the above "Fixes Validator" will pick it up.
Also, I'm sure you know this but just in case, you'll need tests for this work to show everything is in order?
Congrats! and Thank you! -D
@Hopding Looks like your IDE threw in some "wrong" imports for Param.class and InvalidStateException.class -> you'll need to erase those manually and import the right ones?
Otherwise I'll do a review tomorrow?
@cogmission Yeah, I'll take care of that. I've also got to update some of the tests since they are no longer passing (because they use KEY.AUTO_CLASSIFY
but dont specify anything for KEY.INFERRED_FIELDS
).
...also I don't know if you thought of this already, but thinking about it - I'm getting pretty excited, and was thinking it would be nice to have a test that shows having more than one classified field where each is using a different classifier? (kind of obvious test, sorry) - but the functionality you're doing is very cool and did I say I was excited about it? 😄
Great contribution, @Hopding!
@cogmission I'm also excited to get this functionality working so that we can use the SDRClassifier with the NAPI. I think I've covered that test you mentioned here (let me know if you're looking for something more/different?).
I've just pushed a commit updating the tests to get them passing again. So, all else withstanding, this PR should be ready for review.
Looks like I forgot some tests. Will get those updated too...
@Hopding Nice. Ok I'll have a look when I get home tonight...
@Hopding Nice Job!
I left some comments in the "Files Changed" view... In general...
1.) Let's keep to the standard of using explicit import statements. 2.) Please remove the requirement to specify KEY.AUTO_CLASSIFY as "false". False should be accepted but it should also interpret the missing key as false in addition to avoid the verbosity of having to set it every time?
Fixes #512.
Classifier
interface.KEY
that maps inferred field names to the desiredClassifier
type for that field:INFERRED_FIELDS(“inferredFields”, Map<String, Classifier.class>)
KEY.AUTO_CLASSIFY
key is found to be true, a lookup is performed on theParameters
object for that node to retrieve the fields flagged to be classified.KEY.AUTO_CLASSIFY
is specified and there are no values for theKEY.INFERRED_FIELDS
or it is null.