File tree Expand file tree Collapse file tree 2 files changed +5
-10
lines changed
Expand file tree Collapse file tree 2 files changed +5
-10
lines changed Original file line number Diff line number Diff line change 3737_TOP_LEVEL_DOMAIN_REGEX = r"\.[a-zA-Z]{1,63}$"
3838_SNOWFLAKE_HOST_SUFFIX_REGEX = r"snowflakecomputing(\.[a-zA-Z]{1,63}){1,2}$"
3939
40+ _PARAM_USE_SCOPED_TEMP_FOR_PANDAS_TOOLS = "ENABLE_FIX_1375538"
41+
4042
4143class FieldType (NamedTuple ):
4244 name : str
Original file line number Diff line number Diff line change 2222from snowflake .connector .telemetry import TelemetryData , TelemetryField
2323
2424from ._utils import (
25- _PYTHON_SNOWPARK_USE_SCOPED_TEMP_OBJECTS_STRING ,
2625 TempObjectType ,
2726 get_temp_type_for_object ,
2827 random_name_for_temp_object ,
2928)
29+ from .constants import _PARAM_USE_SCOPED_TEMP_FOR_PANDAS_TOOLS
3030from .cursor import SnowflakeCursor
3131
3232if TYPE_CHECKING : # pragma: no cover
@@ -353,20 +353,13 @@ def write_pandas(
353353 f"Invalid compression '{ compression } ', only acceptable values are: { compression_map .keys ()} "
354354 )
355355
356+ # TODO(SNOW-1505026): Get rid of this when the BCR to always create scoped temp for intermediate results is done.
356357 _use_scoped_temp_object = (
357- conn ._session_parameters .get (
358- _PYTHON_SNOWPARK_USE_SCOPED_TEMP_OBJECTS_STRING , False
359- )
358+ conn ._session_parameters .get (_PARAM_USE_SCOPED_TEMP_FOR_PANDAS_TOOLS , False )
360359 if conn ._session_parameters
361360 else False
362361 )
363362
364- """sfc-gh-yixie: scoped temp stage isn't required out side of a SP.
365- TODO: remove the following line when merging SP connector and Python Connector.
366- Make sure `create scoped temp stage` is supported when it's not run in a SP.
367- """
368- _use_scoped_temp_object = False
369-
370363 if create_temp_table :
371364 warnings .warn (
372365 "create_temp_table is deprecated, we still respect this parameter when it is True but "
You can’t perform that action at this time.
0 commit comments