This is an automated email from the ASF dual-hosted git repository.

amoghj pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg.git


The following commit(s) were added to refs/heads/main by this push:
     new 42c3159226 MR: Optimize schema string retrieval in Iceberg (#10489)
42c3159226 is described below

commit 42c3159226ab8f7f3969760b6d75a40246a19bd7
Author: GYoung <[email protected]>
AuthorDate: Sat Jun 15 06:03:20 2024 +0800

    MR: Optimize schema string retrieval in Iceberg (#10489)
    
    Co-authored-by: howieyang <[email protected]>
---
 mr/src/main/java/org/apache/iceberg/mr/Catalogs.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mr/src/main/java/org/apache/iceberg/mr/Catalogs.java 
b/mr/src/main/java/org/apache/iceberg/mr/Catalogs.java
index 75797580cd..e8a4b5da35 100644
--- a/mr/src/main/java/org/apache/iceberg/mr/Catalogs.java
+++ b/mr/src/main/java/org/apache/iceberg/mr/Catalogs.java
@@ -151,7 +151,7 @@ public final class Catalogs {
   public static Table createTable(Configuration conf, Properties props) {
     String schemaString = props.getProperty(InputFormatConfig.TABLE_SCHEMA);
     Preconditions.checkNotNull(schemaString, "Table schema not set");
-    Schema schema = 
SchemaParser.fromJson(props.getProperty(InputFormatConfig.TABLE_SCHEMA));
+    Schema schema = SchemaParser.fromJson(schemaString);
 
     String specString = props.getProperty(InputFormatConfig.PARTITION_SPEC);
     PartitionSpec spec = PartitionSpec.unpartitioned();

Reply via email to