File tree Expand file tree Collapse file tree
core/src/main/java/org/opensearch/sql/calcite
integ-test/src/test/java/org/opensearch/sql/calcite/remote Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -40,6 +40,11 @@ public static int getNextId() {
4040 return threadCounter .get ().getAndIncrement ();
4141 }
4242
43+ // For test only. Reset id to avoid unstable explain output of query.
44+ public static void resetId () {
45+ threadCounter .get ().set (0 );
46+ }
47+
4348 public ExtendedRexBuilder (RexBuilder rexBuilder ) {
4449 super (rexBuilder .getTypeFactory ());
4550 }
Original file line number Diff line number Diff line change 1111import org .junit .Assume ;
1212import org .junit .Ignore ;
1313import org .junit .Test ;
14+ import org .opensearch .sql .calcite .ExtendedRexBuilder ;
1415import org .opensearch .sql .ppl .ExplainIT ;
1516
1617public class CalciteExplainIT extends ExplainIT {
@@ -19,6 +20,7 @@ public void init() throws Exception {
1920 super .init ();
2021 enableCalcite ();
2122 disallowCalciteFallback ();
23+ ExtendedRexBuilder .resetId ();
2224 }
2325
2426 @ Override
You can’t perform that action at this time.
0 commit comments