ahmedabu98 commented on issue #33497:
URL: https://github.com/apache/beam/issues/33497#issuecomment-2580129798

   Nevermind I got a reproduction:
   
   ```java
   public static void main(String[] args) throws IOException {
     String project = "apache-beam-testing";
     String BQMS_CATALOG = 
"org.apache.iceberg.gcp.bigquery.BigQueryMetastoreCatalog";
     String warehouse = 
"gs://ahmedabualsaud-apache-beam-testing/iceberg-testing";
     Catalog catalog =
         CatalogUtil.loadCatalog(
             BQMS_CATALOG,
             "bqms_catalog",
             ImmutableMap.<String, String>builder()
                 .put("gcp_project", project)
                 .put("gcp_location", "us-central1")
                 .put("warehouse", warehouse)
                 .build(),
             new Configuration());
   
     Schema schema = 
Schema.builder().addInt64Field("long").addStringField("str").build();
     org.apache.iceberg.Schema iceSchema = 
IcebergUtils.beamSchemaToIcebergSchema(schema);
     PartitionSpec spec = 
PartitionSpec.builderFor(iceSchema).identity("str").build();
     String tableId = "ahmedabualsaud.my_table_with_spec";
     TableIdentifier identifier = TableIdentifier.parse(tableId);
     Table table = catalog.createTable(identifier, iceSchema, spec);
     List<Row> rows =
         LongStream.range(0, 1000)
             .mapToObj(l -> Row.withSchema(schema).addValues(l, "value_" + 
l).build())
             .collect(Collectors.toList());
     
     Pipeline p = Pipeline.create();
     p.apply(Create.of(rows))
         .setRowSchema(schema)
         .apply(
             Managed.write(Managed.ICEBERG)
                 .withConfig(
                     ImmutableMap.of(
                         "table",
                         tableId,
                         "catalog_properties",
                         ImmutableMap.of(
                             "catalog-impl", BQMS_CATALOG,
                             "gcp_project", project,
                             "gcp_location", "us-central1",
                             "warehouse", warehouse))));
     p.run().waitUntilFinish();
   }
   ```
   
   I get no results when executing this query in BigQuery:
   ```sql
   SELECT * FROM `apache-beam-testing.ahmedabualsaud.my_table_with_spec` where 
str = "value_811"
   ```
   This works however:
   ```sql
   SELECT * FROM `apache-beam-testing.ahmedabualsaud.my_table_with_spec` where 
str like "value_811"
   ```


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

Reply via email to