RussellSpitzer commented on issue #6670: URL: https://github.com/apache/iceberg/issues/6670#issuecomment-1406595180
Repo ```java @Test public void testBug() throws IOException, NoSuchTableException, ParseException { String myTable = tableName; sql("CREATE TABLE %s (log_dateint int, request_dateint int) USING iceberg " + "PARTITIONED BY (log_dateint, request_dateint)", tableName); Table table = Spark3Util.loadIcebergTable(spark, tableName); PartitionData partition_one = new PartitionData(table.spec().partitionType()); partition_one.set(0, 20220730); partition_one.set(1, 20220721); PartitionData partition_two = new PartitionData(table.spec().partitionType()); partition_two.set(0, 20220728); partition_two.set(1, 20220803); Assert.assertEquals( StructLikeWrapper.forType(table.spec().partitionType()).set(partition_one).hashCode(), StructLikeWrapper.forType(table.spec().partitionType()).set(partition_two).hashCode()); Dataset<Row> df = spark.createDataset(ImmutableList.of( Tuple2.apply((int) partition_one.get(0), (int) partition_one.get(1)), Tuple2.apply((int) partition_two.get(0), (int) partition_two.get(1))), Encoders.tuple(Encoders.INT(), Encoders.INT())).toDF("log_dateint", "request_dateint"); df.writeTo(tableName).append(); Assert.assertEquals(1, sql("SELECT * FROM %s WHERE request_dateint == 20220803", tableName).size()); Assert.assertEquals(1, sql("SELECT * FROM %s WHERE request_dateint == 20220721", tableName).size()); sql("DELETE FROM %s WHERE request_dateint == 20220803", tableName); Assert.assertEquals(0, sql("SELECT * FROM %s WHERE request_dateint == 20220803", tableName).size()); Assert.assertEquals(1, sql("SELECT * FROM %s WHERE request_dateint == 20220721", tableName).size()); } ``` -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org