Skip to content
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

#101: ErrorHandling documentation and fields renames #103

Merged

Conversation

benedeki
Copy link
Contributor

@benedeki benedeki commented May 2, 2023

  • merged ErrorHandlingCommon into ErrorHandling
  • renamed errCol / errCols => errSrcColName
  • renamed putErrorToColumn => createErrorAsColumn
  • renamed aggregateErrorColumns => applyErrorColumnsToDataFrame
  • renamed EvaluateIntoErrorMessage to TransformIntoErrorMessage
  • renamed EvaluateViaUdf to TransformViaUdf
  • some smaller parameters renamed
  • numerous ScalaDoc entries

Depends on #84
Depends on #94

Closes #101

benedeki and others added 18 commits March 7, 2023 04:29
* new functions `null_col` and `call_udf`
* `ErrorMessage` refactoring
* `ErrorHandling` trait designed to serve as the interface for different implementations
* Implement error handling by putting the info into column of `ErrorMessage` array
* numerous support classes
* headers fix
…e of raw values

* `ErrorMessageSubmitJustErrorValue` class created to offer the ability to submit errors without source column but with error value
* `ErrorMessageSubmitWithoutColumn` changed from `case class` to `class` to allow inheritance
* some PR comments addressed
…or-handling-map-errcol

Introducing Map for error columns and their values
* Fixed few minor things discovered by the UTs
…dling/implementations/ErrorMessageArray.scala

Co-authored-by: Ladislav Sulak <[email protected]>
* merged `ErrorHandlingCommon` into `ErrorHandling`
* renamed errCol / errCols => errSrcColName
* renamed putErrorToColumn => createErrorAsColumn
* renamed aggregateErrorColumns => applyErrorColumnsToDataFrame
* renamed `EvaluateIntoErrorMessage` to `TransformIntoErrorMessage`
* renamed `EvaluateViaUdf` to `TransformViaUdf`
* some smaller parameters renamed
* numerous ScalaDoc entries
@benedeki benedeki self-assigned this May 2, 2023
@benedeki benedeki requested review from TebaleloS, miroslavpojer and dk1844 and removed request for dk1844, lsulak, Zejnilovic and TebaleloS May 2, 2023 23:07
* typo fix
* enhanced information about partials
@github-actions
Copy link

github-actions bot commented May 4, 2023

JaCoCo code coverage report - scala:2.12 - spark:3.3

File Coverage [92.81%] 🍏
ErrorMessageSubmitOnMoreColumns.scala 100% 🍏
ErrorMessageSubmitJustErrorValue.scala 100% 🍏
ErrorMessageSubmitOnColumn.scala 100% 🍏
ErrorMessageSubmitWithoutColumn.scala 100% 🍏
ErrorHandlingFilterRowsWithErrors.scala 100% 🍏
OncePerSparkSession.scala 100% 🍏
ErrorHandling.scala 100% 🍏
ErrorWhen.scala 100% 🍏
functions.scala 100% 🍏
ErrorMessageArray.scala 99.17% 🍏
TransformIntoErrorMessage.scala 97.14% 🍏
ColumnOrValue.scala 96.62% 🍏
ExplodeTools.scala 89.12% 🍏
TransformViaUdf.scala 0%
ErrorMessageSubmit.scala 0%
Total Project Coverage 88.87% 🍏

Copy link
Collaborator

@lsulak lsulak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I reviewed it all, including git pull, sbt build, and I also ran tests. More than happy to approve once those minor findings are resolved

* documentation to `ErrorMessageArray`
* `null_col` function description enhanced
project/plugins.sbt Outdated Show resolved Hide resolved
lsulak
lsulak previously approved these changes May 12, 2023
Copy link
Collaborator

@lsulak lsulak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job!

  • code reviewed
  • pulled
  • built
  • ran tests

TebaleloS
TebaleloS previously approved these changes May 15, 2023
build.sbt Outdated
lazy val commonJacocoExcludes: Seq[String] = Seq(
"za.co.absa.spark.commons.adapters.CallUdfAdapter",
"za.co.absa.spark.commons.adapters.TransformAdapter"
// "za.co.absa.spark.commons.utils.JsonUtils*", // class and related objects
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see dead code, is reserved for something or can removed

Copy link
Collaborator

@lsulak lsulak Jun 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still here (and 1 below)

build.sbt Outdated
"za.co.absa.spark.commons.adapters.CallUdfAdapter",
"za.co.absa.spark.commons.adapters.TransformAdapter"
// "za.co.absa.spark.commons.utils.JsonUtils*", // class and related objects
// "za.co.absa.spark.commons.utils.ExplodeTools" // class only
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And here as well.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The example with * is still hint.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will actually change it to make it obvious it's a documentation and not dead code 😉

@benedeki
Copy link
Contributor Author

…d-fields-renames

# Conflicts solved:
#	spark-commons/src/main/scala/za/co/absa/spark/commons/errorhandling/ErrorHandling.scala
#	spark-commons/src/main/scala/za/co/absa/spark/commons/errorhandling/implementations/ErrorHandlingFilterRowsWithErrors.scala
#	spark-commons/src/main/scala/za/co/absa/spark/commons/errorhandling/partials/ErrorHandlingCommon.scala
#	spark-commons/src/test/scala/za/co/absa/spark/commons/errorhandling/implementations/ErrorMessageArrayTest.scala
@benedeki benedeki dismissed stale reviews from TebaleloS and lsulak via 378f1fe June 20, 2023 06:14
@benedeki benedeki requested a review from seldon851 June 20, 2023 07:10
Copy link
Collaborator

@lsulak lsulak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, did the last round of review - pulled, built, ran tests, reviewed.

@benedeki benedeki merged commit 9fa1d2b into master Jun 20, 2023
@benedeki benedeki deleted the feature/101-errorhandling-documentation-and-fields-renames branch June 20, 2023 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ErrorHandling documentation and fields renames
4 participants