-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
API, Spark 3.3: Remove all usages of deprecated AssertHelpers #10500
Conversation
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.
This might still be used in older Spark versions that haven't been converted over to using AssertJ assertions
you're right, just intellij didn't see them. |
2c1a684
to
d7069b8
Compare
scalarSql( | ||
"CALL %s.system.add_files('%s', '`parquet`.`%s`')", | ||
catalogName, tableName, fileTableDir.getAbsolutePath())); | ||
Assertions.assertThatThrownBy( |
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.
it should be fine to statically import the method here, similar to how assertThat
is already statically imported in this class.
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.
The code was changed mechanically, so thanks for catching that.
I know that static imports are generally discouraged in the project, so is this comment about this source file in particular, or more broadly about Assertions.*
?
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.
the comment is only about statically importing methods from Assertions
, but I guess it would be too much work now to statically import assertThatThrownBy
, so let's leave it as-is
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.
If we have consensu that Assertions
should be used with static imports, do you think it could be helpful to support this with static code analysis?
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.
we could eventually support this via static code analysis but atm we have a mix of static vs non-static usage wrt Assertions
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.
so if we cleaned up the non-static imports, we would want to have static code analysis?
let's give it a try -- #10517
flink-scala-2-12-tests (8, 1.17) looks like a flake. on a subsequent run flink-scala-2-12-tests (8, 1.17) it passed. |
spark/v3.3/spark/src/test/java/org/apache/iceberg/spark/actions/TestRewriteDataFilesAction.java
Outdated
Show resolved
Hide resolved
`AssertHelpers` was deprecated and all the usages were removed.
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.
LGTM, thanks for fixing this
thanks for the merge! |
No description provided.