Fang-Yu Rao created IMPALA-15533:
------------------------------------
Summary: Some Calcite tests seem to be run against the original
planner
Key: IMPALA-15533
URL: https://issues.apache.org/jira/browse/IMPALA-15533
Project: IMPALA
Issue Type: Bug
Components: Test
Affects Versions: Impala 5.0.0
Reporter: Fang-Yu Rao
Assignee: Fang-Yu Rao
IMPALA-14488 seems to introduce a bug in our tests against the Calcite planner.
When trying to add a test case I wanted to add for IMPALA-15500 (Privilege
requests for columns in the USING clause are not registered by
ImpalaSqlValidatorImpl of the Calcite planner) before fixing the bug. I
expected the test case to fail, but it did NOT.
Specifically, at
[https://github.com/apache/impala/blame/7e586ff/tests/authorization/test_ranger.py#L1732-L1735],
we set up the session configuration via the following.
{code:java}
# Set the query option planner to CALCITE and ensure there is no fallback
to
# the original planner
non_owner_client.set_configuration({"planner": "CALCITE"})
non_owner_client.set_configuration({"fallback_planner": "CALCITE"})
{code}
The above does not seem to be a correct way to set up both query options. We
probably should have set up the query options via the following, i.e., setting
up 2 query options via one single call to set_configuration().
{code:java}
non_owner_client.set_configuration({"planner": "CALCITE",
"fallback_planner": "CALCITE"})
{code}
If we set up the same session twice via 2 calls to set_configuration(), I think
the latter would reset the changes made by the former call. In our example
above, eventually only fallback_planner was set to "CALCITE", whereas the
planner was still the default one, i.e., "ORIGINAL", resulting in the test
using the original planner to run the test.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)