-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#1167 refactor to use FP paradigm for schema validation logic #1185
#1167 refactor to use FP paradigm for schema validation logic #1185
Conversation
✅ Deploy Preview for papaya-valkyrie-395400 canceled.
|
03f4943
to
e80e66a
Compare
...le/apache-ignite/src/main/scala/org/finos/vuu/example/ignite/schema/IgniteEntitySchema.scala
Outdated
Show resolved
Hide resolved
...pache-ignite/src/test/scala/org/finos/vuu/example/ignite/schema/IgniteEntitySchemaTest.scala
Outdated
Show resolved
Hide resolved
|
||
None | ||
externalFields | ||
.find(field => externalSchema.schemaFields.forall(_.name != field)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a reason to switch to forall rather than using exists?
Exists will exit early on first element it find that is a match rather than traversing the whole collection
https://stackoverflow.com/questions/59922992/when-true-does-scala-exists-stop-at-the-first-element-that-satisfies-the-predic
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
forall
exits early as well, so they're same in that aspect. I just find forall
easier to follow in this scenario.
plugin/ignite-plugin/src/main/scala/org/finos/vuu/feature/ignite/schema/SchemaMapper.scala
Outdated
Show resolved
Hide resolved
- allows for cleaner flow of code
e80e66a
to
a1fc13d
Compare
- IgniteEntitySchema's invalid index exception to check for and include all invalid indexes - SchemaMapper validation to not check for missing columns in fields map since there's a use-case (basket constituents) where it makes sense to not specify all internal columns in the fields map.
a1fc13d
to
73593a9
Compare
No description provided.