From 84e1070e76a5c385dd5472cddb3c22fc857b825d Mon Sep 17 00:00:00 2001 From: Alessandro Solimando Date: Tue, 27 Feb 2024 22:37:39 +0100 Subject: [PATCH] use logger for ArrowSchema --- .../java/org/apache/calcite/adapter/arrow/ArrowSchema.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/arrow/src/main/java/org/apache/calcite/adapter/arrow/ArrowSchema.java b/arrow/src/main/java/org/apache/calcite/adapter/arrow/ArrowSchema.java index 3ba6a4e97fe..9a2693abe41 100644 --- a/arrow/src/main/java/org/apache/calcite/adapter/arrow/ArrowSchema.java +++ b/arrow/src/main/java/org/apache/calcite/adapter/arrow/ArrowSchema.java @@ -28,7 +28,10 @@ import com.google.common.base.Suppliers; import com.google.common.collect.ImmutableMap; +import org.apache.calcite.util.trace.CalciteTrace; + import org.checkerframework.checker.nullness.qual.Nullable; +import org.slf4j.Logger; import java.io.File; import java.io.FileInputStream; @@ -44,6 +47,8 @@ * Schema mapped onto a set of Arrow files. */ class ArrowSchema extends AbstractSchema { + + protected static final Logger LOGGER = CalciteTrace.getPlannerTracer(); private final Supplier> tableMapSupplier; /** @@ -85,7 +90,7 @@ private static String trim(String s, String suffix) { private static Map deduceTableMap(File baseDirectory) { File[] files = baseDirectory.listFiles((dir, name) -> name.endsWith(".arrow")); if (files == null) { - System.out.println("directory " + baseDirectory + " not found"); + LOGGER.info("directory {} not found", baseDirectory); return ImmutableMap.of(); }