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
|
@@ -16,7 +16,7 @@ from snowflake.snowpark._internal.analyzer.analyzer_utils import (
|
|
|
16
16
|
unquote_if_quoted,
|
|
17
17
|
)
|
|
18
18
|
from snowflake.snowpark.exceptions import SnowparkSQLException
|
|
19
|
-
from snowflake.snowpark.functions import col, lit, object_construct
|
|
19
|
+
from snowflake.snowpark.functions import col, lit, object_construct, sql_expr
|
|
20
20
|
from snowflake.snowpark.types import (
|
|
21
21
|
ArrayType,
|
|
22
22
|
DataType,
|
|
@@ -40,7 +40,10 @@ from snowflake.snowpark_connect.relation.io_utils import (
|
|
|
40
40
|
from snowflake.snowpark_connect.relation.map_relation import map_relation
|
|
41
41
|
from snowflake.snowpark_connect.relation.read.reader_config import CsvWriterConfig
|
|
42
42
|
from snowflake.snowpark_connect.relation.stage_locator import get_paths_from_stage
|
|
43
|
-
from snowflake.snowpark_connect.relation.utils import
|
|
43
|
+
from snowflake.snowpark_connect.relation.utils import (
|
|
44
|
+
generate_spark_compatible_filename,
|
|
45
|
+
random_string,
|
|
46
|
+
)
|
|
44
47
|
from snowflake.snowpark_connect.type_mapping import snowpark_to_iceberg_type
|
|
45
48
|
from snowflake.snowpark_connect.utils.context import get_session_id
|
|
46
49
|
from snowflake.snowpark_connect.utils.identifiers import (
|
|
@@ -107,10 +110,7 @@ def _spark_to_snowflake(multipart_id: str) -> str:
|
|
|
107
110
|
|
|
108
111
|
def map_write(request: proto_base.ExecutePlanRequest):
|
|
109
112
|
write_op = request.plan.command.write_operation
|
|
110
|
-
|
|
111
|
-
telemetry.report_io_write(write_op.source, dict(write_op.options))
|
|
112
|
-
else:
|
|
113
|
-
telemetry.report_io_write(write_op.source)
|
|
113
|
+
telemetry.report_io_write(write_op.source)
|
|
114
114
|
|
|
115
115
|
write_mode = None
|
|
116
116
|
match write_op.mode:
|
|
@@ -136,45 +136,80 @@ def map_write(request: proto_base.ExecutePlanRequest):
|
|
|
136
136
|
write_op.source = ""
|
|
137
137
|
|
|
138
138
|
should_write_to_single_file = str_to_bool(write_op.options.get("single", "false"))
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
139
|
+
|
|
140
|
+
# Support Snowflake-specific snowflake_max_file_size option. This is NOT a spark option.
|
|
141
|
+
max_file_size = None
|
|
142
|
+
if (
|
|
143
|
+
"snowflake_max_file_size" in write_op.options
|
|
144
|
+
and int(write_op.options["snowflake_max_file_size"]) > 0
|
|
145
|
+
):
|
|
146
|
+
max_file_size = int(write_op.options["snowflake_max_file_size"])
|
|
147
|
+
elif should_write_to_single_file:
|
|
148
|
+
# providing default size as 1GB for single file write
|
|
149
|
+
max_file_size = 1073741824
|
|
144
150
|
match write_op.source:
|
|
145
151
|
case "csv" | "parquet" | "json" | "text":
|
|
146
152
|
write_path = get_paths_from_stage(
|
|
147
153
|
[write_op.path],
|
|
148
154
|
session=session,
|
|
149
155
|
)[0]
|
|
150
|
-
#
|
|
151
|
-
|
|
156
|
+
# Generate Spark-compatible filename with proper extension
|
|
157
|
+
extension = write_op.source if write_op.source != "text" else "txt"
|
|
158
|
+
|
|
159
|
+
# Get compression from options for proper filename generation
|
|
160
|
+
compression_option = write_op.options.get("compression", "none")
|
|
161
|
+
|
|
162
|
+
# Generate Spark-compatible filename or prefix
|
|
152
163
|
if should_write_to_single_file:
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
164
|
+
# Single file: generate complete filename with extension
|
|
165
|
+
spark_filename = generate_spark_compatible_filename(
|
|
166
|
+
task_id=0,
|
|
167
|
+
attempt_number=0,
|
|
168
|
+
compression=compression_option,
|
|
169
|
+
format_ext=extension,
|
|
156
170
|
)
|
|
171
|
+
temp_file_prefix_on_stage = f"{write_path}/{spark_filename}"
|
|
157
172
|
else:
|
|
158
|
-
|
|
159
|
-
|
|
173
|
+
# Multiple files: generate prefix without extension (Snowflake will add extensions)
|
|
174
|
+
spark_filename_prefix = generate_spark_compatible_filename(
|
|
175
|
+
task_id=0,
|
|
176
|
+
attempt_number=0,
|
|
177
|
+
compression=compression_option,
|
|
178
|
+
format_ext="", # No extension for prefix
|
|
160
179
|
)
|
|
180
|
+
temp_file_prefix_on_stage = f"{write_path}/{spark_filename_prefix}"
|
|
161
181
|
overwrite = (
|
|
162
182
|
write_op.mode
|
|
163
183
|
== commands_proto.WriteOperation.SaveMode.SAVE_MODE_OVERWRITE
|
|
164
184
|
)
|
|
185
|
+
|
|
186
|
+
default_compression = "NONE" if write_op.source != "parquet" else "snappy"
|
|
187
|
+
compression = write_op.options.get(
|
|
188
|
+
"compression", default_compression
|
|
189
|
+
).upper()
|
|
165
190
|
parameters = {
|
|
166
191
|
"location": temp_file_prefix_on_stage,
|
|
167
192
|
"file_format_type": write_op.source
|
|
168
193
|
if write_op.source != "text"
|
|
169
194
|
else "csv",
|
|
170
195
|
"format_type_options": {
|
|
171
|
-
"COMPRESSION":
|
|
196
|
+
"COMPRESSION": compression,
|
|
172
197
|
},
|
|
173
198
|
"overwrite": overwrite,
|
|
174
199
|
}
|
|
175
|
-
|
|
176
|
-
|
|
200
|
+
# By default, download from the same prefix we wrote to.
|
|
201
|
+
download_stage_path = temp_file_prefix_on_stage
|
|
202
|
+
|
|
203
|
+
# Check for partition hint early to determine precedence over single option
|
|
204
|
+
partition_hint = result.partition_hint
|
|
205
|
+
|
|
206
|
+
# Apply max_file_size for both single and multi-file scenarios
|
|
207
|
+
# This helps control when Snowflake splits files into multiple parts
|
|
208
|
+
if max_file_size:
|
|
177
209
|
parameters["max_file_size"] = max_file_size
|
|
210
|
+
# Only apply single option if no partition hint is present (partition hint takes precedence)
|
|
211
|
+
if should_write_to_single_file and partition_hint is None:
|
|
212
|
+
parameters["single"] = True
|
|
178
213
|
rewritten_df: snowpark.DataFrame = rewrite_df(input_df, write_op.source)
|
|
179
214
|
get_param_from_options(parameters, write_op.options, write_op.source)
|
|
180
215
|
if write_op.partitioning_columns:
|
|
@@ -189,10 +224,50 @@ def map_write(request: proto_base.ExecutePlanRequest):
|
|
|
189
224
|
)
|
|
190
225
|
else:
|
|
191
226
|
parameters["partition_by"] = partitioning_columns[0]
|
|
192
|
-
|
|
227
|
+
|
|
228
|
+
# If a partition hint is present (from DataFrame.repartition(n)), optionally split the
|
|
229
|
+
# write into n COPY INTO calls by assigning a synthetic partition id. Controlled by config.
|
|
230
|
+
# Note: This affects only the number of output files, not computation semantics.
|
|
231
|
+
# Partition hints take precedence over single option (matches Spark behavior) when enabled.
|
|
232
|
+
repartition_for_writes_enabled = (
|
|
233
|
+
global_config.snowflake_repartition_for_writes
|
|
234
|
+
)
|
|
235
|
+
if repartition_for_writes_enabled and partition_hint and partition_hint > 0:
|
|
236
|
+
# Create a stable synthetic file number per row using ROW_NUMBER() over a
|
|
237
|
+
# randomized order, then modulo partition_hint. We rely on sql_expr to avoid
|
|
238
|
+
# adding new helpers.
|
|
239
|
+
file_num_col = "_sas_file_num"
|
|
240
|
+
partitioned_df = rewritten_df.withColumn(
|
|
241
|
+
file_num_col,
|
|
242
|
+
sql_expr(
|
|
243
|
+
f"(ROW_NUMBER() OVER (ORDER BY RANDOM())) % {partition_hint}"
|
|
244
|
+
),
|
|
245
|
+
)
|
|
246
|
+
|
|
247
|
+
# Execute multiple COPY INTO operations, one per target file.
|
|
248
|
+
# Since we write per-partition with distinct prefixes, download from the base write path.
|
|
249
|
+
download_stage_path = write_path
|
|
250
|
+
for part_idx in range(partition_hint):
|
|
251
|
+
part_params = dict(parameters)
|
|
252
|
+
# Preserve Spark-like filename prefix per partition so downloaded basenames
|
|
253
|
+
# match the expected Spark pattern (with possible Snowflake counters appended).
|
|
254
|
+
per_part_prefix = generate_spark_compatible_filename(
|
|
255
|
+
task_id=part_idx,
|
|
256
|
+
attempt_number=0,
|
|
257
|
+
compression=compression_option,
|
|
258
|
+
format_ext="", # prefix only; Snowflake appends extension/counters
|
|
259
|
+
)
|
|
260
|
+
part_params["location"] = f"{write_path}/{per_part_prefix}"
|
|
261
|
+
(
|
|
262
|
+
partitioned_df.filter(col(file_num_col) == lit(part_idx))
|
|
263
|
+
.drop(file_num_col)
|
|
264
|
+
.write.copy_into_location(**part_params)
|
|
265
|
+
)
|
|
266
|
+
else:
|
|
267
|
+
rewritten_df.write.copy_into_location(**parameters)
|
|
193
268
|
if not is_cloud_path(write_op.path):
|
|
194
269
|
store_files_locally(
|
|
195
|
-
|
|
270
|
+
download_stage_path,
|
|
196
271
|
write_op.path,
|
|
197
272
|
overwrite,
|
|
198
273
|
session,
|
|
@@ -234,10 +309,11 @@ def map_write(request: proto_base.ExecutePlanRequest):
|
|
|
234
309
|
column_order=_column_order_for_write,
|
|
235
310
|
)
|
|
236
311
|
case "append":
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
312
|
+
# TODO: SNOW-2299414 Fix the implementation of table type check
|
|
313
|
+
# if check_table_type(snowpark_table_name, session) != "ICEBERG":
|
|
314
|
+
# raise AnalysisException(
|
|
315
|
+
# f"Table {snowpark_table_name} is not an iceberg table"
|
|
316
|
+
# )
|
|
241
317
|
_validate_schema_and_get_writer(
|
|
242
318
|
input_df, "append", snowpark_table_name
|
|
243
319
|
).saveAsTable(
|
|
@@ -264,10 +340,12 @@ def map_write(request: proto_base.ExecutePlanRequest):
|
|
|
264
340
|
)
|
|
265
341
|
case "overwrite":
|
|
266
342
|
if check_snowflake_table_existence(snowpark_table_name, session):
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
343
|
+
# TODO: SNOW-2299414 Fix the implementation of table type check
|
|
344
|
+
# if check_table_type(snowpark_table_name, session) != "ICEBERG":
|
|
345
|
+
# raise AnalysisException(
|
|
346
|
+
# f"Table {snowpark_table_name} is not an iceberg table"
|
|
347
|
+
# )
|
|
348
|
+
pass
|
|
271
349
|
else:
|
|
272
350
|
create_iceberg_table(
|
|
273
351
|
snowpark_table_name=snowpark_table_name,
|
|
@@ -298,13 +376,14 @@ def map_write(request: proto_base.ExecutePlanRequest):
|
|
|
298
376
|
if check_snowflake_table_existence(
|
|
299
377
|
snowpark_table_name, session
|
|
300
378
|
):
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
379
|
+
# TODO: SNOW-2299414 Fix the implementation of table type check
|
|
380
|
+
# if (
|
|
381
|
+
# check_table_type(snowpark_table_name, session)
|
|
382
|
+
# != "TABLE"
|
|
383
|
+
# ):
|
|
384
|
+
# raise AnalysisException(
|
|
385
|
+
# f"Table {snowpark_table_name} is not a FDN table"
|
|
386
|
+
# )
|
|
308
387
|
write_mode = "truncate"
|
|
309
388
|
_validate_schema_and_get_writer(
|
|
310
389
|
input_df, write_mode, snowpark_table_name
|
|
@@ -314,10 +393,11 @@ def map_write(request: proto_base.ExecutePlanRequest):
|
|
|
314
393
|
column_order=_column_order_for_write,
|
|
315
394
|
)
|
|
316
395
|
case "append":
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
396
|
+
# TODO: SNOW-2299414 Fix the implementation of table type check
|
|
397
|
+
# if check_table_type(snowpark_table_name, session) != "TABLE":
|
|
398
|
+
# raise AnalysisException(
|
|
399
|
+
# f"Table {snowpark_table_name} is not a FDN table"
|
|
400
|
+
# )
|
|
321
401
|
_validate_schema_and_get_writer(
|
|
322
402
|
input_df, write_mode, snowpark_table_name
|
|
323
403
|
).saveAsTable(
|
|
@@ -388,10 +468,11 @@ def map_write_v2(request: proto_base.ExecutePlanRequest):
|
|
|
388
468
|
raise AnalysisException(
|
|
389
469
|
f"[TABLE_OR_VIEW_NOT_FOUND] The table or view `{write_op.table_name}` cannot be found."
|
|
390
470
|
)
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
471
|
+
# TODO: SNOW-2299414 Fix the implementation of table type check
|
|
472
|
+
# if check_table_type(snowpark_table_name, session) != "ICEBERG":
|
|
473
|
+
# raise AnalysisException(
|
|
474
|
+
# f"Table {snowpark_table_name} is not an iceberg table"
|
|
475
|
+
# )
|
|
395
476
|
_validate_schema_and_get_writer(
|
|
396
477
|
input_df, "append", snowpark_table_name
|
|
397
478
|
).saveAsTable(
|
|
@@ -402,10 +483,12 @@ def map_write_v2(request: proto_base.ExecutePlanRequest):
|
|
|
402
483
|
case commands_proto.WriteOperationV2.MODE_OVERWRITE | commands_proto.WriteOperationV2.MODE_OVERWRITE_PARTITIONS:
|
|
403
484
|
# TODO: handle the filter condition for MODE_OVERWRITE
|
|
404
485
|
if check_snowflake_table_existence(snowpark_table_name, session):
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
486
|
+
# TODO: SNOW-2299414 Fix the implementation of table type check
|
|
487
|
+
# if check_table_type(snowpark_table_name, session) != "ICEBERG":
|
|
488
|
+
# raise AnalysisException(
|
|
489
|
+
# f"Table {snowpark_table_name} is not an iceberg table"
|
|
490
|
+
# )
|
|
491
|
+
pass
|
|
409
492
|
else:
|
|
410
493
|
raise AnalysisException(
|
|
411
494
|
f"[TABLE_OR_VIEW_NOT_FOUND] Table {snowpark_table_name} does not exist"
|
|
@@ -471,10 +554,11 @@ def map_write_v2(request: proto_base.ExecutePlanRequest):
|
|
|
471
554
|
raise AnalysisException(
|
|
472
555
|
f"[TABLE_OR_VIEW_NOT_FOUND] The table or view `{write_op.table_name}` cannot be found."
|
|
473
556
|
)
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
557
|
+
# TODO: SNOW-2299414 Fix the implementation of table type check
|
|
558
|
+
# if check_table_type(snowpark_table_name, session) != "TABLE":
|
|
559
|
+
# raise AnalysisException(
|
|
560
|
+
# f"Table {snowpark_table_name} is not a FDN table"
|
|
561
|
+
# )
|
|
478
562
|
_validate_schema_and_get_writer(
|
|
479
563
|
input_df, "append", snowpark_table_name
|
|
480
564
|
).saveAsTable(
|
|
@@ -485,10 +569,12 @@ def map_write_v2(request: proto_base.ExecutePlanRequest):
|
|
|
485
569
|
case commands_proto.WriteOperationV2.MODE_OVERWRITE | commands_proto.WriteOperationV2.MODE_OVERWRITE_PARTITIONS:
|
|
486
570
|
# TODO: handle the filter condition for MODE_OVERWRITE
|
|
487
571
|
if check_snowflake_table_existence(snowpark_table_name, session):
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
572
|
+
# TODO: SNOW-2299414 Fix the implementation of table type check
|
|
573
|
+
# if check_table_type(snowpark_table_name, session) != "TABLE":
|
|
574
|
+
# raise AnalysisException(
|
|
575
|
+
# f"Table {snowpark_table_name} is not a FDN table"
|
|
576
|
+
# )
|
|
577
|
+
pass
|
|
492
578
|
else:
|
|
493
579
|
raise AnalysisException(
|
|
494
580
|
f"[TABLE_OR_VIEW_NOT_FOUND] Table {snowpark_table_name} does not exist"
|
|
@@ -561,7 +647,12 @@ def _validate_schema_and_get_writer(
|
|
|
561
647
|
col_name = field.name
|
|
562
648
|
renamed = col_name
|
|
563
649
|
matching_field = next(
|
|
564
|
-
(
|
|
650
|
+
(
|
|
651
|
+
f
|
|
652
|
+
for f in table_schema.fields
|
|
653
|
+
if unquote_if_quoted(f.name).lower()
|
|
654
|
+
== unquote_if_quoted(col_name).lower()
|
|
655
|
+
),
|
|
565
656
|
None,
|
|
566
657
|
)
|
|
567
658
|
if matching_field is not None and matching_field != col_name:
|
|
@@ -583,7 +674,10 @@ def _validate_schema_and_get_writer(
|
|
|
583
674
|
|
|
584
675
|
|
|
585
676
|
def _validate_schema_for_append(
|
|
586
|
-
table_schema: DataType,
|
|
677
|
+
table_schema: DataType,
|
|
678
|
+
data_schema: DataType,
|
|
679
|
+
snowpark_table_name: str,
|
|
680
|
+
compare_structs: bool = False,
|
|
587
681
|
):
|
|
588
682
|
match (table_schema, data_schema):
|
|
589
683
|
case (_, _) if table_schema == data_schema:
|
|
@@ -592,7 +686,11 @@ def _validate_schema_for_append(
|
|
|
592
686
|
case (StructType() as table_struct, StructType() as data_struct):
|
|
593
687
|
|
|
594
688
|
def _comparable_col_name(col: str) -> str:
|
|
595
|
-
|
|
689
|
+
name = col if global_config.spark_sql_caseSensitive else col.lower()
|
|
690
|
+
if compare_structs:
|
|
691
|
+
return name
|
|
692
|
+
else:
|
|
693
|
+
return unquote_if_quoted(name)
|
|
596
694
|
|
|
597
695
|
def invalid_struct_schema():
|
|
598
696
|
raise AnalysisException(
|
|
@@ -632,6 +730,7 @@ def _validate_schema_for_append(
|
|
|
632
730
|
matching_table_field.datatype,
|
|
633
731
|
data_field.datatype,
|
|
634
732
|
snowpark_table_name,
|
|
733
|
+
compare_structs=True,
|
|
635
734
|
)
|
|
636
735
|
|
|
637
736
|
return
|
|
@@ -798,17 +897,18 @@ def check_snowflake_table_existence(
|
|
|
798
897
|
return False
|
|
799
898
|
|
|
800
899
|
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
900
|
+
# TODO: SNOW-2299414 Fix the implementation of table type check
|
|
901
|
+
# def check_table_type(
|
|
902
|
+
# snowpark_table_name: str,
|
|
903
|
+
# snowpark_session: snowpark.Session,
|
|
904
|
+
# ) -> str:
|
|
905
|
+
# # currently we only support iceberg table and FDN table
|
|
906
|
+
# metadata = snowpark_session.sql(
|
|
907
|
+
# f"SHOW TABLES LIKE '{unquote_if_quoted(snowpark_table_name)}';"
|
|
908
|
+
# ).collect()
|
|
909
|
+
# if metadata is None or len(metadata) == 0:
|
|
910
|
+
# raise AnalysisException(f"Table {snowpark_table_name} does not exist")
|
|
911
|
+
# metadata = metadata[0]
|
|
912
|
+
# if metadata.as_dict().get("is_iceberg") == "Y":
|
|
913
|
+
# return "ICEBERG"
|
|
914
|
+
# return "TABLE"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#
|
|
2
2
|
# Copyright (c) 2012-2025 Snowflake Computing Inc. All rights reserved.
|
|
3
3
|
#
|
|
4
|
-
|
|
4
|
+
import pathlib
|
|
5
5
|
import threading
|
|
6
6
|
import time
|
|
7
7
|
|
|
@@ -9,6 +9,9 @@ from snowflake.snowpark_connect.utils.session import get_or_create_snowpark_sess
|
|
|
9
9
|
from snowflake.snowpark_connect.utils.snowpark_connect_logging import logger
|
|
10
10
|
|
|
11
11
|
_resources_initialized = threading.Event()
|
|
12
|
+
_initializer_lock = threading.Lock()
|
|
13
|
+
SPARK_VERSION = "3.5.6"
|
|
14
|
+
RESOURCE_PATH = "/snowflake/snowpark_connect/resources"
|
|
12
15
|
|
|
13
16
|
|
|
14
17
|
def initialize_resources() -> None:
|
|
@@ -41,6 +44,34 @@ def initialize_resources() -> None:
|
|
|
41
44
|
|
|
42
45
|
session.sql("select 1 as sf_connection_warm_up").collect()
|
|
43
46
|
|
|
47
|
+
def upload_scala_udf_jars() -> None:
|
|
48
|
+
"""Upload Spark jar files required for creating Scala UDFs."""
|
|
49
|
+
stage = session.get_session_stage()
|
|
50
|
+
resource_path = stage + RESOURCE_PATH
|
|
51
|
+
import snowflake
|
|
52
|
+
|
|
53
|
+
pyspark_jars = (
|
|
54
|
+
pathlib.Path(snowflake.snowpark_connect.__file__).parent / "includes/jars"
|
|
55
|
+
)
|
|
56
|
+
jar_files = [
|
|
57
|
+
f"spark-sql_2.12-{SPARK_VERSION}.jar",
|
|
58
|
+
f"spark-connect-client-jvm_2.12-{SPARK_VERSION}.jar",
|
|
59
|
+
f"spark-common-utils_2.12-{SPARK_VERSION}.jar",
|
|
60
|
+
"json4s-ast_2.12-3.7.0-M11.jar",
|
|
61
|
+
"json4s-native_2.12-3.7.0-M11.jar",
|
|
62
|
+
"json4s-core_2.12-3.7.0-M11.jar",
|
|
63
|
+
"paranamer-2.8.3.jar",
|
|
64
|
+
]
|
|
65
|
+
|
|
66
|
+
for jar in jar_files:
|
|
67
|
+
session.file.put(
|
|
68
|
+
str(pyspark_jars) + "/" + jar,
|
|
69
|
+
resource_path,
|
|
70
|
+
auto_compress=False,
|
|
71
|
+
overwrite=False,
|
|
72
|
+
source_compression="NONE",
|
|
73
|
+
)
|
|
74
|
+
|
|
44
75
|
start_time = time.time()
|
|
45
76
|
|
|
46
77
|
resources = [
|
|
@@ -49,6 +80,7 @@ def initialize_resources() -> None:
|
|
|
49
80
|
("Initialize Session Stage", initialize_session_stage), # Takes about 0.3s
|
|
50
81
|
("Initialize Session Catalog", initialize_catalog), # Takes about 1.2s
|
|
51
82
|
("Snowflake Connection Warm Up", warm_up_sf_connection), # Takes about 1s
|
|
83
|
+
("Upload Scala UDF Jars", upload_scala_udf_jars),
|
|
52
84
|
]
|
|
53
85
|
|
|
54
86
|
for name, resource_func in resources:
|
|
@@ -66,10 +98,19 @@ def initialize_resources() -> None:
|
|
|
66
98
|
logger.info(f"All resources initialized in {time.time() - start_time:.2f}s")
|
|
67
99
|
|
|
68
100
|
|
|
101
|
+
_resource_initializer = threading.Thread(
|
|
102
|
+
target=initialize_resources, name="ResourceInitializer"
|
|
103
|
+
)
|
|
104
|
+
|
|
105
|
+
|
|
69
106
|
def initialize_resources_async() -> threading.Thread:
|
|
70
107
|
"""Start resource initialization in background."""
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
108
|
+
with _initializer_lock:
|
|
109
|
+
if not _resource_initializer.is_alive() and _resource_initializer.ident is None:
|
|
110
|
+
_resource_initializer.start()
|
|
111
|
+
return _resource_initializer
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
def wait_for_resource_initialization() -> None:
|
|
115
|
+
with _initializer_lock:
|
|
116
|
+
_resource_initializer.join()
|
|
@@ -68,10 +68,14 @@ from snowflake.snowpark_connect.relation.map_relation import map_relation
|
|
|
68
68
|
from snowflake.snowpark_connect.relation.utils import get_semantic_string
|
|
69
69
|
from snowflake.snowpark_connect.resources_initializer import initialize_resources_async
|
|
70
70
|
from snowflake.snowpark_connect.type_mapping import (
|
|
71
|
-
|
|
71
|
+
map_type_string_to_proto,
|
|
72
72
|
snowpark_to_proto_type,
|
|
73
73
|
)
|
|
74
|
-
from snowflake.snowpark_connect.utils.artifacts import
|
|
74
|
+
from snowflake.snowpark_connect.utils.artifacts import (
|
|
75
|
+
check_checksum,
|
|
76
|
+
write_artifact,
|
|
77
|
+
write_class_files_to_stage,
|
|
78
|
+
)
|
|
75
79
|
from snowflake.snowpark_connect.utils.cache import (
|
|
76
80
|
df_cache_map_get,
|
|
77
81
|
df_cache_map_pop,
|
|
@@ -84,6 +88,9 @@ from snowflake.snowpark_connect.utils.context import (
|
|
|
84
88
|
set_spark_version,
|
|
85
89
|
)
|
|
86
90
|
from snowflake.snowpark_connect.utils.env_utils import get_int_from_env
|
|
91
|
+
from snowflake.snowpark_connect.utils.external_udxf_cache import (
|
|
92
|
+
clear_external_udxf_cache,
|
|
93
|
+
)
|
|
87
94
|
from snowflake.snowpark_connect.utils.interrupt import (
|
|
88
95
|
interrupt_all_queries,
|
|
89
96
|
interrupt_queries_with_tag,
|
|
@@ -249,7 +256,9 @@ class SnowflakeConnectServicer(proto_base_grpc.SparkConnectServiceServicer):
|
|
|
249
256
|
return proto_base.AnalyzePlanResponse(
|
|
250
257
|
session_id=request.session_id,
|
|
251
258
|
ddl_parse=proto_base.AnalyzePlanResponse.DDLParse(
|
|
252
|
-
parsed=
|
|
259
|
+
parsed=map_type_string_to_proto(
|
|
260
|
+
request.ddl_parse.ddl_string
|
|
261
|
+
)
|
|
253
262
|
),
|
|
254
263
|
)
|
|
255
264
|
case "get_storage_level":
|
|
@@ -430,7 +439,8 @@ class SnowflakeConnectServicer(proto_base_grpc.SparkConnectServiceServicer):
|
|
|
430
439
|
lambda: map_local_relation(relation), # noqa: B023
|
|
431
440
|
materialize=True,
|
|
432
441
|
)
|
|
433
|
-
except Exception:
|
|
442
|
+
except Exception as e:
|
|
443
|
+
logger.warning("Failed to put df into cache: %s", str(e))
|
|
434
444
|
# fallback - treat as regular artifact
|
|
435
445
|
_handle_regular_artifact()
|
|
436
446
|
else:
|
|
@@ -516,7 +526,13 @@ class SnowflakeConnectServicer(proto_base_grpc.SparkConnectServiceServicer):
|
|
|
516
526
|
for name, data in cache_data.items():
|
|
517
527
|
_try_handle_local_relation(name, bytes(data))
|
|
518
528
|
|
|
529
|
+
class_files: dict[str, str] = {}
|
|
519
530
|
for (name, filepath) in filenames.items():
|
|
531
|
+
if name.endswith(".class"):
|
|
532
|
+
# name is <dir>/<package>/<class_name>
|
|
533
|
+
# we don't need the dir name, but require the package, so only remove dir
|
|
534
|
+
class_files[name.split("/", 1)[-1]] = filepath
|
|
535
|
+
continue
|
|
520
536
|
session.file.put(
|
|
521
537
|
filepath,
|
|
522
538
|
session.get_session_stage(),
|
|
@@ -541,6 +557,12 @@ class SnowflakeConnectServicer(proto_base_grpc.SparkConnectServiceServicer):
|
|
|
541
557
|
if not name.startswith("pyfiles"):
|
|
542
558
|
session._import_files.add(cached_name)
|
|
543
559
|
|
|
560
|
+
if class_files:
|
|
561
|
+
write_class_files_to_stage(session, class_files)
|
|
562
|
+
|
|
563
|
+
if any(not name.startswith("cache") for name in filenames.keys()):
|
|
564
|
+
clear_external_udxf_cache(session)
|
|
565
|
+
|
|
544
566
|
return proto_base.AddArtifactsResponse(artifacts=list(response.values()))
|
|
545
567
|
|
|
546
568
|
def ArtifactStatus(self, request, context):
|
|
@@ -19,8 +19,9 @@ from pyspark.sql.connect.proto import expressions_pb2
|
|
|
19
19
|
|
|
20
20
|
from snowflake import snowpark
|
|
21
21
|
from snowflake.snowpark._internal.utils import quote_name
|
|
22
|
-
from snowflake.snowpark.types import TimestampTimeZone
|
|
22
|
+
from snowflake.snowpark.types import TimestampTimeZone, TimestampType
|
|
23
23
|
from snowflake.snowpark_connect.column_name_handler import ColumnNameMap
|
|
24
|
+
from snowflake.snowpark_connect.config import get_timestamp_type
|
|
24
25
|
from snowflake.snowpark_connect.constants import (
|
|
25
26
|
COLUMN_METADATA_COLLISION_KEY,
|
|
26
27
|
STRUCTURED_TYPES_ENABLED,
|
|
@@ -29,6 +30,7 @@ from snowflake.snowpark_connect.date_time_format_mapping import (
|
|
|
29
30
|
convert_spark_format_to_snowflake,
|
|
30
31
|
)
|
|
31
32
|
from snowflake.snowpark_connect.expression.literal import get_literal_field_and_name
|
|
33
|
+
from snowflake.snowpark_connect.utils.context import get_is_evaluating_sql
|
|
32
34
|
from snowflake.snowpark_connect.utils.snowpark_connect_logging import logger
|
|
33
35
|
from snowflake.snowpark_connect.utils.telemetry import (
|
|
34
36
|
SnowparkConnectNotImplementedError,
|
|
@@ -63,7 +65,7 @@ def get_python_sql_utils_class():
|
|
|
63
65
|
return jpype.JClass("org.apache.spark.sql.api.python.PythonSQLUtils")
|
|
64
66
|
|
|
65
67
|
|
|
66
|
-
def
|
|
68
|
+
def _parse_ddl_with_spark_scala(ddl_string: str) -> pyspark.sql.types.DataType:
|
|
67
69
|
"""
|
|
68
70
|
Parse DDL string using PySpark's Scala StructType.fromDDL() method.
|
|
69
71
|
|
|
@@ -869,51 +871,53 @@ def map_json_schema_to_snowpark(
|
|
|
869
871
|
return map_simple_types(schema["type"])
|
|
870
872
|
|
|
871
873
|
|
|
872
|
-
def
|
|
874
|
+
def _map_type_string(
|
|
875
|
+
type_string: str,
|
|
876
|
+
) -> tuple[pyspark.sql.types.DataType, snowpark.types.DataType]:
|
|
873
877
|
"""
|
|
874
|
-
|
|
878
|
+
Map a ddl-string type to a tuple of PySpark data type and a Snowpark data type.
|
|
875
879
|
"""
|
|
876
|
-
|
|
877
|
-
|
|
880
|
+
|
|
881
|
+
pyspark_type = _parse_ddl_with_spark_scala(type_string)
|
|
882
|
+
match type_string:
|
|
883
|
+
case "timestamp" if not get_is_evaluating_sql():
|
|
884
|
+
return pyspark_type, get_timestamp_type()
|
|
885
|
+
case "timestamp" | "timestamp_ltz":
|
|
886
|
+
return pyspark_type, TimestampType(TimestampTimeZone.LTZ)
|
|
887
|
+
case _:
|
|
888
|
+
return pyspark_type, map_pyspark_types_to_snowpark_types(pyspark_type)
|
|
878
889
|
|
|
879
890
|
|
|
880
|
-
def
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
return "byte"
|
|
884
|
-
# Replace any occurrence of ": tinyint" (with optional spaces) with ": byte"
|
|
885
|
-
return re.sub(r"(:\s*)tinyint\b", r"\1byte", ddl_string, flags=re.IGNORECASE)
|
|
891
|
+
def map_type_string_to_snowpark_type(type_string: str) -> snowpark.types.DataType:
|
|
892
|
+
_, snowpark_type = _map_type_string(type_string)
|
|
893
|
+
return snowpark_type
|
|
886
894
|
|
|
887
895
|
|
|
888
|
-
def
|
|
889
|
-
ddl_string: str,
|
|
896
|
+
def map_type_string_to_proto(
|
|
897
|
+
ddl_string: str,
|
|
890
898
|
) -> types_proto.DataType | snowpark.types.DataType:
|
|
891
899
|
"""
|
|
892
900
|
Parse a DDL string and return the Proto data type.
|
|
893
|
-
|
|
894
|
-
This function is used to parse a DDL string and return the Proto data type.
|
|
895
901
|
"""
|
|
896
|
-
pyspark_type =
|
|
897
|
-
schema = map_pyspark_types_to_snowpark_types(pyspark_type)
|
|
898
|
-
|
|
899
|
-
if return_raw_type:
|
|
900
|
-
return schema
|
|
902
|
+
pyspark_type, snowpark_type = _map_type_string(ddl_string)
|
|
901
903
|
|
|
902
904
|
column_name_map = None
|
|
903
905
|
if isinstance(pyspark_type, pyspark.sql.types.StructType):
|
|
904
906
|
spark_column_names = [field.name for field in pyspark_type.fields]
|
|
905
|
-
snowpark_column_names = [field.name for field in
|
|
907
|
+
snowpark_column_names = [field.name for field in snowpark_type.fields]
|
|
906
908
|
|
|
907
909
|
if len(spark_column_names) == len(snowpark_column_names):
|
|
908
910
|
column_name_map = ColumnNameMap(spark_column_names, snowpark_column_names)
|
|
909
911
|
|
|
910
|
-
struct_proto = list(
|
|
912
|
+
struct_proto = list(
|
|
913
|
+
snowpark_to_proto_type(snowpark_type, column_name_map).values()
|
|
914
|
+
)[0]
|
|
911
915
|
|
|
912
|
-
if isinstance(
|
|
916
|
+
if isinstance(snowpark_type, snowpark.types.StructType):
|
|
913
917
|
return types_proto.DataType(struct=struct_proto)
|
|
914
918
|
else:
|
|
915
919
|
# Handle non-struct types (arrays, maps, primitives, etc.)
|
|
916
|
-
proto_type_mapping = snowpark_to_proto_type(
|
|
920
|
+
proto_type_mapping = snowpark_to_proto_type(snowpark_type, column_name_map)
|
|
917
921
|
proto_field_name = list(proto_type_mapping.keys())[0]
|
|
918
922
|
return types_proto.DataType(**{proto_field_name: struct_proto})
|
|
919
923
|
|