Skip to content

Commit c0a8be9

Browse files
committed
Mask position of fields to fix an undeterministic position of a field in the result plan for java21
Signed-off-by: Yuanchun Shen <yuanchu@amazon.com>
1 parent b3a0cd5 commit c0a8be9

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

integ-test/src/test/java/org/opensearch/sql/calcite/remote/CalciteExplainIT.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1459,10 +1459,12 @@ public void testTopKThenSortExplain() throws IOException {
14591459
public void testGeoIpPushedInAgg() throws IOException {
14601460
// This explain IT verifies that externally registered UDF can be properly pushed down
14611461
assertYamlEqualsIgnoreId(
1462-
loadExpectedPlan("udf_geoip_in_agg_pushed.yaml"),
1462+
// In java 21, the position of host in the scanned table is different from the position in other java versions.
1463+
// Therefore, I mask all position with $*
1464+
loadExpectedPlan("udf_geoip_in_agg_pushed.yaml").replaceAll("\\$t?\\d+", "\\$*"),
14631465
explainQueryYaml(
14641466
String.format(
14651467
"source=%s | eval info = geoip('my-datasource', host) | stats count() by info.city",
1466-
TEST_INDEX_WEBLOGS)));
1468+
TEST_INDEX_WEBLOGS)).replaceAll("\\$t?\\d+", "\\$*"));
14671469
}
14681470
}

0 commit comments

Comments
 (0)