Skip to content

Commit

Permalink
Fixed the method name
Browse files Browse the repository at this point in the history
  • Loading branch information
razajafri committed Jun 14, 2024
1 parent 83489be commit 08e4eab
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
14 changes: 7 additions & 7 deletions integration_tests/src/main/python/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,18 @@ def array_columns_to_sort_locally():

_allow_any_non_gpu = False
_non_gpu_allowed = []
_per_test_ansi_mode = None
_per_test_ansi_mode_enabled = None

def is_allowing_any_non_gpu():
return _allow_any_non_gpu

def get_non_gpu_allowed():
return _non_gpu_allowed

def is_per_test_ansi_mode_disabled():
return _per_test_ansi_mode

def is_per_test_ansi_mode_enabled():
return _per_test_ansi_mode_enabled


def get_validate_execs_in_gpu_plan():
return _validate_execs_in_gpu_plan
Expand Down Expand Up @@ -214,14 +216,12 @@ def pytest_runtest_setup(item):

global _allow_any_non_gpu
global _non_gpu_allowed
global _per_test_ansi_mode
global _per_test_ansi_mode_enabled
_non_gpu_allowed_databricks = []
_allow_any_non_gpu_databricks = False
non_gpu_databricks = item.get_closest_marker('allow_non_gpu_databricks')
non_gpu = item.get_closest_marker('allow_non_gpu')
per_test_ansi_mode = item.get_closest_marker('disable_ansi_mode')
if per_test_ansi_mode:
_per_test_ansi_mode = "false"
_per_test_ansi_mode_enabled = not item.get_closest_marker('disable_ansi_mode')

if non_gpu_databricks:
if is_databricks_runtime():
Expand Down
6 changes: 3 additions & 3 deletions integration_tests/src/main/python/spark_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import calendar, time
from datetime import date, datetime
from contextlib import contextmanager, ExitStack
from conftest import is_allowing_any_non_gpu, get_non_gpu_allowed, get_validate_execs_in_gpu_plan, is_databricks_runtime, is_at_least_precommit_run, get_inject_oom_conf, is_per_test_ansi_mode_disabled
from conftest import is_allowing_any_non_gpu, get_non_gpu_allowed, get_validate_execs_in_gpu_plan, is_databricks_runtime, is_at_least_precommit_run, get_inject_oom_conf, is_per_test_ansi_mode_enabled
from pyspark.sql import DataFrame
from pyspark.sql.types import TimestampType, DateType, _acceptable_types
from spark_init_internal import get_spark_i_know_what_i_am_doing, spark_version
Expand Down Expand Up @@ -127,8 +127,8 @@ def with_spark_session(func, conf={}):
reset_spark_session_conf()
_add_job_description(conf)
# Only set the ansi conf if not set by the test explicitly by setting the value in the dict
if "spark.sql.ansi.enabled" not in conf and is_per_test_ansi_mode_disabled() is not None:
conf["spark.sql.ansi.enabled"] = is_per_test_ansi_mode_disabled()
if "spark.sql.ansi.enabled" not in conf and is_per_test_ansi_mode_enabled() is not None:
conf["spark.sql.ansi.enabled"] = is_per_test_ansi_mode_enabled()
_set_all_confs(conf)
ret = func(_spark)
_check_for_proper_return_values(ret)
Expand Down

0 comments on commit 08e4eab

Please sign in to comment.