pvary commented on a change in pull request #1612:
URL: https://github.com/apache/iceberg/pull/1612#discussion_r527051304



##########
File path: mr/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergSerDe.java
##########
@@ -56,10 +62,22 @@ public void initialize(@Nullable Configuration 
configuration, Properties serDePr
     } else if (serDeProperties.get(InputFormatConfig.TABLE_SCHEMA) != null) {
       tableSchema = SchemaParser.fromJson((String) 
serDeProperties.get(InputFormatConfig.TABLE_SCHEMA));
     } else {
-      try {
-        tableSchema = Catalogs.loadTable(configuration, 
serDeProperties).schema();
-      } catch (NoSuchTableException nte) {
-        throw new SerDeException("Please provide an existing table or a valid 
schema", nte);
+      // Read the configuration parameters
+      String columnNames = 
serDeProperties.getProperty(serdeConstants.LIST_COLUMNS);
+      String columnTypes = 
serDeProperties.getProperty(serdeConstants.LIST_COLUMN_TYPES);

Review comment:
       Yes, and also this is the way how we get the information when the 
columns are provided in the create table query.
   ```
   CREATE EXTERNAL TABLE (customer_id INT, first_name STRING) customers 
   STORED BY 'org.apache.iceberg.mr.hive.HiveIcebergStorageHandler';
   ```
   Will result in:
   ```
   columnNames = "customer_id,first_name";
   columnTypes = "int:string";
   ```
   Don't ask me how Hive arrived to this solution, but it is how it is...




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

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to