-
Notifications
You must be signed in to change notification settings - Fork 36
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
feat(MLOP-1985): optional params #347
Conversation
butterfree/extract/source.py
Outdated
""" | ||
|
||
def __init__(self, readers: List[Reader], query: str) -> None: | ||
def __init__( | ||
self, readers: List[Reader], query: str = "", eager_evaluation: bool = True, |
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.
why did you add this empty string as default value?
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.
👀
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.
Fixed
butterfree/extract/source.py
Outdated
""" | ||
|
||
def __init__(self, readers: List[Reader], query: str) -> None: | ||
def __init__( | ||
self, readers: List[Reader], query: str = "", eager_evaluation: bool = True, |
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.
👀
butterfree/extract/source.py
Outdated
""" | ||
|
||
def __init__(self, readers: List[Reader], query: str) -> None: | ||
def __init__( | ||
self, readers: List[Reader], query: str = "", eager_evaluation: bool = True, |
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.
By the docs, we have: "Lazy evaluation can improve Spark's performance as it allows Spark to build the best version of the execution plan.". Looks like that False
as default is better, or am I wrong?
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.
Or is it True
to maintain some compatibility?
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.
You're right, it's defaulted True
so we can turn it off gradually in our pipelines.
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
* feat(MLOP-1985): optional params (#347) ---------
Why? 📖
The
eager_evaluation
param forces Spark to apply the currently mapped changes to a DataFrame. When this parameter is set to False, Spark follows its standard behavior of lazy evaluation. Lazy evaluation can improve Spark's performance as it allows Spark to build the best version of the execution plan.The
row_deduplication
is not applicable to all scenarios. For instance, when using Delta operations, row deduplication can be done throughmerge
operations.What? 🔧
Type of change
Please delete options that are not relevant.
How everything was tested? 📏