snowpark-connect 0.24.0__py3-none-any.whl → 0.26.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of snowpark-connect might be problematic. Click here for more details.
- snowflake/snowpark_connect/column_name_handler.py +116 -4
- snowflake/snowpark_connect/config.py +23 -0
- snowflake/snowpark_connect/constants.py +0 -29
- snowflake/snowpark_connect/dataframe_container.py +22 -0
- snowflake/snowpark_connect/execute_plan/map_execution_command.py +56 -1
- snowflake/snowpark_connect/expression/literal.py +13 -2
- snowflake/snowpark_connect/expression/map_cast.py +5 -8
- snowflake/snowpark_connect/expression/map_sql_expression.py +23 -1
- snowflake/snowpark_connect/expression/map_udf.py +88 -29
- snowflake/snowpark_connect/expression/map_unresolved_attribute.py +199 -15
- snowflake/snowpark_connect/expression/map_unresolved_extract_value.py +44 -16
- snowflake/snowpark_connect/expression/map_unresolved_function.py +840 -367
- snowflake/snowpark_connect/expression/map_unresolved_star.py +3 -2
- snowflake/snowpark_connect/hidden_column.py +39 -0
- snowflake/snowpark_connect/includes/jars/hadoop-client-api-trimmed-3.3.4.jar +0 -0
- snowflake/snowpark_connect/includes/jars/json4s-native_2.12-3.7.0-M11.jar +0 -0
- snowflake/snowpark_connect/includes/jars/paranamer-2.8.3.jar +0 -0
- snowflake/snowpark_connect/includes/jars/sas-scala-udf_2.12-0.1.0.jar +0 -0
- snowflake/snowpark_connect/includes/jars/{hadoop-client-api-3.3.4.jar → spark-connect-client-jvm_2.12-3.5.6.jar} +0 -0
- snowflake/snowpark_connect/relation/map_column_ops.py +17 -4
- snowflake/snowpark_connect/relation/map_extension.py +52 -11
- snowflake/snowpark_connect/relation/map_join.py +258 -62
- snowflake/snowpark_connect/relation/map_map_partitions.py +9 -4
- snowflake/snowpark_connect/relation/map_relation.py +12 -1
- snowflake/snowpark_connect/relation/map_row_ops.py +8 -1
- snowflake/snowpark_connect/relation/map_sql.py +88 -11
- snowflake/snowpark_connect/relation/map_udtf.py +100 -46
- snowflake/snowpark_connect/relation/read/map_read.py +3 -3
- snowflake/snowpark_connect/relation/read/map_read_jdbc.py +1 -1
- snowflake/snowpark_connect/relation/read/map_read_json.py +8 -1
- snowflake/snowpark_connect/relation/read/map_read_table.py +1 -9
- snowflake/snowpark_connect/relation/read/reader_config.py +3 -1
- snowflake/snowpark_connect/relation/utils.py +44 -0
- snowflake/snowpark_connect/relation/write/map_write.py +175 -75
- snowflake/snowpark_connect/resources_initializer.py +47 -6
- snowflake/snowpark_connect/server.py +26 -4
- snowflake/snowpark_connect/type_mapping.py +29 -25
- snowflake/snowpark_connect/typed_column.py +14 -0
- snowflake/snowpark_connect/utils/artifacts.py +23 -0
- snowflake/snowpark_connect/utils/concurrent.py +4 -0
- snowflake/snowpark_connect/utils/context.py +6 -1
- snowflake/snowpark_connect/utils/external_udxf_cache.py +36 -0
- snowflake/snowpark_connect/utils/scala_udf_utils.py +596 -0
- snowflake/snowpark_connect/utils/session.py +4 -0
- snowflake/snowpark_connect/utils/telemetry.py +6 -17
- snowflake/snowpark_connect/utils/udf_helper.py +2 -0
- snowflake/snowpark_connect/utils/udf_utils.py +22 -1
- snowflake/snowpark_connect/utils/udtf_utils.py +1 -0
- snowflake/snowpark_connect/version.py +1 -1
- {snowpark_connect-0.24.0.dist-info → snowpark_connect-0.26.0.dist-info}/METADATA +1 -1
- snowpark_connect-0.26.0.dist-info/RECORD +481 -0
- snowflake/snowpark_connect/includes/jars/scala-compiler-2.12.18.jar +0 -0
- snowflake/snowpark_connect/includes/jars/spark-kubernetes_2.12-3.5.6.jar +0 -0
- snowflake/snowpark_connect/includes/jars/spark-mllib_2.12-3.5.6.jar +0 -0
- snowflake/snowpark_connect/includes/jars/spark-streaming_2.12-3.5.6.jar +0 -0
- snowflake/snowpark_connect/includes/python/pyspark/errors/tests/__init__.py +0 -16
- snowflake/snowpark_connect/includes/python/pyspark/errors/tests/test_errors.py +0 -60
- snowflake/snowpark_connect/includes/python/pyspark/ml/deepspeed/tests/test_deepspeed_distributor.py +0 -306
- snowflake/snowpark_connect/includes/python/pyspark/ml/tests/__init__.py +0 -16
- snowflake/snowpark_connect/includes/python/pyspark/ml/tests/connect/test_connect_classification.py +0 -53
- snowflake/snowpark_connect/includes/python/pyspark/ml/tests/connect/test_connect_evaluation.py +0 -50
- snowflake/snowpark_connect/includes/python/pyspark/ml/tests/connect/test_connect_feature.py +0 -43
- snowflake/snowpark_connect/includes/python/pyspark/ml/tests/connect/test_connect_function.py +0 -114
- snowflake/snowpark_connect/includes/python/pyspark/ml/tests/connect/test_connect_pipeline.py +0 -47
- snowflake/snowpark_connect/includes/python/pyspark/ml/tests/connect/test_connect_summarizer.py +0 -43
- snowflake/snowpark_connect/includes/python/pyspark/ml/tests/connect/test_connect_tuning.py +0 -46
- snowflake/snowpark_connect/includes/python/pyspark/ml/tests/connect/test_legacy_mode_classification.py +0 -238
- snowflake/snowpark_connect/includes/python/pyspark/ml/tests/connect/test_legacy_mode_evaluation.py +0 -194
- snowflake/snowpark_connect/includes/python/pyspark/ml/tests/connect/test_legacy_mode_feature.py +0 -156
- snowflake/snowpark_connect/includes/python/pyspark/ml/tests/connect/test_legacy_mode_pipeline.py +0 -184
- snowflake/snowpark_connect/includes/python/pyspark/ml/tests/connect/test_legacy_mode_summarizer.py +0 -78
- snowflake/snowpark_connect/includes/python/pyspark/ml/tests/connect/test_legacy_mode_tuning.py +0 -292
- snowflake/snowpark_connect/includes/python/pyspark/ml/tests/connect/test_parity_torch_data_loader.py +0 -50
- snowflake/snowpark_connect/includes/python/pyspark/ml/tests/connect/test_parity_torch_distributor.py +0 -152
- snowflake/snowpark_connect/includes/python/pyspark/ml/tests/test_algorithms.py +0 -456
- snowflake/snowpark_connect/includes/python/pyspark/ml/tests/test_base.py +0 -96
- snowflake/snowpark_connect/includes/python/pyspark/ml/tests/test_dl_util.py +0 -186
- snowflake/snowpark_connect/includes/python/pyspark/ml/tests/test_evaluation.py +0 -77
- snowflake/snowpark_connect/includes/python/pyspark/ml/tests/test_feature.py +0 -401
- snowflake/snowpark_connect/includes/python/pyspark/ml/tests/test_functions.py +0 -528
- snowflake/snowpark_connect/includes/python/pyspark/ml/tests/test_image.py +0 -82
- snowflake/snowpark_connect/includes/python/pyspark/ml/tests/test_linalg.py +0 -409
- snowflake/snowpark_connect/includes/python/pyspark/ml/tests/test_model_cache.py +0 -55
- snowflake/snowpark_connect/includes/python/pyspark/ml/tests/test_param.py +0 -441
- snowflake/snowpark_connect/includes/python/pyspark/ml/tests/test_persistence.py +0 -546
- snowflake/snowpark_connect/includes/python/pyspark/ml/tests/test_pipeline.py +0 -71
- snowflake/snowpark_connect/includes/python/pyspark/ml/tests/test_stat.py +0 -52
- snowflake/snowpark_connect/includes/python/pyspark/ml/tests/test_training_summary.py +0 -494
- snowflake/snowpark_connect/includes/python/pyspark/ml/tests/test_util.py +0 -85
- snowflake/snowpark_connect/includes/python/pyspark/ml/tests/test_wrapper.py +0 -138
- snowflake/snowpark_connect/includes/python/pyspark/ml/tests/tuning/__init__.py +0 -16
- snowflake/snowpark_connect/includes/python/pyspark/ml/tests/tuning/test_cv_io_basic.py +0 -151
- snowflake/snowpark_connect/includes/python/pyspark/ml/tests/tuning/test_cv_io_nested.py +0 -97
- snowflake/snowpark_connect/includes/python/pyspark/ml/tests/tuning/test_cv_io_pipeline.py +0 -143
- snowflake/snowpark_connect/includes/python/pyspark/ml/tests/tuning/test_tuning.py +0 -551
- snowflake/snowpark_connect/includes/python/pyspark/ml/tests/tuning/test_tvs_io_basic.py +0 -137
- snowflake/snowpark_connect/includes/python/pyspark/ml/tests/tuning/test_tvs_io_nested.py +0 -96
- snowflake/snowpark_connect/includes/python/pyspark/ml/tests/tuning/test_tvs_io_pipeline.py +0 -142
- snowflake/snowpark_connect/includes/python/pyspark/ml/torch/tests/__init__.py +0 -16
- snowflake/snowpark_connect/includes/python/pyspark/ml/torch/tests/test_data_loader.py +0 -137
- snowflake/snowpark_connect/includes/python/pyspark/ml/torch/tests/test_distributor.py +0 -561
- snowflake/snowpark_connect/includes/python/pyspark/ml/torch/tests/test_log_communication.py +0 -172
- snowflake/snowpark_connect/includes/python/pyspark/mllib/tests/__init__.py +0 -16
- snowflake/snowpark_connect/includes/python/pyspark/mllib/tests/test_algorithms.py +0 -353
- snowflake/snowpark_connect/includes/python/pyspark/mllib/tests/test_feature.py +0 -192
- snowflake/snowpark_connect/includes/python/pyspark/mllib/tests/test_linalg.py +0 -680
- snowflake/snowpark_connect/includes/python/pyspark/mllib/tests/test_stat.py +0 -206
- snowflake/snowpark_connect/includes/python/pyspark/mllib/tests/test_streaming_algorithms.py +0 -471
- snowflake/snowpark_connect/includes/python/pyspark/mllib/tests/test_util.py +0 -108
- snowflake/snowpark_connect/includes/python/pyspark/pandas/spark/__init__.py +0 -16
- snowflake/snowpark_connect/includes/python/pyspark/pandas/spark/accessors.py +0 -1281
- snowflake/snowpark_connect/includes/python/pyspark/pandas/spark/functions.py +0 -203
- snowflake/snowpark_connect/includes/python/pyspark/pandas/spark/utils.py +0 -202
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/__init__.py +0 -16
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/computation/__init__.py +0 -16
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/computation/test_any_all.py +0 -177
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/computation/test_apply_func.py +0 -575
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/computation/test_binary_ops.py +0 -235
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/computation/test_combine.py +0 -653
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/computation/test_compute.py +0 -463
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/computation/test_corrwith.py +0 -86
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/computation/test_cov.py +0 -151
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/computation/test_cumulative.py +0 -139
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/computation/test_describe.py +0 -458
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/computation/test_eval.py +0 -86
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/computation/test_melt.py +0 -202
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/computation/test_missing_data.py +0 -520
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/computation/test_pivot.py +0 -361
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/__init__.py +0 -16
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/computation/__init__.py +0 -16
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/computation/test_parity_any_all.py +0 -40
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/computation/test_parity_apply_func.py +0 -42
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/computation/test_parity_binary_ops.py +0 -40
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/computation/test_parity_combine.py +0 -37
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/computation/test_parity_compute.py +0 -60
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/computation/test_parity_corrwith.py +0 -40
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/computation/test_parity_cov.py +0 -40
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/computation/test_parity_cumulative.py +0 -90
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/computation/test_parity_describe.py +0 -40
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/computation/test_parity_eval.py +0 -40
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/computation/test_parity_melt.py +0 -40
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/computation/test_parity_missing_data.py +0 -42
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/computation/test_parity_pivot.py +0 -37
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/data_type_ops/__init__.py +0 -16
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/data_type_ops/test_parity_base.py +0 -36
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/data_type_ops/test_parity_binary_ops.py +0 -42
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/data_type_ops/test_parity_boolean_ops.py +0 -47
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/data_type_ops/test_parity_categorical_ops.py +0 -55
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/data_type_ops/test_parity_complex_ops.py +0 -40
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/data_type_ops/test_parity_date_ops.py +0 -47
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/data_type_ops/test_parity_datetime_ops.py +0 -47
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/data_type_ops/test_parity_null_ops.py +0 -42
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/data_type_ops/test_parity_num_arithmetic.py +0 -43
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/data_type_ops/test_parity_num_ops.py +0 -47
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/data_type_ops/test_parity_num_reverse.py +0 -43
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/data_type_ops/test_parity_string_ops.py +0 -47
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/data_type_ops/test_parity_timedelta_ops.py +0 -47
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/data_type_ops/test_parity_udt_ops.py +0 -40
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/data_type_ops/testing_utils.py +0 -226
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/diff_frames_ops/__init__.py +0 -16
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/diff_frames_ops/test_parity_align.py +0 -39
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/diff_frames_ops/test_parity_basic_slow.py +0 -55
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/diff_frames_ops/test_parity_cov_corrwith.py +0 -39
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/diff_frames_ops/test_parity_dot_frame.py +0 -39
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/diff_frames_ops/test_parity_dot_series.py +0 -39
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/diff_frames_ops/test_parity_index.py +0 -39
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/diff_frames_ops/test_parity_series.py +0 -39
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/diff_frames_ops/test_parity_setitem_frame.py +0 -43
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/diff_frames_ops/test_parity_setitem_series.py +0 -43
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/frame/__init__.py +0 -16
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/frame/test_parity_attrs.py +0 -40
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/frame/test_parity_constructor.py +0 -39
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/frame/test_parity_conversion.py +0 -42
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/frame/test_parity_reindexing.py +0 -42
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/frame/test_parity_reshaping.py +0 -37
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/frame/test_parity_spark.py +0 -40
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/frame/test_parity_take.py +0 -42
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/frame/test_parity_time_series.py +0 -48
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/frame/test_parity_truncate.py +0 -40
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/groupby/__init__.py +0 -16
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/groupby/test_parity_aggregate.py +0 -40
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/groupby/test_parity_apply_func.py +0 -41
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/groupby/test_parity_cumulative.py +0 -67
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/groupby/test_parity_describe.py +0 -40
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/groupby/test_parity_groupby.py +0 -55
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/groupby/test_parity_head_tail.py +0 -40
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/groupby/test_parity_index.py +0 -38
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/groupby/test_parity_missing_data.py +0 -55
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/groupby/test_parity_split_apply.py +0 -39
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/groupby/test_parity_stat.py +0 -38
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/indexes/__init__.py +0 -16
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/indexes/test_parity_align.py +0 -40
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/indexes/test_parity_base.py +0 -50
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/indexes/test_parity_category.py +0 -73
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/indexes/test_parity_datetime.py +0 -39
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/indexes/test_parity_indexing.py +0 -40
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/indexes/test_parity_reindex.py +0 -40
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/indexes/test_parity_rename.py +0 -40
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/indexes/test_parity_reset_index.py +0 -48
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/indexes/test_parity_timedelta.py +0 -39
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/io/__init__.py +0 -16
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/io/test_parity_io.py +0 -40
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/plot/__init__.py +0 -16
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/plot/test_parity_frame_plot.py +0 -45
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/plot/test_parity_frame_plot_matplotlib.py +0 -45
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/plot/test_parity_frame_plot_plotly.py +0 -49
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/plot/test_parity_series_plot.py +0 -37
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/plot/test_parity_series_plot_matplotlib.py +0 -53
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/plot/test_parity_series_plot_plotly.py +0 -45
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/series/__init__.py +0 -16
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/series/test_parity_all_any.py +0 -38
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/series/test_parity_arg_ops.py +0 -37
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/series/test_parity_as_of.py +0 -37
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/series/test_parity_as_type.py +0 -38
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/series/test_parity_compute.py +0 -37
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/series/test_parity_conversion.py +0 -40
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/series/test_parity_cumulative.py +0 -40
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/series/test_parity_index.py +0 -38
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/series/test_parity_missing_data.py +0 -40
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/series/test_parity_series.py +0 -37
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/series/test_parity_sort.py +0 -38
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/series/test_parity_stat.py +0 -38
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/test_parity_categorical.py +0 -66
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/test_parity_config.py +0 -37
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/test_parity_csv.py +0 -37
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/test_parity_dataframe_conversion.py +0 -42
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/test_parity_dataframe_spark_io.py +0 -39
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/test_parity_default_index.py +0 -49
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/test_parity_ewm.py +0 -37
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/test_parity_expanding.py +0 -39
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/test_parity_extension.py +0 -49
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/test_parity_frame_spark.py +0 -53
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/test_parity_generic_functions.py +0 -43
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/test_parity_indexing.py +0 -49
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/test_parity_indexops_spark.py +0 -39
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/test_parity_internal.py +0 -41
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/test_parity_namespace.py +0 -39
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/test_parity_numpy_compat.py +0 -60
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/test_parity_ops_on_diff_frames.py +0 -48
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/test_parity_ops_on_diff_frames_groupby.py +0 -39
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/test_parity_ops_on_diff_frames_groupby_expanding.py +0 -44
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/test_parity_ops_on_diff_frames_groupby_rolling.py +0 -84
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/test_parity_repr.py +0 -37
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/test_parity_resample.py +0 -45
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/test_parity_reshape.py +0 -39
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/test_parity_rolling.py +0 -39
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/test_parity_scalars.py +0 -37
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/test_parity_series_conversion.py +0 -39
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/test_parity_series_datetime.py +0 -39
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/test_parity_series_string.py +0 -39
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/test_parity_spark_functions.py +0 -39
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/test_parity_sql.py +0 -43
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/test_parity_stats.py +0 -37
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/test_parity_typedef.py +0 -36
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/test_parity_utils.py +0 -37
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/connect/test_parity_window.py +0 -39
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/data_type_ops/__init__.py +0 -16
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/data_type_ops/test_base.py +0 -107
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/data_type_ops/test_binary_ops.py +0 -224
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/data_type_ops/test_boolean_ops.py +0 -825
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/data_type_ops/test_categorical_ops.py +0 -562
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/data_type_ops/test_complex_ops.py +0 -368
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/data_type_ops/test_date_ops.py +0 -257
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/data_type_ops/test_datetime_ops.py +0 -260
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/data_type_ops/test_null_ops.py +0 -178
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/data_type_ops/test_num_arithmetic.py +0 -184
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/data_type_ops/test_num_ops.py +0 -497
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/data_type_ops/test_num_reverse.py +0 -140
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/data_type_ops/test_string_ops.py +0 -354
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/data_type_ops/test_timedelta_ops.py +0 -219
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/data_type_ops/test_udt_ops.py +0 -192
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/data_type_ops/testing_utils.py +0 -228
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/diff_frames_ops/__init__.py +0 -16
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/diff_frames_ops/test_align.py +0 -118
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/diff_frames_ops/test_basic_slow.py +0 -198
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/diff_frames_ops/test_cov_corrwith.py +0 -181
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/diff_frames_ops/test_dot_frame.py +0 -103
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/diff_frames_ops/test_dot_series.py +0 -141
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/diff_frames_ops/test_index.py +0 -109
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/diff_frames_ops/test_series.py +0 -136
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/diff_frames_ops/test_setitem_frame.py +0 -125
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/diff_frames_ops/test_setitem_series.py +0 -217
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/frame/__init__.py +0 -16
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/frame/test_attrs.py +0 -384
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/frame/test_constructor.py +0 -598
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/frame/test_conversion.py +0 -73
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/frame/test_reindexing.py +0 -869
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/frame/test_reshaping.py +0 -487
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/frame/test_spark.py +0 -309
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/frame/test_take.py +0 -156
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/frame/test_time_series.py +0 -149
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/frame/test_truncate.py +0 -163
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/groupby/__init__.py +0 -16
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/groupby/test_aggregate.py +0 -311
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/groupby/test_apply_func.py +0 -524
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/groupby/test_cumulative.py +0 -419
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/groupby/test_describe.py +0 -144
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/groupby/test_groupby.py +0 -979
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/groupby/test_head_tail.py +0 -234
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/groupby/test_index.py +0 -206
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/groupby/test_missing_data.py +0 -421
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/groupby/test_split_apply.py +0 -187
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/groupby/test_stat.py +0 -397
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/indexes/__init__.py +0 -16
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/indexes/test_align.py +0 -100
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/indexes/test_base.py +0 -2743
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/indexes/test_category.py +0 -484
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/indexes/test_datetime.py +0 -276
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/indexes/test_indexing.py +0 -432
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/indexes/test_reindex.py +0 -310
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/indexes/test_rename.py +0 -257
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/indexes/test_reset_index.py +0 -160
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/indexes/test_timedelta.py +0 -128
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/io/__init__.py +0 -16
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/io/test_io.py +0 -137
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/plot/__init__.py +0 -16
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/plot/test_frame_plot.py +0 -170
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/plot/test_frame_plot_matplotlib.py +0 -547
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/plot/test_frame_plot_plotly.py +0 -285
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/plot/test_series_plot.py +0 -106
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/plot/test_series_plot_matplotlib.py +0 -409
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/plot/test_series_plot_plotly.py +0 -247
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/series/__init__.py +0 -16
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/series/test_all_any.py +0 -105
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/series/test_arg_ops.py +0 -197
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/series/test_as_of.py +0 -137
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/series/test_as_type.py +0 -227
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/series/test_compute.py +0 -634
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/series/test_conversion.py +0 -88
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/series/test_cumulative.py +0 -139
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/series/test_index.py +0 -475
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/series/test_missing_data.py +0 -265
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/series/test_series.py +0 -818
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/series/test_sort.py +0 -162
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/series/test_stat.py +0 -780
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/test_categorical.py +0 -741
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/test_config.py +0 -160
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/test_csv.py +0 -453
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/test_dataframe_conversion.py +0 -281
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/test_dataframe_spark_io.py +0 -487
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/test_default_index.py +0 -109
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/test_ewm.py +0 -434
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/test_expanding.py +0 -253
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/test_extension.py +0 -152
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/test_frame_spark.py +0 -162
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/test_generic_functions.py +0 -234
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/test_indexing.py +0 -1339
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/test_indexops_spark.py +0 -82
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/test_internal.py +0 -124
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/test_namespace.py +0 -638
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/test_numpy_compat.py +0 -200
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/test_ops_on_diff_frames.py +0 -1355
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/test_ops_on_diff_frames_groupby.py +0 -655
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/test_ops_on_diff_frames_groupby_expanding.py +0 -113
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/test_ops_on_diff_frames_groupby_rolling.py +0 -118
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/test_repr.py +0 -192
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/test_resample.py +0 -346
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/test_reshape.py +0 -495
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/test_rolling.py +0 -263
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/test_scalars.py +0 -59
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/test_series_conversion.py +0 -85
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/test_series_datetime.py +0 -364
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/test_series_string.py +0 -362
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/test_spark_functions.py +0 -46
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/test_sql.py +0 -123
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/test_stats.py +0 -581
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/test_typedef.py +0 -447
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/test_utils.py +0 -301
- snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/test_window.py +0 -465
- snowflake/snowpark_connect/includes/python/pyspark/resource/tests/__init__.py +0 -16
- snowflake/snowpark_connect/includes/python/pyspark/resource/tests/test_resources.py +0 -83
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/__init__.py +0 -16
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/connect/__init__.py +0 -16
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/connect/client/__init__.py +0 -16
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/connect/client/test_artifact.py +0 -420
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/connect/client/test_client.py +0 -358
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/connect/streaming/__init__.py +0 -16
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/connect/streaming/test_parity_foreach.py +0 -36
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/connect/streaming/test_parity_foreach_batch.py +0 -44
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/connect/streaming/test_parity_listener.py +0 -116
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/connect/streaming/test_parity_streaming.py +0 -35
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/connect/test_connect_basic.py +0 -3612
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/connect/test_connect_column.py +0 -1042
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/connect/test_connect_function.py +0 -2381
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/connect/test_connect_plan.py +0 -1060
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/connect/test_parity_arrow.py +0 -163
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/connect/test_parity_arrow_map.py +0 -38
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/connect/test_parity_arrow_python_udf.py +0 -48
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/connect/test_parity_catalog.py +0 -36
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/connect/test_parity_column.py +0 -55
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/connect/test_parity_conf.py +0 -36
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/connect/test_parity_dataframe.py +0 -96
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/connect/test_parity_datasources.py +0 -44
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/connect/test_parity_errors.py +0 -36
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/connect/test_parity_functions.py +0 -59
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/connect/test_parity_group.py +0 -36
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/connect/test_parity_pandas_cogrouped_map.py +0 -59
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/connect/test_parity_pandas_grouped_map.py +0 -74
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/connect/test_parity_pandas_grouped_map_with_state.py +0 -62
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/connect/test_parity_pandas_map.py +0 -58
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/connect/test_parity_pandas_udf.py +0 -70
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/connect/test_parity_pandas_udf_grouped_agg.py +0 -50
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/connect/test_parity_pandas_udf_scalar.py +0 -68
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/connect/test_parity_pandas_udf_window.py +0 -40
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/connect/test_parity_readwriter.py +0 -46
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/connect/test_parity_serde.py +0 -44
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/connect/test_parity_types.py +0 -100
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/connect/test_parity_udf.py +0 -100
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/connect/test_parity_udtf.py +0 -163
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/connect/test_session.py +0 -181
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/connect/test_utils.py +0 -42
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/pandas/__init__.py +0 -16
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/pandas/test_pandas_cogrouped_map.py +0 -623
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/pandas/test_pandas_grouped_map.py +0 -869
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/pandas/test_pandas_grouped_map_with_state.py +0 -342
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/pandas/test_pandas_map.py +0 -436
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/pandas/test_pandas_udf.py +0 -363
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/pandas/test_pandas_udf_grouped_agg.py +0 -592
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/pandas/test_pandas_udf_scalar.py +0 -1503
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/pandas/test_pandas_udf_typehints.py +0 -392
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/pandas/test_pandas_udf_typehints_with_future_annotations.py +0 -375
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/pandas/test_pandas_udf_window.py +0 -411
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/streaming/__init__.py +0 -16
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/streaming/test_streaming.py +0 -401
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/streaming/test_streaming_foreach.py +0 -295
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/streaming/test_streaming_foreach_batch.py +0 -106
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/streaming/test_streaming_listener.py +0 -558
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/test_arrow.py +0 -1346
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/test_arrow_map.py +0 -182
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/test_arrow_python_udf.py +0 -202
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/test_catalog.py +0 -503
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/test_column.py +0 -225
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/test_conf.py +0 -83
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/test_context.py +0 -201
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/test_dataframe.py +0 -1931
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/test_datasources.py +0 -256
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/test_errors.py +0 -69
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/test_functions.py +0 -1349
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/test_group.py +0 -53
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/test_pandas_sqlmetrics.py +0 -68
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/test_readwriter.py +0 -283
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/test_serde.py +0 -155
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/test_session.py +0 -412
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/test_types.py +0 -1581
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/test_udf.py +0 -961
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/test_udf_profiler.py +0 -165
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/test_udtf.py +0 -1456
- snowflake/snowpark_connect/includes/python/pyspark/sql/tests/test_utils.py +0 -1686
- snowflake/snowpark_connect/includes/python/pyspark/streaming/tests/__init__.py +0 -16
- snowflake/snowpark_connect/includes/python/pyspark/streaming/tests/test_context.py +0 -184
- snowflake/snowpark_connect/includes/python/pyspark/streaming/tests/test_dstream.py +0 -706
- snowflake/snowpark_connect/includes/python/pyspark/streaming/tests/test_kinesis.py +0 -118
- snowflake/snowpark_connect/includes/python/pyspark/streaming/tests/test_listener.py +0 -160
- snowflake/snowpark_connect/includes/python/pyspark/tests/__init__.py +0 -16
- snowflake/snowpark_connect/includes/python/pyspark/tests/test_appsubmit.py +0 -306
- snowflake/snowpark_connect/includes/python/pyspark/tests/test_broadcast.py +0 -196
- snowflake/snowpark_connect/includes/python/pyspark/tests/test_conf.py +0 -44
- snowflake/snowpark_connect/includes/python/pyspark/tests/test_context.py +0 -346
- snowflake/snowpark_connect/includes/python/pyspark/tests/test_daemon.py +0 -89
- snowflake/snowpark_connect/includes/python/pyspark/tests/test_install_spark.py +0 -124
- snowflake/snowpark_connect/includes/python/pyspark/tests/test_join.py +0 -69
- snowflake/snowpark_connect/includes/python/pyspark/tests/test_memory_profiler.py +0 -167
- snowflake/snowpark_connect/includes/python/pyspark/tests/test_pin_thread.py +0 -194
- snowflake/snowpark_connect/includes/python/pyspark/tests/test_profiler.py +0 -168
- snowflake/snowpark_connect/includes/python/pyspark/tests/test_rdd.py +0 -939
- snowflake/snowpark_connect/includes/python/pyspark/tests/test_rddbarrier.py +0 -52
- snowflake/snowpark_connect/includes/python/pyspark/tests/test_rddsampler.py +0 -66
- snowflake/snowpark_connect/includes/python/pyspark/tests/test_readwrite.py +0 -368
- snowflake/snowpark_connect/includes/python/pyspark/tests/test_serializers.py +0 -257
- snowflake/snowpark_connect/includes/python/pyspark/tests/test_shuffle.py +0 -267
- snowflake/snowpark_connect/includes/python/pyspark/tests/test_stage_sched.py +0 -153
- snowflake/snowpark_connect/includes/python/pyspark/tests/test_statcounter.py +0 -130
- snowflake/snowpark_connect/includes/python/pyspark/tests/test_taskcontext.py +0 -350
- snowflake/snowpark_connect/includes/python/pyspark/tests/test_util.py +0 -97
- snowflake/snowpark_connect/includes/python/pyspark/tests/test_worker.py +0 -271
- snowpark_connect-0.24.0.dist-info/RECORD +0 -898
- {snowpark_connect-0.24.0.data → snowpark_connect-0.26.0.data}/scripts/snowpark-connect +0 -0
- {snowpark_connect-0.24.0.data → snowpark_connect-0.26.0.data}/scripts/snowpark-session +0 -0
- {snowpark_connect-0.24.0.data → snowpark_connect-0.26.0.data}/scripts/snowpark-submit +0 -0
- {snowpark_connect-0.24.0.dist-info → snowpark_connect-0.26.0.dist-info}/WHEEL +0 -0
- {snowpark_connect-0.24.0.dist-info → snowpark_connect-0.26.0.dist-info}/licenses/LICENSE-binary +0 -0
- {snowpark_connect-0.24.0.dist-info → snowpark_connect-0.26.0.dist-info}/licenses/LICENSE.txt +0 -0
- {snowpark_connect-0.24.0.dist-info → snowpark_connect-0.26.0.dist-info}/licenses/NOTICE-binary +0 -0
- {snowpark_connect-0.24.0.dist-info → snowpark_connect-0.26.0.dist-info}/top_level.txt +0 -0
|
@@ -20,7 +20,11 @@ from snowflake.snowpark._internal.analyzer.analyzer_utils import (
|
|
|
20
20
|
from snowflake.snowpark._internal.utils import quote_name
|
|
21
21
|
from snowflake.snowpark.types import StructType
|
|
22
22
|
from snowflake.snowpark_connect.config import global_config
|
|
23
|
+
from snowflake.snowpark_connect.hidden_column import HiddenColumn
|
|
23
24
|
from snowflake.snowpark_connect.utils.context import get_current_operation_scope
|
|
25
|
+
from snowflake.snowpark_connect.utils.identifiers import (
|
|
26
|
+
split_fully_qualified_spark_name,
|
|
27
|
+
)
|
|
24
28
|
|
|
25
29
|
ALREADY_QUOTED = re.compile('^(".+")$', re.DOTALL)
|
|
26
30
|
|
|
@@ -84,6 +88,8 @@ class ColumnNames:
|
|
|
84
88
|
spark_name: str
|
|
85
89
|
snowpark_name: str
|
|
86
90
|
qualifiers: list[str]
|
|
91
|
+
catalog_info: str | None = None # Catalog from fully qualified name
|
|
92
|
+
database_info: str | None = None # Database from fully qualified name
|
|
87
93
|
|
|
88
94
|
|
|
89
95
|
def get_list_of_spark_names_for_column(column_names: ColumnNames) -> list[str]:
|
|
@@ -118,6 +124,7 @@ class ColumnNameMap:
|
|
|
118
124
|
] = lambda: global_config.spark_sql_caseSensitive,
|
|
119
125
|
column_metadata: dict | None = None,
|
|
120
126
|
column_qualifiers: list[list[str]] | None = None,
|
|
127
|
+
hidden_columns: set[HiddenColumn] | None = None,
|
|
121
128
|
parent_column_name_map: ColumnNameMap | None = None,
|
|
122
129
|
) -> None:
|
|
123
130
|
"""
|
|
@@ -128,6 +135,7 @@ class ColumnNameMap:
|
|
|
128
135
|
The key is the original Spark column name, and the value is the metadata.
|
|
129
136
|
example: Dict('age', {'foo': 'bar'})
|
|
130
137
|
column_qualifiers: Optional qualifiers for the columns, used to handle table aliases or DataFrame aliases.
|
|
138
|
+
hidden_columns: Optional set of HiddenColumn objects.
|
|
131
139
|
parent_column_name_map: parent ColumnNameMap
|
|
132
140
|
"""
|
|
133
141
|
self.columns: list[ColumnNames] = []
|
|
@@ -136,6 +144,7 @@ class ColumnNameMap:
|
|
|
136
144
|
self.snowpark_to_col = defaultdict(list)
|
|
137
145
|
self.is_case_sensitive = is_case_sensitive
|
|
138
146
|
self.column_metadata = column_metadata
|
|
147
|
+
self.hidden_columns = hidden_columns
|
|
139
148
|
|
|
140
149
|
# Rename chain dictionary to track column renaming history
|
|
141
150
|
self.rename_chains: dict[str, str] = {} # old_name -> new_name mapping
|
|
@@ -152,10 +161,27 @@ class ColumnNameMap:
|
|
|
152
161
|
)
|
|
153
162
|
|
|
154
163
|
for i in range(len(spark_column_names)):
|
|
164
|
+
# Extract catalog/database info from fully qualified spark column names
|
|
165
|
+
spark_name = spark_column_names[i]
|
|
166
|
+
catalog_info = None
|
|
167
|
+
database_info = None
|
|
168
|
+
|
|
169
|
+
# Parse fully qualified names to extract catalog.database.table.column format
|
|
170
|
+
name_parts = split_fully_qualified_spark_name(spark_name)
|
|
171
|
+
if len(name_parts) >= 4:
|
|
172
|
+
# Format: catalog.database.table.column[.field...]
|
|
173
|
+
# Only extract if this looks like a valid SQL table reference
|
|
174
|
+
# Catalog.database.column (3 parts) is invalid - missing table
|
|
175
|
+
# Only catalog.database.table.column (4+ parts) is potentially valid
|
|
176
|
+
catalog_info = name_parts[0]
|
|
177
|
+
database_info = name_parts[1]
|
|
178
|
+
|
|
155
179
|
c = ColumnNames(
|
|
156
|
-
spark_name=
|
|
180
|
+
spark_name=spark_name,
|
|
157
181
|
snowpark_name=snowpark_column_names[i],
|
|
158
182
|
qualifiers=column_qualifiers[i] if column_qualifiers else [],
|
|
183
|
+
catalog_info=catalog_info,
|
|
184
|
+
database_info=database_info,
|
|
159
185
|
)
|
|
160
186
|
self.columns.append(c)
|
|
161
187
|
|
|
@@ -312,6 +338,8 @@ class ColumnNameMap:
|
|
|
312
338
|
*,
|
|
313
339
|
allow_non_exists: bool = False,
|
|
314
340
|
return_first: bool = False,
|
|
341
|
+
is_qualified: bool = False,
|
|
342
|
+
source_qualifiers: list[str] | None = None,
|
|
315
343
|
) -> str | None:
|
|
316
344
|
assert isinstance(spark_column_name, str)
|
|
317
345
|
resolved_name = (
|
|
@@ -319,9 +347,37 @@ class ColumnNameMap:
|
|
|
319
347
|
if self.rename_chains
|
|
320
348
|
else spark_column_name
|
|
321
349
|
)
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
350
|
+
|
|
351
|
+
# We need to check hidden columns first. We want to avoid the code path
|
|
352
|
+
# within get_snowpark_column_names_from_spark_column_names that checks the parent ColumnNameMap.
|
|
353
|
+
# This is because that will return the name of the using column that's been dropped from the result
|
|
354
|
+
# dataframe. We want to fetch and resolve the hidden column to its visible using column name instead.
|
|
355
|
+
# Even if this is an unqualified reference or one to the visible column, it will resolve correctly to
|
|
356
|
+
# the visible name anyway.
|
|
357
|
+
snowpark_names = []
|
|
358
|
+
# Only check hidden columns for qualified references with source qualifiers
|
|
359
|
+
if is_qualified and source_qualifiers is not None and self.hidden_columns:
|
|
360
|
+
column_name = spark_column_name
|
|
361
|
+
|
|
362
|
+
# Check each hidden column for column name AND qualifier match
|
|
363
|
+
for hidden_col in self.hidden_columns:
|
|
364
|
+
if (
|
|
365
|
+
hidden_col.spark_name == column_name
|
|
366
|
+
and hidden_col.qualifiers == source_qualifiers
|
|
367
|
+
):
|
|
368
|
+
if not global_config.spark_sql_caseSensitive:
|
|
369
|
+
if hidden_col.spark_name.upper() == column_name.upper() and [
|
|
370
|
+
q.upper() for q in hidden_col.qualifiers
|
|
371
|
+
] == [q.upper() for q in source_qualifiers]:
|
|
372
|
+
snowpark_names.append(hidden_col.visible_snowpark_name)
|
|
373
|
+
else:
|
|
374
|
+
snowpark_names.append(hidden_col.visible_snowpark_name)
|
|
375
|
+
|
|
376
|
+
# If not found in hidden columns, proceed with normal lookup
|
|
377
|
+
if not snowpark_names:
|
|
378
|
+
snowpark_names = self.get_snowpark_column_names_from_spark_column_names(
|
|
379
|
+
[resolved_name], return_first
|
|
380
|
+
)
|
|
325
381
|
|
|
326
382
|
snowpark_names_len = len(snowpark_names)
|
|
327
383
|
if snowpark_names_len > 1:
|
|
@@ -408,6 +464,27 @@ class ColumnNameMap:
|
|
|
408
464
|
snowpark_columns.append(c.snowpark_name)
|
|
409
465
|
qualifiers.append(c.qualifiers)
|
|
410
466
|
|
|
467
|
+
# Note: The following code is commented out because there is a bug with handling duplicate columns in
|
|
468
|
+
# qualified select *'s. This needs to be revisited once a solution for that is found.
|
|
469
|
+
# TODO: https://snowflakecomputing.atlassian.net/browse/SNOW-2265240
|
|
470
|
+
|
|
471
|
+
# # Handles fetching/resolving the hidden columns if they also match the qualifiers
|
|
472
|
+
# # This method is only ever called for qualified references, so we need to check hidden columns as well.
|
|
473
|
+
# if self.hidden_columns:
|
|
474
|
+
# for hidden_col in self.hidden_columns:
|
|
475
|
+
# col_qualifiers = (
|
|
476
|
+
# [q.upper() for q in hidden_col.qualifiers]
|
|
477
|
+
# if not self.is_case_sensitive()
|
|
478
|
+
# else hidden_col.qualifiers
|
|
479
|
+
# )
|
|
480
|
+
# if len(col_qualifiers) < len(qualifiers_input):
|
|
481
|
+
# continue
|
|
482
|
+
# if col_qualifiers[-len(qualifiers_input) :] == qualifiers_input:
|
|
483
|
+
# # This hidden column matches! Add it to the results
|
|
484
|
+
# spark_columns.append(hidden_col.spark_name)
|
|
485
|
+
# snowpark_columns.append(hidden_col.visible_snowpark_name)
|
|
486
|
+
# qualifiers.append(hidden_col.qualifiers)
|
|
487
|
+
|
|
411
488
|
return spark_columns, snowpark_columns, qualifiers
|
|
412
489
|
|
|
413
490
|
def get_snowpark_columns(self) -> list[str]:
|
|
@@ -539,6 +616,35 @@ class ColumnNameMap:
|
|
|
539
616
|
else:
|
|
540
617
|
return spark_name.upper()
|
|
541
618
|
|
|
619
|
+
def is_hidden_column_reference(
|
|
620
|
+
self, spark_column_name: str, source_qualifiers: list[str] | None = None
|
|
621
|
+
) -> bool:
|
|
622
|
+
"""
|
|
623
|
+
Check if a column reference would be resolved through hidden columns.
|
|
624
|
+
"""
|
|
625
|
+
if not self.hidden_columns or source_qualifiers is None:
|
|
626
|
+
return False
|
|
627
|
+
|
|
628
|
+
# For qualified references with source_qualifiers
|
|
629
|
+
column_name = (
|
|
630
|
+
spark_column_name # When has_plan_id=True, this is just the column name
|
|
631
|
+
)
|
|
632
|
+
|
|
633
|
+
for hidden_col in self.hidden_columns:
|
|
634
|
+
if (
|
|
635
|
+
hidden_col.spark_name == column_name
|
|
636
|
+
and hidden_col.qualifiers == source_qualifiers
|
|
637
|
+
):
|
|
638
|
+
if not global_config.spark_sql_caseSensitive:
|
|
639
|
+
if hidden_col.spark_name.upper() == column_name.upper() and [
|
|
640
|
+
q.upper() for q in hidden_col.qualifiers
|
|
641
|
+
] == [q.upper() for q in source_qualifiers]:
|
|
642
|
+
return True
|
|
643
|
+
else:
|
|
644
|
+
return True
|
|
645
|
+
|
|
646
|
+
return False
|
|
647
|
+
|
|
542
648
|
|
|
543
649
|
class JoinColumnNameMap(ColumnNameMap):
|
|
544
650
|
def __init__(
|
|
@@ -548,6 +654,9 @@ class JoinColumnNameMap(ColumnNameMap):
|
|
|
548
654
|
) -> None:
|
|
549
655
|
self.left_column_mapping: ColumnNameMap = left_colmap
|
|
550
656
|
self.right_column_mapping: ColumnNameMap = right_colmap
|
|
657
|
+
# Ensure attributes expected by base-class helpers exist to avoid AttributeError
|
|
658
|
+
# when generic code paths (e.g., hidden column checks) touch them.
|
|
659
|
+
self.hidden_columns: set[HiddenColumn] | None = None
|
|
551
660
|
|
|
552
661
|
def get_snowpark_column_name_from_spark_column_name(
|
|
553
662
|
self,
|
|
@@ -555,6 +664,9 @@ class JoinColumnNameMap(ColumnNameMap):
|
|
|
555
664
|
*,
|
|
556
665
|
allow_non_exists: bool = False,
|
|
557
666
|
return_first: bool = False,
|
|
667
|
+
# JoinColumnNameMap will never be called with using columns, so these parameters are not used.
|
|
668
|
+
is_qualified: bool = False,
|
|
669
|
+
source_qualifiers: list[str] | None = None,
|
|
558
670
|
) -> str | None:
|
|
559
671
|
snowpark_column_name_in_left = (
|
|
560
672
|
self.left_column_mapping.get_snowpark_column_name_from_spark_column_name(
|
|
@@ -19,8 +19,12 @@ from snowflake.snowpark._internal.analyzer.analyzer_utils import (
|
|
|
19
19
|
quote_name_without_upper_casing,
|
|
20
20
|
)
|
|
21
21
|
from snowflake.snowpark.exceptions import SnowparkSQLException
|
|
22
|
+
from snowflake.snowpark.types import TimestampTimeZone, TimestampType
|
|
22
23
|
from snowflake.snowpark_connect.utils.concurrent import SynchronizedDict
|
|
23
24
|
from snowflake.snowpark_connect.utils.context import get_session_id
|
|
25
|
+
from snowflake.snowpark_connect.utils.external_udxf_cache import (
|
|
26
|
+
clear_external_udxf_cache,
|
|
27
|
+
)
|
|
24
28
|
from snowflake.snowpark_connect.utils.session import get_or_create_snowpark_session
|
|
25
29
|
from snowflake.snowpark_connect.utils.snowpark_connect_logging import logger
|
|
26
30
|
from snowflake.snowpark_connect.utils.telemetry import (
|
|
@@ -135,6 +139,9 @@ class GlobalConfig:
|
|
|
135
139
|
"spark.sql.parser.quotedRegexColumnNames": "false",
|
|
136
140
|
# custom configs
|
|
137
141
|
"snowpark.connect.version": ".".join(map(str, sas_version)),
|
|
142
|
+
# Control whether repartition(n) on a DataFrame forces splitting into n files during writes
|
|
143
|
+
# This matches spark behavior more closely, but introduces overhead.
|
|
144
|
+
"snowflake.repartition.for.writes": "false",
|
|
138
145
|
}
|
|
139
146
|
|
|
140
147
|
boolean_config_list = [
|
|
@@ -147,6 +154,7 @@ class GlobalConfig:
|
|
|
147
154
|
"spark.sql.legacy.allowHashOnMapType",
|
|
148
155
|
"spark.Catalog.databaseFilterInformationSchema",
|
|
149
156
|
"spark.sql.parser.quotedRegexColumnNames",
|
|
157
|
+
"snowflake.repartition.for.writes",
|
|
150
158
|
]
|
|
151
159
|
|
|
152
160
|
int_config_list = [
|
|
@@ -591,5 +599,20 @@ def parse_imports(session: snowpark.Session, imports: str | None) -> None:
|
|
|
591
599
|
if not imports:
|
|
592
600
|
return
|
|
593
601
|
|
|
602
|
+
# UDF needs to be recreated to include new imports
|
|
603
|
+
clear_external_udxf_cache(session)
|
|
604
|
+
|
|
594
605
|
for udf_import in imports.strip("[] ").split(","):
|
|
595
606
|
session.add_import(udf_import)
|
|
607
|
+
|
|
608
|
+
|
|
609
|
+
def get_timestamp_type():
|
|
610
|
+
match global_config["spark.sql.timestampType"]:
|
|
611
|
+
case "TIMESTAMP_LTZ":
|
|
612
|
+
timestamp_type = TimestampType(TimestampTimeZone.LTZ)
|
|
613
|
+
case "TIMESTAMP_NTZ":
|
|
614
|
+
timestamp_type = TimestampType(TimestampTimeZone.NTZ)
|
|
615
|
+
case _:
|
|
616
|
+
# shouldn't happen since `spark.sql.timestampType` is always defined, and `spark.conf.unset` sets it to default (TIMESTAMP_LTZ)
|
|
617
|
+
timestamp_type = TimestampType(TimestampTimeZone.LTZ)
|
|
618
|
+
return timestamp_type
|
|
@@ -13,35 +13,6 @@ STRUCTURED_TYPES_ENABLED = True
|
|
|
13
13
|
# UDF evaluation types
|
|
14
14
|
MAP_IN_ARROW_EVAL_TYPE = 207 # eval_type for mapInArrow operations
|
|
15
15
|
|
|
16
|
-
SPARK_TZ_ABBREVIATIONS_OVERRIDES = {
|
|
17
|
-
"ACT": "Australia/Darwin",
|
|
18
|
-
"AET": "Australia/Sydney",
|
|
19
|
-
"AGT": "America/Argentina/Buenos_Aires",
|
|
20
|
-
"ART": "Africa/Cairo",
|
|
21
|
-
"AST": "America/Anchorage",
|
|
22
|
-
"BET": "America/Sao_Paulo",
|
|
23
|
-
"BST": "Asia/Dhaka",
|
|
24
|
-
"CAT": "Africa/Harare",
|
|
25
|
-
"CNT": "America/St_Johns",
|
|
26
|
-
"CST": "America/Chicago",
|
|
27
|
-
"CTT": "Asia/Shanghai",
|
|
28
|
-
"EAT": "Africa/Addis_Ababa",
|
|
29
|
-
"ECT": "Europe/Paris",
|
|
30
|
-
"IET": "America/Indiana/Indianapolis",
|
|
31
|
-
"IST": "Asia/Kolkata",
|
|
32
|
-
"JST": "Asia/Tokyo",
|
|
33
|
-
"MIT": "Pacific/Apia",
|
|
34
|
-
"NET": "Asia/Yerevan",
|
|
35
|
-
"NST": "Pacific/Auckland",
|
|
36
|
-
"PLT": "Asia/Karachi",
|
|
37
|
-
"PNT": "America/Phoenix",
|
|
38
|
-
"PRT": "America/Puerto_Rico",
|
|
39
|
-
"PST": "America/Los_Angeles",
|
|
40
|
-
"SST": "Pacific/Guadalcanal",
|
|
41
|
-
"VST": "Asia/Ho_Chi_Minh",
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
|
|
45
16
|
COLUMN_METADATA_COLLISION_KEY = "{expr_id}_{key}"
|
|
46
17
|
|
|
47
18
|
DUPLICATE_KEY_FOUND_ERROR_TEMPLATE = "Duplicate key found: {key}. You can set spark.sql.mapKeyDedupPolicy to LAST_WIN to deduplicate map keys with last wins policy."
|
|
@@ -8,6 +8,7 @@ from typing import TYPE_CHECKING, Callable
|
|
|
8
8
|
|
|
9
9
|
from snowflake import snowpark
|
|
10
10
|
from snowflake.snowpark.types import StructField, StructType
|
|
11
|
+
from snowflake.snowpark_connect.hidden_column import HiddenColumn
|
|
11
12
|
|
|
12
13
|
if TYPE_CHECKING:
|
|
13
14
|
from snowflake.snowpark_connect.column_name_handler import ColumnNameMap
|
|
@@ -28,6 +29,7 @@ class DataFrameContainer:
|
|
|
28
29
|
table_name: str | None = None,
|
|
29
30
|
alias: str | None = None,
|
|
30
31
|
cached_schema_getter: Callable[[], StructType] | None = None,
|
|
32
|
+
partition_hint: int | None = None,
|
|
31
33
|
) -> None:
|
|
32
34
|
"""
|
|
33
35
|
Initialize a new DataFrameContainer.
|
|
@@ -38,11 +40,13 @@ class DataFrameContainer:
|
|
|
38
40
|
table_name: Optional table name for the DataFrame
|
|
39
41
|
alias: Optional alias for the DataFrame
|
|
40
42
|
cached_schema_getter: Optional function to get cached schema
|
|
43
|
+
partition_hint: Optional partition count from repartition() operations
|
|
41
44
|
"""
|
|
42
45
|
self._dataframe = dataframe
|
|
43
46
|
self._column_map = self._create_default_column_map(column_map)
|
|
44
47
|
self._table_name = table_name
|
|
45
48
|
self._alias = alias
|
|
49
|
+
self._partition_hint = partition_hint
|
|
46
50
|
|
|
47
51
|
if cached_schema_getter is not None:
|
|
48
52
|
self._apply_cached_schema_getter(cached_schema_getter)
|
|
@@ -57,9 +61,11 @@ class DataFrameContainer:
|
|
|
57
61
|
column_metadata: dict | None = None,
|
|
58
62
|
column_qualifiers: list[list[str]] | None = None,
|
|
59
63
|
parent_column_name_map: ColumnNameMap | None = None,
|
|
64
|
+
hidden_columns: set[HiddenColumn] | None = None,
|
|
60
65
|
table_name: str | None = None,
|
|
61
66
|
alias: str | None = None,
|
|
62
67
|
cached_schema_getter: Callable[[], StructType] | None = None,
|
|
68
|
+
partition_hint: int | None = None,
|
|
63
69
|
) -> DataFrameContainer:
|
|
64
70
|
"""
|
|
65
71
|
Create a new container with complete column mapping configuration.
|
|
@@ -72,9 +78,11 @@ class DataFrameContainer:
|
|
|
72
78
|
column_metadata: Optional metadata dictionary
|
|
73
79
|
column_qualifiers: Optional column qualifiers
|
|
74
80
|
parent_column_name_map: Optional parent column name map
|
|
81
|
+
hidden_columns: Optional list of hidden column names
|
|
75
82
|
table_name: Optional table name
|
|
76
83
|
alias: Optional alias
|
|
77
84
|
cached_schema_getter: Optional function to get cached schema
|
|
85
|
+
partition_hint: Optional partition count from repartition() operations
|
|
78
86
|
|
|
79
87
|
Returns:
|
|
80
88
|
A new DataFrameContainer instance
|
|
@@ -93,6 +101,7 @@ class DataFrameContainer:
|
|
|
93
101
|
column_metadata,
|
|
94
102
|
column_qualifiers,
|
|
95
103
|
parent_column_name_map,
|
|
104
|
+
hidden_columns,
|
|
96
105
|
)
|
|
97
106
|
|
|
98
107
|
# Determine the schema getter to use
|
|
@@ -119,6 +128,7 @@ class DataFrameContainer:
|
|
|
119
128
|
table_name=table_name,
|
|
120
129
|
alias=alias,
|
|
121
130
|
cached_schema_getter=final_schema_getter,
|
|
131
|
+
partition_hint=partition_hint,
|
|
122
132
|
)
|
|
123
133
|
|
|
124
134
|
@property
|
|
@@ -159,6 +169,16 @@ class DataFrameContainer:
|
|
|
159
169
|
"""Set the alias name."""
|
|
160
170
|
self._alias = value
|
|
161
171
|
|
|
172
|
+
@property
|
|
173
|
+
def partition_hint(self) -> int | None:
|
|
174
|
+
"""Get the partition hint count."""
|
|
175
|
+
return self._partition_hint
|
|
176
|
+
|
|
177
|
+
@partition_hint.setter
|
|
178
|
+
def partition_hint(self, value: int | None) -> None:
|
|
179
|
+
"""Set the partition hint count."""
|
|
180
|
+
self._partition_hint = value
|
|
181
|
+
|
|
162
182
|
def _create_default_column_map(
|
|
163
183
|
self, column_map: ColumnNameMap | None
|
|
164
184
|
) -> ColumnNameMap:
|
|
@@ -206,6 +226,7 @@ class DataFrameContainer:
|
|
|
206
226
|
column_metadata: dict | None = None,
|
|
207
227
|
column_qualifiers: list[list[str]] | None = None,
|
|
208
228
|
parent_column_name_map: ColumnNameMap | None = None,
|
|
229
|
+
hidden_columns: set[HiddenColumn] | None = None,
|
|
209
230
|
) -> ColumnNameMap:
|
|
210
231
|
"""Create a ColumnNameMap with the provided configuration."""
|
|
211
232
|
from snowflake.snowpark_connect.column_name_handler import ColumnNameMap
|
|
@@ -216,6 +237,7 @@ class DataFrameContainer:
|
|
|
216
237
|
column_metadata=column_metadata,
|
|
217
238
|
column_qualifiers=column_qualifiers,
|
|
218
239
|
parent_column_name_map=parent_column_name_map,
|
|
240
|
+
hidden_columns=hidden_columns,
|
|
219
241
|
)
|
|
220
242
|
|
|
221
243
|
@staticmethod
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
#
|
|
2
2
|
# Copyright (c) 2012-2025 Snowflake Computing Inc. All rights reserved.
|
|
3
3
|
#
|
|
4
|
+
import re
|
|
5
|
+
import uuid
|
|
4
6
|
from collections import Counter
|
|
5
7
|
|
|
6
8
|
import pyspark.sql.connect.proto.base_pb2 as proto_base
|
|
7
9
|
import pyspark.sql.connect.proto.relations_pb2 as relation_proto
|
|
8
10
|
|
|
11
|
+
from snowflake.snowpark import DataFrame, Session
|
|
12
|
+
from snowflake.snowpark.exceptions import SnowparkSQLException
|
|
9
13
|
from snowflake.snowpark_connect.column_name_handler import ColumnNames
|
|
10
14
|
from snowflake.snowpark_connect.config import global_config, sessions_config
|
|
11
15
|
from snowflake.snowpark_connect.constants import SERVER_SIDE_SESSION_ID
|
|
@@ -25,6 +29,10 @@ from snowflake.snowpark_connect.utils.telemetry import (
|
|
|
25
29
|
SnowparkConnectNotImplementedError,
|
|
26
30
|
)
|
|
27
31
|
|
|
32
|
+
_INTERNAL_VIEW_PREFIX = "__SC_RENAMED_V_"
|
|
33
|
+
|
|
34
|
+
_CREATE_VIEW_PATTERN = re.compile(r"create\s+or\s+replace\s+view", re.IGNORECASE)
|
|
35
|
+
|
|
28
36
|
|
|
29
37
|
def _create_column_rename_map(
|
|
30
38
|
columns: list[ColumnNames], rename_duplicated: bool
|
|
@@ -126,7 +134,14 @@ def map_execution_command(
|
|
|
126
134
|
]
|
|
127
135
|
|
|
128
136
|
if req.replace:
|
|
129
|
-
|
|
137
|
+
try:
|
|
138
|
+
input_df.create_or_replace_temp_view(view_name)
|
|
139
|
+
except SnowparkSQLException as exc:
|
|
140
|
+
if _is_error_caused_by_view_referencing_itself(exc):
|
|
141
|
+
# This error is caused by statement with self reference like `CREATE VIEW A AS SELECT X FROM A`.
|
|
142
|
+
_create_chained_view(input_df, view_name)
|
|
143
|
+
else:
|
|
144
|
+
raise
|
|
130
145
|
else:
|
|
131
146
|
input_df.create_temp_view(view_name)
|
|
132
147
|
case "write_stream_operation_start":
|
|
@@ -192,3 +207,43 @@ def map_execution_command(
|
|
|
192
207
|
raise SnowparkConnectNotImplementedError(
|
|
193
208
|
f"Command type {other} not implemented"
|
|
194
209
|
)
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
def _generate_random_builtin_view_name() -> str:
|
|
213
|
+
return _INTERNAL_VIEW_PREFIX + str(uuid.uuid4()).replace("-", "")
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
def _is_error_caused_by_view_referencing_itself(exc: Exception) -> bool:
|
|
217
|
+
return "view definition refers to view being defined" in str(exc).lower()
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
def _create_chained_view(input_df: DataFrame, view_name: str) -> None:
|
|
221
|
+
"""
|
|
222
|
+
In order to create a view, which references itself, Spark would here take the previous
|
|
223
|
+
definition of A and paste it in place of `FROM A`. Snowflake would fail in such case, so
|
|
224
|
+
as a workaround, we create a chain of internal views instead. This function:
|
|
225
|
+
1. Renames previous definition of A to some internal name (instead of deleting).
|
|
226
|
+
2. Adjusts the DDL of a new statement to reference the name of a renmaed internal view, instead of itself.
|
|
227
|
+
"""
|
|
228
|
+
|
|
229
|
+
session = Session.get_active_session()
|
|
230
|
+
|
|
231
|
+
view_name = ".".join(view_name)
|
|
232
|
+
|
|
233
|
+
tmp_name = _generate_random_builtin_view_name()
|
|
234
|
+
old_name_replacement = _generate_random_builtin_view_name()
|
|
235
|
+
|
|
236
|
+
input_df.create_or_replace_temp_view(tmp_name)
|
|
237
|
+
|
|
238
|
+
session.sql(f"ALTER VIEW {view_name} RENAME TO {old_name_replacement}").collect()
|
|
239
|
+
|
|
240
|
+
ddl: str = session.sql(f"SELECT GET_DDL('VIEW', '{tmp_name}')").collect()[0][0]
|
|
241
|
+
|
|
242
|
+
ddl = ddl.replace(view_name, old_name_replacement)
|
|
243
|
+
|
|
244
|
+
# GET_DDL result doesn't contain `TEMPORARY`, it's likely a bug.
|
|
245
|
+
ddl = _CREATE_VIEW_PATTERN.sub("create or replace temp view", ddl)
|
|
246
|
+
|
|
247
|
+
session.sql(ddl).collect()
|
|
248
|
+
|
|
249
|
+
session.sql(f"ALTER VIEW {tmp_name} RENAME TO {view_name}").collect()
|
|
@@ -68,13 +68,24 @@ def get_literal_field_and_name(literal: expressions_proto.Expression.Literal):
|
|
|
68
68
|
tz_dt = tz_dt.astimezone(config_tz)
|
|
69
69
|
lit_dt = lit_dt.astimezone(local_tz)
|
|
70
70
|
|
|
71
|
-
|
|
71
|
+
def _format_timestamp(dt) -> str:
|
|
72
|
+
without_micros = f"{dt.year:04d}-{dt.month:02d}-{dt.day:02d} {dt.hour:02d}:{dt.minute:02d}:{dt.second:02d}"
|
|
73
|
+
if dt.microsecond == 0:
|
|
74
|
+
return without_micros
|
|
75
|
+
else:
|
|
76
|
+
base_format = f"{without_micros}.{dt.microsecond:06d}"
|
|
77
|
+
return base_format.rstrip("0").rstrip(".")
|
|
78
|
+
|
|
79
|
+
return lit_dt, f"{t.upper()} '{_format_timestamp(tz_dt)}'"
|
|
72
80
|
case "day_time_interval":
|
|
73
81
|
# TODO(SNOW-1920942): Snowflake SQL is missing an "interval" type.
|
|
74
82
|
timedelta = datetime.timedelta(
|
|
75
83
|
seconds=literal.day_time_interval / 1_000_000
|
|
76
84
|
)
|
|
77
|
-
|
|
85
|
+
interval_seconds = f"{(literal.day_time_interval / 1_000_000):.6f}".rstrip(
|
|
86
|
+
"0"
|
|
87
|
+
).rstrip(".")
|
|
88
|
+
str_value = f"INTERVAL '{interval_seconds}' SECOND"
|
|
78
89
|
return timedelta, str_value
|
|
79
90
|
case "binary":
|
|
80
91
|
return literal.binary, str(literal.binary)
|
|
@@ -82,8 +82,10 @@ def map_cast(
|
|
|
82
82
|
match exp.cast.WhichOneof("cast_to_type"):
|
|
83
83
|
case "type":
|
|
84
84
|
to_type = proto_to_snowpark_type(exp.cast.type)
|
|
85
|
+
to_type_str = to_type.simpleString().upper()
|
|
85
86
|
case "type_str":
|
|
86
87
|
to_type = map_type_string_to_snowpark_type(exp.cast.type_str)
|
|
88
|
+
to_type_str = exp.cast.type_str.upper()
|
|
87
89
|
case _:
|
|
88
90
|
raise ValueError("No type to cast to")
|
|
89
91
|
|
|
@@ -102,7 +104,7 @@ def map_cast(
|
|
|
102
104
|
case _ if to_type.typeName().upper() in ("STRUCT", "ARRAY"):
|
|
103
105
|
col_name = new_name
|
|
104
106
|
case _ if get_is_evaluating_sql():
|
|
105
|
-
col_name = f"CAST({new_name} AS {
|
|
107
|
+
col_name = f"CAST({new_name} AS {to_type_str})"
|
|
106
108
|
case _:
|
|
107
109
|
col_name = new_name
|
|
108
110
|
|
|
@@ -121,17 +123,13 @@ def map_cast(
|
|
|
121
123
|
sanity_check(to_type, new_name, from_type, from_type_cast)
|
|
122
124
|
|
|
123
125
|
col = typed_column.col
|
|
124
|
-
# On TCM, sometimes these are StringType(x)
|
|
126
|
+
# On TCM, sometimes these are StringType(x)
|
|
125
127
|
# This normalizes them for the cast.
|
|
126
128
|
if isinstance(from_type, StringType):
|
|
127
129
|
from_type = StringType()
|
|
128
130
|
if isinstance(to_type, StringType):
|
|
129
131
|
to_type = StringType()
|
|
130
132
|
|
|
131
|
-
# todo - verify if that's correct SNOW-2248680
|
|
132
|
-
if isinstance(from_type, TimestampType):
|
|
133
|
-
from_type = TimestampType()
|
|
134
|
-
|
|
135
133
|
match (from_type, to_type):
|
|
136
134
|
case (_, _) if (from_type == to_type):
|
|
137
135
|
result_exp = col
|
|
@@ -196,9 +194,8 @@ def map_cast(
|
|
|
196
194
|
result_exp = snowpark_fn.convert_timezone(snowpark_fn.lit(zone), col).cast(
|
|
197
195
|
TimestampType(TimestampTimeZone.NTZ)
|
|
198
196
|
)
|
|
199
|
-
# todo: verify if more support for LTZ and TZ is needed - SNOW-2248680
|
|
200
197
|
case (TimestampType(), TimestampType()):
|
|
201
|
-
result_exp = col
|
|
198
|
+
result_exp = col.cast(to_type)
|
|
202
199
|
case (_, TimestampType()) if isinstance(from_type, _NumericType):
|
|
203
200
|
microseconds = col * snowpark_fn.lit(1000000)
|
|
204
201
|
result_exp = snowpark_fn.when(
|
|
@@ -15,6 +15,7 @@ from pyspark.errors.exceptions.base import AnalysisException
|
|
|
15
15
|
import snowflake.snowpark_connect.proto.snowflake_expression_ext_pb2 as snowflake_proto
|
|
16
16
|
from snowflake import snowpark
|
|
17
17
|
from snowflake.snowpark_connect.column_name_handler import ColumnNameMap
|
|
18
|
+
from snowflake.snowpark_connect.config import global_config
|
|
18
19
|
from snowflake.snowpark_connect.typed_column import TypedColumn
|
|
19
20
|
from snowflake.snowpark_connect.utils.context import (
|
|
20
21
|
get_sql_named_arg,
|
|
@@ -34,11 +35,32 @@ DECIMAL_RE = re.compile(r"decimal\((\d+), *(\d+)\)")
|
|
|
34
35
|
_window_specs = ContextVar[dict[str, any]]("_window_specs", default={})
|
|
35
36
|
|
|
36
37
|
|
|
37
|
-
@cache
|
|
38
38
|
def sql_parser():
|
|
39
|
+
"""
|
|
40
|
+
SparkSqlParser needs spark.config. Here we are setting required config keys for SAS.
|
|
41
|
+
We can't do it in set.config request handler, because SparkSqlParser initialized without active SparkSession (our case, todo: fix it)
|
|
42
|
+
uses ThreadLocal to access conf, and conf.set can be handled by other thread.
|
|
43
|
+
https://github.com/apache/spark/blob/ea53ea71461508801586b1e5677aa6011df7cd95/sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala#L143
|
|
44
|
+
"""
|
|
45
|
+
|
|
46
|
+
ts_type = global_config.spark_sql_timestampType
|
|
47
|
+
|
|
48
|
+
if ts_type is not None:
|
|
49
|
+
_get_sql_conf().get().setConfString("spark.sql.timestampType", str(ts_type))
|
|
50
|
+
|
|
51
|
+
return _get_sql_parser()
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
@cache
|
|
55
|
+
def _get_sql_parser():
|
|
39
56
|
return jpype.JClass("org.apache.spark.sql.execution.SparkSqlParser")()
|
|
40
57
|
|
|
41
58
|
|
|
59
|
+
@cache
|
|
60
|
+
def _get_sql_conf():
|
|
61
|
+
return jpype.JClass("org.apache.spark.sql.internal.SQLConf")
|
|
62
|
+
|
|
63
|
+
|
|
42
64
|
@cache
|
|
43
65
|
def _as_java_list():
|
|
44
66
|
return jpype.JClass("scala.collection.JavaConverters").seqAsJavaList
|