Skip to content

Commit b83110a

Browse files
committed
Replace windows carriages with spaces when sanitizing queries to explain
Signed-off-by: Yuanchun Shen <yuanchu@amazon.com>
1 parent 49beb76 commit b83110a

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

integ-test/src/test/java/org/opensearch/sql/calcite/pushdown/CalciteNoPushdownIT.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import org.junit.runner.RunWith;
1111
import org.junit.runners.Suite;
1212
import org.opensearch.sql.calcite.remote.*;
13+
import org.opensearch.sql.calcite.tpch.CalcitePPLTpchIT;
1314
import org.opensearch.sql.ppl.PPLIntegTestCase;
1415

1516
/**
@@ -102,7 +103,8 @@
102103
CalciteTopCommandIT.class,
103104
CalciteTrendlineCommandIT.class,
104105
CalciteVisualizationFormatIT.class,
105-
CalciteWhereCommandIT.class
106+
CalciteWhereCommandIT.class,
107+
CalcitePPLTpchIT.class
106108
})
107109
public class CalciteNoPushdownIT {
108110
private static boolean wasPushdownEnabled;

integ-test/src/test/java/org/opensearch/sql/calcite/tpch/CalcitePPLTpchIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,6 @@ public void testQ22() throws IOException {
463463
*/
464464
private static String sanitize(String ppl) {
465465
String withoutComments = ppl.replaceAll("(?s)/\\*.*?\\*/", "");
466-
return withoutComments.replaceAll("\\n", " ").trim();
466+
return withoutComments.replaceAll("\\r\\n", " ").replaceAll("\\n", " ").trim();
467467
}
468468
}

0 commit comments

Comments
 (0)