From f5db549eff4b16527138f44463c860d354033fa1 Mon Sep 17 00:00:00 2001 From: Alessandro Solimando Date: Thu, 11 Jul 2024 14:55:07 +0200 Subject: [PATCH] addressing review comments --- .../java/org/apache/calcite/adapter/os/PsTableFunction.java | 1 - .../org/apache/calcite/adapter/os/PsTableFunctionTest.java | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/plus/src/main/java/org/apache/calcite/adapter/os/PsTableFunction.java b/plus/src/main/java/org/apache/calcite/adapter/os/PsTableFunction.java index 1f81f69ac447..36980044de01 100644 --- a/plus/src/main/java/org/apache/calcite/adapter/os/PsTableFunction.java +++ b/plus/src/main/java/org/apache/calcite/adapter/os/PsTableFunction.java @@ -135,7 +135,6 @@ protected static class LineParser implements Function1 { } else { values[fieldIdx] = field(PS_FIELD_NAMES.get(fieldIdx), tokens[processedTokens]); } - return values; } diff --git a/plus/src/test/java/org/apache/calcite/adapter/os/PsTableFunctionTest.java b/plus/src/test/java/org/apache/calcite/adapter/os/PsTableFunctionTest.java index 844db39736d4..181cb5655bd9 100644 --- a/plus/src/test/java/org/apache/calcite/adapter/os/PsTableFunctionTest.java +++ b/plus/src/test/java/org/apache/calcite/adapter/os/PsTableFunctionTest.java @@ -34,6 +34,10 @@ */ class PsTableFunctionTest { + /** Test case for + * [CALCITE-6388] + * PsTableFunction throws NumberFormatException when the 'user' column has spaces. + */ @Test void testPsInfoParsing() { final List input = new ArrayList<>(); input.add("startup user 56399 1 56399 0 S 0.0 0.0 410348128 6672 ??"