deniskuzZ commented on code in PR #5074:
URL: https://github.com/apache/hive/pull/5074#discussion_r1482715727
##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/compaction/IcebergMajorQueryCompactor.java:
##########
@@ -39,12 +39,13 @@ public class IcebergMajorQueryCompactor extends
QueryCompactor {
@Override
public boolean run(CompactorContext context) throws IOException,
HiveException, InterruptedException {
+ String compactDbName = context.getTable().getDbName();
String compactTableName = context.getTable().getTableName();
Map<String, String> tblProperties = context.getTable().getParameters();
LOG.debug("Initiating compaction for the {} table", compactTableName);
- String compactionQuery = String.format("insert overwrite table %s select *
from %s",
- compactTableName, compactTableName);
+ String compactionQuery = String.format("insert overwrite table %s.%s
select * from %s.%s",
Review Comment:
you could refactor to
````
String compactionQuery ="insert overwrite table %s select * from
%s".replace("%s", tableName)
````
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]