Steve Carlin has uploaded this change for review. ( http://gerrit.cloudera.org:8080/24699
Change subject: IMPALA-15266: Fix flaky test due to slow Calcite first query. ...................................................................... IMPALA-15266: Fix flaky test due to slow Calcite first query. The test test_invalidation_metrics in the test_automatic_invalidation.py file is flaky for the Calcite planner. On the first query, some static variables are being initialized. Some of these static initializations are not done at startup time. One of special note here is the RelMetadataQuery initializations. Calcite generates java code on the first call to the RelMetadataQuery functions. The JaninoRelMetadataProvider.revise() method is now called for these RelMetadataQuery queries to compile the code before the first query is run. Also of note: The test_invalidation_metrics calls a "select 1" before calling any queries. There is still some initialization of static variables done within Calcite, but the quick "select 1" query gets compiled way below the 1s threshold and subsequent queries clear the 1s barrier with ease as well. Change-Id: I90b167055cb8d8b0045344085083160f1d98f5a4 --- M java/calcite-planner/src/main/java/org/apache/impala/calcite/service/CalciteCompilerFactory.java M java/calcite-planner/src/main/java/org/apache/impala/calcite/service/CalciteQueryParser.java M java/calcite-planner/src/main/java/org/apache/impala/calcite/service/CalciteRelNodeConverter.java M tests/custom_cluster/test_automatic_invalidation.py 4 files changed, 44 insertions(+), 10 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/99/24699/2 -- To view, visit http://gerrit.cloudera.org:8080/24699 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I90b167055cb8d8b0045344085083160f1d98f5a4 Gerrit-Change-Number: 24699 Gerrit-PatchSet: 2 Gerrit-Owner: Steve Carlin <[email protected]>
