nastra commented on code in PR #9342:
URL: https://github.com/apache/iceberg/pull/9342#discussion_r1432731435
##########
spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/source/TestIcebergSpark.java:
##########
@@ -59,83 +60,78 @@ public static void stopSpark() {
public void testRegisterIntegerBucketUDF() {
IcebergSpark.registerBucketUDF(spark, "iceberg_bucket_int_16",
DataTypes.IntegerType, 16);
List<Row> results = spark.sql("SELECT
iceberg_bucket_int_16(1)").collectAsList();
- Assert.assertEquals(1, results.size());
- Assert.assertEquals(
- (int) Transforms.bucket(16).bind(Types.IntegerType.get()).apply(1),
- results.get(0).getInt(0));
+
+ assertThat(results).hasSize(1);
+ assertThat(results.get(0).getInt(0))
+ .isEqualTo((int)
Transforms.bucket(16).bind(Types.IntegerType.get()).apply(1));
Review Comment:
I think all of these casts to `(int)` can now be removed. This was rather
used because `assertEquals()` was complaining about it
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]