You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2021/01/11 06:50:14 UTC
[GitHub] [iceberg] deadwind4 opened a new issue #2063: Could Hive alter iceberg table?
deadwind4 opened a new issue #2063:
URL: https://github.com/apache/iceberg/issues/2063
I'm not found in offical document. I only found that Spark SQL 3.0 can alter iceberg table? Could Hive do 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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
[GitHub] [iceberg] pvary commented on issue #2063: Could Hive alter iceberg table?
Posted by GitBox <gi...@apache.org>.
pvary commented on issue #2063:
URL: https://github.com/apache/iceberg/issues/2063#issuecomment-757757783
MANAGED and EXTERNAL tables should behave the same way in respect of the ALTER TABLE commands.
By my current understanding the current SerDe API does not provide methods to handle ALTER TABLE commands.
The 3.1.2 version of the API contains this method which is added by [HIVE-19049](https://issues.apache.org/jira/browse/HIVE-19049) in Hive 3.0.0:
```
/**
* Called before a table is altered in the metastore
* during ALTER TABLE.
*
* @param table new table definition
*/
public default void preAlterTable(Table table, EnvironmentContext context) throws MetaException {
String alterOpType = (context == null || context.getProperties() == null) ?
null : context.getProperties().get(ALTER_TABLE_OPERATION_TYPE);
// By default allow only ADDPROPS and DROPPROPS.
// alterOpType is null in case of stats update.
if (alterOpType != null && !allowedAlterTypes.contains(alterOpType)){
throw new MetaException(
"ALTER TABLE can not be used for " + alterOpType + " to a non-native table ");
}
}
```
This could be implemented to do schema evoulution, but this is not present in Hive 2.3.7.
----------------------------------------------------------------
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
[GitHub] [iceberg] silvermissile commented on issue #2063: Could Hive alter iceberg table?
Posted by GitBox <gi...@apache.org>.
silvermissile commented on issue #2063:
URL: https://github.com/apache/iceberg/issues/2063#issuecomment-853695862
So this means that table created though hive_catalog con't schema evoulution for now
--
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
[GitHub] [iceberg] pvary commented on issue #2063: Could Hive alter iceberg table?
Posted by GitBox <gi...@apache.org>.
pvary commented on issue #2063:
URL: https://github.com/apache/iceberg/issues/2063#issuecomment-853712817
I think using Spark/Flink or whatever API we can evolve the schema (we have not checked yet if the resulting table could be read or not by Hive), but we can not do schema evolution from Hive or Impala - there are ongoing efforts but nothing available ATM
--
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
[GitHub] [iceberg] deadwind4 commented on issue #2063: Could Hive alter iceberg table?
Posted by GitBox <gi...@apache.org>.
deadwind4 commented on issue #2063:
URL: https://github.com/apache/iceberg/issues/2063#issuecomment-757677682
So, it is not supported to add a column to INTERNAL Hive table with hive current API, right?
----------------------------------------------------------------
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
[GitHub] [iceberg] pvary commented on issue #2063: Could Hive alter iceberg table?
Posted by GitBox <gi...@apache.org>.
pvary commented on issue #2063:
URL: https://github.com/apache/iceberg/issues/2063#issuecomment-853712817
I think using Spark/Flink or whatever API we can evolve the schema (we have not checked yet if the resulting table could be read or not by Hive), but we can not do schema evolution from Hive or Impala - there are ongoing efforts but nothing available ATM
--
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
[GitHub] [iceberg] silvermissile commented on issue #2063: Could Hive alter iceberg table?
Posted by GitBox <gi...@apache.org>.
silvermissile commented on issue #2063:
URL: https://github.com/apache/iceberg/issues/2063#issuecomment-853695862
So this means that table created though hive_catalog con't schema evoulution for now
--
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
[GitHub] [iceberg] pvary commented on issue #2063: Could Hive alter iceberg table?
Posted by GitBox <gi...@apache.org>.
pvary commented on issue #2063:
URL: https://github.com/apache/iceberg/issues/2063#issuecomment-757674907
@deadwind4: If your question is about having a Hive SQL command which could alter an EXTERNAL Hive table which is backed by an Iceberg table then sadly the answer is no. With some further development we can make it possible with the use the Hive 3.1.2 API to update the table properties, but with the current API I do not see a way for schema evolution.
----------------------------------------------------------------
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org