Skip to content

Commit

Permalink
Move 'Error committing write to Hive' retry to Trino query executor
Browse files Browse the repository at this point in the history
  • Loading branch information
MiguelWeezardo authored and kokosing committed Jan 28, 2021
1 parent c2fbe7e commit f40d2fa
Showing 1 changed file with 7 additions and 7 deletions.
Expand Up @@ -27,19 +27,14 @@ public final class QueryExecutors
{
public static QueryExecutor onPresto()
{
return testContext().getDependency(QueryExecutor.class, "presto");
return connectToPresto("presto");
}

public static QueryExecutor connectToPresto(String prestoConfig)
{
return testContext().getDependency(QueryExecutor.class, prestoConfig);
}

public static QueryExecutor onHive()
{
return new QueryExecutor()
{
private final QueryExecutor delegate = testContext().getDependency(QueryExecutor.class, "hive");
private final QueryExecutor delegate = testContext().getDependency(QueryExecutor.class, prestoConfig);

@Override
public QueryResult executeQuery(String sql, QueryParam... params)
Expand All @@ -63,6 +58,11 @@ public void close()
};
}

public static QueryExecutor onHive()
{
return testContext().getDependency(QueryExecutor.class, "hive");
}

public static QueryExecutor onSqlServer()
{
return testContext().getDependency(QueryExecutor.class, "sqlserver");
Expand Down

0 comments on commit f40d2fa

Please sign in to comment.