Skip to content

Commit

Permalink
Use logging instead of System.out
Browse files Browse the repository at this point in the history
System.out goes to logs anyway, just the context is stripped.
  • Loading branch information
findepi committed Oct 7, 2022
1 parent ae11dd6 commit be5aa67
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import com.google.common.base.VerifyException;
import com.google.common.collect.ImmutableMap;
import com.google.common.io.Resources;
import io.airlift.log.Logger;
import io.trino.Session;
import io.trino.execution.warnings.WarningCollector;
import io.trino.metadata.TableHandle;
Expand Down Expand Up @@ -68,6 +69,8 @@
public abstract class BaseCostBasedPlanTest
extends BasePlanTest
{
private static final Logger log = Logger.get(BaseCostBasedPlanTest.class);

public static final List<String> TPCH_SQL_FILES = IntStream.rangeClosed(1, 22)
.mapToObj(i -> format("q%02d", i))
.map(queryId -> format("/sql/presto/tpch/%s.sql", queryId))
Expand Down Expand Up @@ -142,7 +145,7 @@ protected void generate()
getQueryPlanResourcePath(queryResourcePath));
createParentDirs(queryPlanWritePath.toFile());
write(generateQueryPlan(readQuery(queryResourcePath)).getBytes(UTF_8), queryPlanWritePath.toFile());
System.out.println("Generated expected plan for query: " + queryResourcePath);
log.info("Generated expected plan for query: %s", queryResourcePath);
}
catch (IOException e) {
throw new UncheckedIOException(e);
Expand Down

0 comments on commit be5aa67

Please sign in to comment.