huaxingao commented on code in PR #13665:
URL: https://github.com/apache/iceberg/pull/13665#discussion_r2238008209


##########
spark/v3.4/spark-runtime/src/integration/java/org/apache/iceberg/spark/TestRoundTrip.java:
##########
@@ -172,6 +176,34 @@ public void showView() {
     sql("DROP VIEW %s", "test");
   }
 
+  @TestTemplate
+  public void testDecimalColumn() {
+    int rows = 100;
+    String tableName = tableName("decimal_table1");
+    // Create table with a single DECIMAL column
+    sql("CREATE TABLE IF NOT EXISTS %s (amount DECIMAL(17, 5)) USING iceberg", 
tableName);
+    sql("TRUNCATE TABLE %s", tableName);
+
+    // Build and execute the INSERT statement
+    sql(
+        "INSERT INTO %s VALUES %s",
+        tableName,
+        IntStream.range(0, rows).mapToObj(i -> "(" + i + 
")").collect(Collectors.joining(",")));
+
+    // Build expected results
+    List<Object[]> expected =
+        IntStream.range(0, rows)
+            .mapToObj(i -> new Object[] {new BigDecimal(i + ".00000")})
+            .collect(Collectors.toList());
+
+    // Query and validate
+    List<Object[]> actual = sql("SELECT * FROM %s", tableName);
+    for (int i = 0; i < expected.size(); i++) {
+      System.out.println(actual.get(i)[0]);

Review Comment:
   remove this?



-- 
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

Reply via email to