snowpark-connect 0.24.0__py3-none-any.whl → 0.25.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 +13 -0
- snowflake/snowpark_connect/constants.py +0 -29
- snowflake/snowpark_connect/dataframe_container.py +6 -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 +26 -8
- 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 +825 -353
- 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/{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_sql.py +88 -11
- snowflake/snowpark_connect/relation/map_udtf.py +4 -2
- 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/write/map_write.py +62 -53
- snowflake/snowpark_connect/resources_initializer.py +29 -1
- snowflake/snowpark_connect/server.py +18 -3
- 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/context.py +6 -1
- snowflake/snowpark_connect/utils/scala_udf_utils.py +588 -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 +38 -7
- snowflake/snowpark_connect/utils/udtf_utils.py +17 -3
- snowflake/snowpark_connect/version.py +1 -1
- {snowpark_connect-0.24.0.dist-info → snowpark_connect-0.25.0.dist-info}/METADATA +1 -1
- snowpark_connect-0.25.0.dist-info/RECORD +477 -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.25.0.data}/scripts/snowpark-connect +0 -0
- {snowpark_connect-0.24.0.data → snowpark_connect-0.25.0.data}/scripts/snowpark-session +0 -0
- {snowpark_connect-0.24.0.data → snowpark_connect-0.25.0.data}/scripts/snowpark-submit +0 -0
- {snowpark_connect-0.24.0.dist-info → snowpark_connect-0.25.0.dist-info}/WHEEL +0 -0
- {snowpark_connect-0.24.0.dist-info → snowpark_connect-0.25.0.dist-info}/licenses/LICENSE-binary +0 -0
- {snowpark_connect-0.24.0.dist-info → snowpark_connect-0.25.0.dist-info}/licenses/LICENSE.txt +0 -0
- {snowpark_connect-0.24.0.dist-info → snowpark_connect-0.25.0.dist-info}/licenses/NOTICE-binary +0 -0
- {snowpark_connect-0.24.0.dist-info → snowpark_connect-0.25.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,588 @@
|
|
|
1
|
+
#
|
|
2
|
+
# Copyright (c) 2012-2025 Snowflake Computing Inc. All rights reserved.
|
|
3
|
+
#
|
|
4
|
+
"""
|
|
5
|
+
Scala UDF utilities for Snowpark Connect.
|
|
6
|
+
|
|
7
|
+
This module provides utilities for creating and managing Scala User-Defined Functions (UDFs)
|
|
8
|
+
in Snowflake through Snowpark Connect. It handles the conversion between different type systems
|
|
9
|
+
(Snowpark, Scala, Snowflake, Spark protobuf) and generates the necessary SQL DDL statements
|
|
10
|
+
for UDF creation.
|
|
11
|
+
|
|
12
|
+
Key components:
|
|
13
|
+
- ScalaUdf: Reference class for Scala UDFs
|
|
14
|
+
- ScalaUDFDef: Definition class for Scala UDF creation
|
|
15
|
+
- Type mapping functions for different type systems
|
|
16
|
+
- UDF creation and management utilities
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
from dataclasses import dataclass
|
|
20
|
+
from enum import Enum
|
|
21
|
+
from typing import Callable, List
|
|
22
|
+
|
|
23
|
+
import snowflake.snowpark.types as snowpark_type
|
|
24
|
+
import snowflake.snowpark_connect.includes.python.pyspark.sql.connect.proto.types_pb2 as types_proto
|
|
25
|
+
from snowflake.snowpark_connect.resources_initializer import RESOURCE_PATH
|
|
26
|
+
from snowflake.snowpark_connect.utils.snowpark_connect_logging import logger
|
|
27
|
+
from snowflake.snowpark_connect.utils.udf_utils import (
|
|
28
|
+
ProcessCommonInlineUserDefinedFunction,
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
# Prefix used for internally generated Scala UDF names to avoid conflicts
|
|
32
|
+
CREATE_SCALA_UDF_PREFIX = "__SC_BUILD_IN_CREATE_UDF_SCALA_"
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class ScalaUdf:
|
|
36
|
+
"""
|
|
37
|
+
Reference class for Scala UDFs, providing similar properties like Python UserDefinedFunction.
|
|
38
|
+
|
|
39
|
+
This class serves as a lightweight reference to a Scala UDF that has been created
|
|
40
|
+
in Snowflake, storing the essential metadata needed for function calls.
|
|
41
|
+
"""
|
|
42
|
+
|
|
43
|
+
def __init__(
|
|
44
|
+
self,
|
|
45
|
+
name: str,
|
|
46
|
+
input_types: List[snowpark_type.DataType],
|
|
47
|
+
return_type: snowpark_type.DataType,
|
|
48
|
+
) -> None:
|
|
49
|
+
"""
|
|
50
|
+
Initialize a Scala UDF reference.
|
|
51
|
+
|
|
52
|
+
Args:
|
|
53
|
+
name: The name of the UDF in Snowflake
|
|
54
|
+
input_types: List of input parameter types
|
|
55
|
+
return_type: The return type of the UDF
|
|
56
|
+
"""
|
|
57
|
+
self.name = name
|
|
58
|
+
self._input_types = input_types
|
|
59
|
+
self._return_type = return_type
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
@dataclass(frozen=True)
|
|
63
|
+
class Param:
|
|
64
|
+
"""
|
|
65
|
+
Represents a function parameter with name and data type.
|
|
66
|
+
|
|
67
|
+
Attributes:
|
|
68
|
+
name: Parameter name
|
|
69
|
+
data_type: Parameter data type as a string
|
|
70
|
+
"""
|
|
71
|
+
|
|
72
|
+
name: str
|
|
73
|
+
data_type: str
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
@dataclass(frozen=True)
|
|
77
|
+
class NullHandling(str, Enum):
|
|
78
|
+
"""
|
|
79
|
+
Enumeration for UDF null handling behavior.
|
|
80
|
+
|
|
81
|
+
Determines how the UDF behaves when input parameters contain null values.
|
|
82
|
+
"""
|
|
83
|
+
|
|
84
|
+
RETURNS_NULL_ON_NULL_INPUT = "RETURNS NULL ON NULL INPUT"
|
|
85
|
+
CALLED_ON_NULL_INPUT = "CALLED ON NULL INPUT"
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
@dataclass(frozen=True)
|
|
89
|
+
class ReturnType:
|
|
90
|
+
"""
|
|
91
|
+
Represents the return type of a function.
|
|
92
|
+
|
|
93
|
+
Attributes:
|
|
94
|
+
data_type: Return data type as a string
|
|
95
|
+
"""
|
|
96
|
+
|
|
97
|
+
data_type: str
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
@dataclass(frozen=True)
|
|
101
|
+
class Signature:
|
|
102
|
+
"""
|
|
103
|
+
Represents a function signature with parameters and return type.
|
|
104
|
+
|
|
105
|
+
Attributes:
|
|
106
|
+
params: List of function parameters
|
|
107
|
+
returns: Function return type
|
|
108
|
+
"""
|
|
109
|
+
|
|
110
|
+
params: List[Param]
|
|
111
|
+
returns: ReturnType
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
@dataclass(frozen=True)
|
|
115
|
+
class ScalaUDFDef:
|
|
116
|
+
"""
|
|
117
|
+
Complete definition for creating a Scala UDF in Snowflake.
|
|
118
|
+
|
|
119
|
+
Contains all the information needed to generate the CREATE FUNCTION SQL statement
|
|
120
|
+
and the Scala code body for the UDF.
|
|
121
|
+
|
|
122
|
+
Attributes:
|
|
123
|
+
name: UDF name
|
|
124
|
+
signature: SQL signature (for Snowflake function definition)
|
|
125
|
+
scala_signature: Scala signature (for Scala code generation)
|
|
126
|
+
imports: List of JAR files to import
|
|
127
|
+
null_handling: Null handling behavior (defaults to RETURNS_NULL_ON_NULL_INPUT)
|
|
128
|
+
"""
|
|
129
|
+
|
|
130
|
+
name: str
|
|
131
|
+
signature: Signature
|
|
132
|
+
scala_signature: Signature
|
|
133
|
+
imports: List[str]
|
|
134
|
+
null_handling: NullHandling = NullHandling.RETURNS_NULL_ON_NULL_INPUT
|
|
135
|
+
|
|
136
|
+
# -------------------- DDL Emitter --------------------
|
|
137
|
+
|
|
138
|
+
def _gen_body_sql(self) -> str:
|
|
139
|
+
"""
|
|
140
|
+
Generate the Scala code body for the UDF.
|
|
141
|
+
|
|
142
|
+
Creates a Scala object that loads the serialized function from a binary file
|
|
143
|
+
and provides a run method to execute it.
|
|
144
|
+
|
|
145
|
+
Returns:
|
|
146
|
+
String containing the complete Scala code for the UDF body
|
|
147
|
+
"""
|
|
148
|
+
scala_return_type = self.scala_signature.returns.data_type
|
|
149
|
+
# Convert Array to Seq for Scala compatibility in function signatures
|
|
150
|
+
cast_scala_input_types = (
|
|
151
|
+
", ".join(p.data_type for p in self.scala_signature.params)
|
|
152
|
+
).replace("Array", "Seq")
|
|
153
|
+
scala_arg_and_input_types_str = ", ".join(
|
|
154
|
+
f"{p.name}: {p.data_type}" for p in self.scala_signature.params
|
|
155
|
+
)
|
|
156
|
+
scala_args_str = ", ".join(f"{p.name}" for p in self.scala_signature.params)
|
|
157
|
+
return f"""import org.apache.spark.sql.connect.common.UdfPacket
|
|
158
|
+
|
|
159
|
+
import java.io.{{ByteArrayInputStream, ObjectInputStream}}
|
|
160
|
+
import java.nio.file.{{Files, Paths}}
|
|
161
|
+
|
|
162
|
+
object SparkUdf {{
|
|
163
|
+
|
|
164
|
+
lazy val func: ({cast_scala_input_types}) => {scala_return_type} = {{
|
|
165
|
+
val importDirectory = System.getProperty("com.snowflake.import_directory")
|
|
166
|
+
val fPath = importDirectory + "{self.name}.bin"
|
|
167
|
+
val bytes = Files.readAllBytes(Paths.get(fPath))
|
|
168
|
+
val ois = new ObjectInputStream(new ByteArrayInputStream(bytes))
|
|
169
|
+
try {{
|
|
170
|
+
ois.readObject().asInstanceOf[UdfPacket].function.asInstanceOf[({cast_scala_input_types}) => {scala_return_type}]
|
|
171
|
+
}} finally {{
|
|
172
|
+
ois.close()
|
|
173
|
+
}}
|
|
174
|
+
}}
|
|
175
|
+
|
|
176
|
+
def run({scala_arg_and_input_types_str}): {scala_return_type} = {{
|
|
177
|
+
func({scala_args_str})
|
|
178
|
+
}}
|
|
179
|
+
}}
|
|
180
|
+
"""
|
|
181
|
+
|
|
182
|
+
def to_create_function_sql(self) -> str:
|
|
183
|
+
"""
|
|
184
|
+
Generate the complete CREATE FUNCTION SQL statement for the Scala UDF.
|
|
185
|
+
|
|
186
|
+
Creates a Snowflake CREATE OR REPLACE TEMPORARY FUNCTION statement with
|
|
187
|
+
all necessary clauses including language, runtime version, packages,
|
|
188
|
+
imports, and the Scala code body.
|
|
189
|
+
|
|
190
|
+
Returns:
|
|
191
|
+
Complete SQL DDL statement for creating the UDF
|
|
192
|
+
"""
|
|
193
|
+
# self.validate()
|
|
194
|
+
|
|
195
|
+
args = ", ".join(f"{p.name} {p.data_type}" for p in self.signature.params)
|
|
196
|
+
ret_type = self.signature.returns.data_type
|
|
197
|
+
|
|
198
|
+
def quote_single(s: str) -> str:
|
|
199
|
+
"""Helper function to wrap strings in single quotes for SQL."""
|
|
200
|
+
return "'" + s + "'"
|
|
201
|
+
|
|
202
|
+
# Handler and imports
|
|
203
|
+
imports_sql = f"IMPORTS = ({', '.join(quote_single(x) for x in self.imports)})"
|
|
204
|
+
|
|
205
|
+
return f"""
|
|
206
|
+
CREATE OR REPLACE TEMPORARY FUNCTION {self.name}({args})
|
|
207
|
+
RETURNS {ret_type}
|
|
208
|
+
LANGUAGE SCALA
|
|
209
|
+
{self.null_handling.value}
|
|
210
|
+
RUNTIME_VERSION = 2.12
|
|
211
|
+
PACKAGES = ('com.snowflake:snowpark:latest')
|
|
212
|
+
{imports_sql}
|
|
213
|
+
HANDLER = 'SparkUdf.run'
|
|
214
|
+
AS
|
|
215
|
+
$$
|
|
216
|
+
{self._gen_body_sql()}
|
|
217
|
+
$$;"""
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
def build_scala_udf_imports(session, payload, udf_name):
|
|
221
|
+
"""
|
|
222
|
+
Build the list of imports needed for the Scala UDF.
|
|
223
|
+
|
|
224
|
+
This function:
|
|
225
|
+
1. Saves the UDF payload to a binary file in the session stage
|
|
226
|
+
2. Collects user-uploaded JAR files from the stage
|
|
227
|
+
3. Returns a list of all required JAR files for the UDF
|
|
228
|
+
|
|
229
|
+
Args:
|
|
230
|
+
session: Snowpark session
|
|
231
|
+
payload: Binary payload containing the serialized UDF
|
|
232
|
+
udf_name: Name of the UDF (used for the binary file name)
|
|
233
|
+
|
|
234
|
+
Returns:
|
|
235
|
+
List of JAR file paths to be imported by the UDF
|
|
236
|
+
"""
|
|
237
|
+
# Save pciudf._payload to a bin file:
|
|
238
|
+
import io
|
|
239
|
+
|
|
240
|
+
payload_as_stream = io.BytesIO(payload)
|
|
241
|
+
stage = session.get_session_stage()
|
|
242
|
+
stage_resource_path = stage + RESOURCE_PATH
|
|
243
|
+
closure_binary_file = stage_resource_path + "/" + udf_name + ".bin"
|
|
244
|
+
session.file.put_stream(
|
|
245
|
+
payload_as_stream,
|
|
246
|
+
closure_binary_file,
|
|
247
|
+
overwrite=True,
|
|
248
|
+
)
|
|
249
|
+
|
|
250
|
+
# Get a list of the jar files uploaded to the stage. We need to import the user's jar for the Scala UDF.
|
|
251
|
+
res = session.sql(rf"LIST {stage}/ PATTERN='.*\.jar';").collect()
|
|
252
|
+
user_jars = []
|
|
253
|
+
for row in res:
|
|
254
|
+
if RESOURCE_PATH not in row[0]:
|
|
255
|
+
# Remove the stage path since it is not properly formatted.
|
|
256
|
+
user_jars.append(row[0][row[0].find("/") :])
|
|
257
|
+
# Format the user jars to be used in the IMPORTS clause of the stored procedure.
|
|
258
|
+
return [
|
|
259
|
+
closure_binary_file,
|
|
260
|
+
f"{stage_resource_path}/spark-connect-client-jvm_2.12-3.5.6.jar",
|
|
261
|
+
f"{stage_resource_path}/spark-common-utils_2.12-3.5.6.jar",
|
|
262
|
+
f"{stage_resource_path}/spark-sql_2.12-3.5.6.jar",
|
|
263
|
+
f"{stage_resource_path}/json4s-ast_2.12-3.7.0-M11.jar",
|
|
264
|
+
] + [f"{stage + jar}" for jar in user_jars]
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
def create_scala_udf(pciudf: ProcessCommonInlineUserDefinedFunction) -> ScalaUdf:
|
|
268
|
+
"""
|
|
269
|
+
Create a Scala UDF in Snowflake from a ProcessCommonInlineUserDefinedFunction object.
|
|
270
|
+
|
|
271
|
+
This function handles the complete process of creating a Scala UDF:
|
|
272
|
+
1. Generates a unique function name if not provided
|
|
273
|
+
2. Checks for existing UDFs in the session cache
|
|
274
|
+
3. Creates the necessary imports list
|
|
275
|
+
4. Maps types between different systems (Snowpark, Scala, Snowflake)
|
|
276
|
+
5. Generates and executes the CREATE FUNCTION SQL statement
|
|
277
|
+
|
|
278
|
+
If the UDF already exists in the session cache, it will be reused.
|
|
279
|
+
|
|
280
|
+
Args:
|
|
281
|
+
pciudf: The ProcessCommonInlineUserDefinedFunction object containing UDF details.
|
|
282
|
+
|
|
283
|
+
Returns:
|
|
284
|
+
A ScalaUdf object representing the created or cached Scala UDF.
|
|
285
|
+
"""
|
|
286
|
+
from snowflake.snowpark_connect.utils.session import get_or_create_snowpark_session
|
|
287
|
+
|
|
288
|
+
function_name = pciudf._function_name
|
|
289
|
+
# If a function name is not provided, hash the binary file and use the first ten characters as the function name.
|
|
290
|
+
if not function_name:
|
|
291
|
+
import hashlib
|
|
292
|
+
|
|
293
|
+
function_name = hashlib.sha256(pciudf._payload).hexdigest()[:10]
|
|
294
|
+
udf_name = CREATE_SCALA_UDF_PREFIX + function_name
|
|
295
|
+
|
|
296
|
+
session = get_or_create_snowpark_session()
|
|
297
|
+
if udf_name in session._udfs:
|
|
298
|
+
cached_udf = session._udfs[udf_name]
|
|
299
|
+
return ScalaUdf(cached_udf.name, cached_udf.input_types, cached_udf.return_type)
|
|
300
|
+
|
|
301
|
+
imports = build_scala_udf_imports(session, pciudf._payload, udf_name)
|
|
302
|
+
|
|
303
|
+
def _build_params(
|
|
304
|
+
pciudf: ProcessCommonInlineUserDefinedFunction,
|
|
305
|
+
snowpark_type_mapper: Callable[[snowpark_type.DataType], str],
|
|
306
|
+
spark_type_mapper: Callable[[types_proto.DataType], str],
|
|
307
|
+
) -> List[Param]:
|
|
308
|
+
"""
|
|
309
|
+
Build the parameter list for the UDF signature.
|
|
310
|
+
|
|
311
|
+
Args:
|
|
312
|
+
pciudf: The UDF definition object
|
|
313
|
+
mapper: Function to map Snowpark types to target type system
|
|
314
|
+
|
|
315
|
+
Returns:
|
|
316
|
+
List of Param objects representing the function parameters
|
|
317
|
+
"""
|
|
318
|
+
if not pciudf._scala_input_types:
|
|
319
|
+
return (
|
|
320
|
+
[
|
|
321
|
+
Param(name=f"arg{i}", data_type=snowpark_type_mapper(input_type))
|
|
322
|
+
for i, input_type in enumerate(pciudf._input_types)
|
|
323
|
+
]
|
|
324
|
+
if pciudf._input_types
|
|
325
|
+
else []
|
|
326
|
+
)
|
|
327
|
+
else:
|
|
328
|
+
return [
|
|
329
|
+
Param(name=f"arg{i}", data_type=spark_type_mapper(input_type))
|
|
330
|
+
for i, input_type in enumerate(pciudf._scala_input_types)
|
|
331
|
+
]
|
|
332
|
+
|
|
333
|
+
# Create the Scala arguments and input types string: "arg0: Type0, arg1: Type1, ...".
|
|
334
|
+
# In case the Scala UDF was created with `spark.udf.register`, the Spark Scala input types (from protobuf) are
|
|
335
|
+
# stored in pciudf.scala_input_types.
|
|
336
|
+
sql_input_params = _build_params(
|
|
337
|
+
pciudf, map_snowpark_type_to_snowflake_type, map_spark_type_to_snowflake_type
|
|
338
|
+
)
|
|
339
|
+
sql_return_type = map_snowpark_type_to_snowflake_type(pciudf._return_type)
|
|
340
|
+
scala_input_params = _build_params(
|
|
341
|
+
pciudf, map_snowpark_type_to_scala_type, map_spark_type_to_scala_type
|
|
342
|
+
)
|
|
343
|
+
scala_return_type = map_snowpark_type_to_scala_type(pciudf._return_type)
|
|
344
|
+
|
|
345
|
+
udf_def = ScalaUDFDef(
|
|
346
|
+
name=udf_name,
|
|
347
|
+
signature=Signature(
|
|
348
|
+
params=sql_input_params, returns=ReturnType(sql_return_type)
|
|
349
|
+
),
|
|
350
|
+
imports=imports,
|
|
351
|
+
scala_signature=Signature(
|
|
352
|
+
params=scala_input_params, returns=ReturnType(scala_return_type)
|
|
353
|
+
),
|
|
354
|
+
)
|
|
355
|
+
create_udf_sql = udf_def.to_create_function_sql()
|
|
356
|
+
logger.info(f"Creating Scala UDF: {create_udf_sql}")
|
|
357
|
+
session.sql(create_udf_sql).collect()
|
|
358
|
+
return ScalaUdf(udf_name, pciudf._input_types, pciudf._return_type)
|
|
359
|
+
|
|
360
|
+
|
|
361
|
+
def map_snowpark_type_to_scala_type(t: snowpark_type.DataType) -> str:
|
|
362
|
+
"""
|
|
363
|
+
Maps a Snowpark type to a Scala type string.
|
|
364
|
+
|
|
365
|
+
Converts Snowpark DataType objects to their corresponding Scala type names.
|
|
366
|
+
This mapping is used when generating Scala code for UDFs.
|
|
367
|
+
|
|
368
|
+
Args:
|
|
369
|
+
t: Snowpark DataType to convert
|
|
370
|
+
|
|
371
|
+
Returns:
|
|
372
|
+
String representation of the corresponding Scala type
|
|
373
|
+
|
|
374
|
+
Raises:
|
|
375
|
+
ValueError: If the Snowpark type is not supported
|
|
376
|
+
"""
|
|
377
|
+
match type(t):
|
|
378
|
+
case snowpark_type.ArrayType:
|
|
379
|
+
return f"Array[{map_snowpark_type_to_scala_type(t.element_type)}]"
|
|
380
|
+
case snowpark_type.BinaryType:
|
|
381
|
+
return "Array[Byte]"
|
|
382
|
+
case snowpark_type.BooleanType:
|
|
383
|
+
return "Boolean"
|
|
384
|
+
case snowpark_type.ByteType:
|
|
385
|
+
return "Byte"
|
|
386
|
+
case snowpark_type.DateType:
|
|
387
|
+
return "java.sql.Date"
|
|
388
|
+
case snowpark_type.DecimalType:
|
|
389
|
+
return "java.math.BigDecimal"
|
|
390
|
+
case snowpark_type.DoubleType:
|
|
391
|
+
return "Double"
|
|
392
|
+
case snowpark_type.FloatType:
|
|
393
|
+
return "Float"
|
|
394
|
+
case snowpark_type.GeographyType:
|
|
395
|
+
return "Geography"
|
|
396
|
+
case snowpark_type.IntegerType:
|
|
397
|
+
return "Int"
|
|
398
|
+
case snowpark_type.LongType:
|
|
399
|
+
return "Long"
|
|
400
|
+
case snowpark_type.MapType: # can also map to OBJECT in Snowflake
|
|
401
|
+
key_type = map_snowpark_type_to_scala_type(t.key_type)
|
|
402
|
+
value_type = map_snowpark_type_to_scala_type(t.value_type)
|
|
403
|
+
return f"Map[{key_type}, {value_type}]"
|
|
404
|
+
case snowpark_type.NullType:
|
|
405
|
+
return "String" # cannot set the return type to Null in Snowpark Scala UDFs
|
|
406
|
+
case snowpark_type.ShortType:
|
|
407
|
+
return "Short"
|
|
408
|
+
case snowpark_type.StringType:
|
|
409
|
+
return "String"
|
|
410
|
+
case snowpark_type.TimestampType:
|
|
411
|
+
return "java.sql.Timestamp"
|
|
412
|
+
case snowpark_type.VariantType:
|
|
413
|
+
return "Variant"
|
|
414
|
+
case _:
|
|
415
|
+
raise ValueError(f"Unsupported Snowpark type: {t}")
|
|
416
|
+
|
|
417
|
+
|
|
418
|
+
def map_snowpark_type_to_snowflake_type(t: snowpark_type.DataType) -> str:
|
|
419
|
+
"""
|
|
420
|
+
Maps a Snowpark type to a Snowflake type string.
|
|
421
|
+
|
|
422
|
+
Converts Snowpark DataType objects to their corresponding Snowflake SQL type names.
|
|
423
|
+
This mapping is used when generating CREATE FUNCTION SQL statements.
|
|
424
|
+
|
|
425
|
+
Args:
|
|
426
|
+
t: Snowpark DataType to convert
|
|
427
|
+
|
|
428
|
+
Returns:
|
|
429
|
+
String representation of the corresponding Snowflake type
|
|
430
|
+
|
|
431
|
+
Raises:
|
|
432
|
+
ValueError: If the Snowpark type is not supported
|
|
433
|
+
"""
|
|
434
|
+
match type(t):
|
|
435
|
+
case snowpark_type.ArrayType:
|
|
436
|
+
return f"ARRAY({map_snowpark_type_to_snowflake_type(t.element_type)})"
|
|
437
|
+
case snowpark_type.BinaryType:
|
|
438
|
+
return "BINARY"
|
|
439
|
+
case snowpark_type.BooleanType:
|
|
440
|
+
return "BOOLEAN"
|
|
441
|
+
case snowpark_type.ByteType:
|
|
442
|
+
return "TINYINT"
|
|
443
|
+
case snowpark_type.DateType:
|
|
444
|
+
return "DATE"
|
|
445
|
+
case snowpark_type.DecimalType:
|
|
446
|
+
return "NUMBER"
|
|
447
|
+
case snowpark_type.DoubleType:
|
|
448
|
+
return "DOUBLE"
|
|
449
|
+
case snowpark_type.FloatType:
|
|
450
|
+
return "FLOAT"
|
|
451
|
+
case snowpark_type.GeographyType:
|
|
452
|
+
return "GEOGRAPHY"
|
|
453
|
+
case snowpark_type.IntegerType:
|
|
454
|
+
return "INT"
|
|
455
|
+
case snowpark_type.LongType:
|
|
456
|
+
return "BIGINT"
|
|
457
|
+
case snowpark_type.MapType:
|
|
458
|
+
# Maps to OBJECT in Snowflake if key and value types are not specified.
|
|
459
|
+
key_type = map_snowpark_type_to_snowflake_type(t.key_type)
|
|
460
|
+
value_type = map_snowpark_type_to_snowflake_type(t.value_type)
|
|
461
|
+
return (
|
|
462
|
+
f"MAP({key_type}, {value_type})"
|
|
463
|
+
if key_type and value_type
|
|
464
|
+
else "OBJECT"
|
|
465
|
+
)
|
|
466
|
+
case snowpark_type.NullType:
|
|
467
|
+
return "VARCHAR"
|
|
468
|
+
case snowpark_type.ShortType:
|
|
469
|
+
return "SMALLINT"
|
|
470
|
+
case snowpark_type.StringType:
|
|
471
|
+
return "VARCHAR"
|
|
472
|
+
case snowpark_type.TimestampType:
|
|
473
|
+
return "TIMESTAMP"
|
|
474
|
+
case snowpark_type.VariantType:
|
|
475
|
+
return "VARIANT"
|
|
476
|
+
case _:
|
|
477
|
+
raise ValueError(f"Unsupported Snowpark type: {t}")
|
|
478
|
+
|
|
479
|
+
|
|
480
|
+
def map_spark_type_to_scala_type(t: types_proto.DataType) -> str:
|
|
481
|
+
"""
|
|
482
|
+
Maps a Spark DataType (from protobuf) to a Scala type string.
|
|
483
|
+
|
|
484
|
+
Converts Spark protobuf DataType objects to their corresponding Scala type names.
|
|
485
|
+
This mapping is used when working with Spark Connect protobuf types.
|
|
486
|
+
|
|
487
|
+
Args:
|
|
488
|
+
t: Spark protobuf DataType to convert
|
|
489
|
+
|
|
490
|
+
Returns:
|
|
491
|
+
String representation of the corresponding Scala type
|
|
492
|
+
|
|
493
|
+
Raises:
|
|
494
|
+
ValueError: If the Spark type is not supported
|
|
495
|
+
"""
|
|
496
|
+
match t.WhichOneof("kind"):
|
|
497
|
+
case "array":
|
|
498
|
+
return f"Array[{map_spark_type_to_scala_type(t.array.element_type)}]"
|
|
499
|
+
case "binary":
|
|
500
|
+
return "Array[Byte]"
|
|
501
|
+
case "boolean":
|
|
502
|
+
return "Boolean"
|
|
503
|
+
case "byte":
|
|
504
|
+
return "Byte"
|
|
505
|
+
case "date":
|
|
506
|
+
return "java.sql.Date"
|
|
507
|
+
case "decimal":
|
|
508
|
+
return "java.math.BigDecimal"
|
|
509
|
+
case "double":
|
|
510
|
+
return "Double"
|
|
511
|
+
case "float":
|
|
512
|
+
return "Float"
|
|
513
|
+
case "integer":
|
|
514
|
+
return "Int"
|
|
515
|
+
case "long":
|
|
516
|
+
return "Long"
|
|
517
|
+
case "map":
|
|
518
|
+
key_type = map_spark_type_to_scala_type(t.map.key_type)
|
|
519
|
+
value_type = map_spark_type_to_scala_type(t.map.value_type)
|
|
520
|
+
return f"Map[{key_type}, {value_type}]"
|
|
521
|
+
case "null":
|
|
522
|
+
return "String" # cannot set the return type to Null in Snowpark Scala UDFs
|
|
523
|
+
case "short":
|
|
524
|
+
return "Short"
|
|
525
|
+
case "string" | "char" | "varchar":
|
|
526
|
+
return "String"
|
|
527
|
+
case "timestamp" | "timestamp_ntz":
|
|
528
|
+
return "java.sql.Timestamp"
|
|
529
|
+
case _:
|
|
530
|
+
raise ValueError(f"Unsupported Spark type: {t}")
|
|
531
|
+
|
|
532
|
+
|
|
533
|
+
def map_spark_type_to_snowflake_type(t: types_proto.DataType) -> str:
|
|
534
|
+
"""
|
|
535
|
+
Maps a Spark DataType (from protobuf) to a Snowflake type string.
|
|
536
|
+
|
|
537
|
+
Converts Spark protobuf DataType objects to their corresponding Snowflake SQL type names.
|
|
538
|
+
This mapping is used when working with Spark Connect protobuf types in Snowflake UDFs.
|
|
539
|
+
|
|
540
|
+
Args:
|
|
541
|
+
t: Spark protobuf DataType to convert
|
|
542
|
+
|
|
543
|
+
Returns:
|
|
544
|
+
String representation of the corresponding Snowflake type
|
|
545
|
+
|
|
546
|
+
Raises:
|
|
547
|
+
ValueError: If the Spark type is not supported
|
|
548
|
+
"""
|
|
549
|
+
match t.WhichOneof("kind"):
|
|
550
|
+
case "array":
|
|
551
|
+
return f"ARRAY({map_spark_type_to_snowflake_type(t.array.element_type)})"
|
|
552
|
+
case "binary":
|
|
553
|
+
return "BINARY"
|
|
554
|
+
case "boolean":
|
|
555
|
+
return "BOOLEAN"
|
|
556
|
+
case "byte":
|
|
557
|
+
return "TINYINT"
|
|
558
|
+
case "date":
|
|
559
|
+
return "DATE"
|
|
560
|
+
case "decimal":
|
|
561
|
+
return "NUMBER"
|
|
562
|
+
case "double":
|
|
563
|
+
return "DOUBLE"
|
|
564
|
+
case "float":
|
|
565
|
+
return "FLOAT"
|
|
566
|
+
case "integer":
|
|
567
|
+
return "INT"
|
|
568
|
+
case "long":
|
|
569
|
+
return "BIGINT"
|
|
570
|
+
case "map":
|
|
571
|
+
# Maps to OBJECT in Snowflake if key and value types are not specified.
|
|
572
|
+
key_type = map_spark_type_to_snowflake_type(t.map.key_type)
|
|
573
|
+
value_type = map_spark_type_to_snowflake_type(t.map.value_type)
|
|
574
|
+
return (
|
|
575
|
+
f"MAP({key_type}, {value_type})"
|
|
576
|
+
if key_type and value_type
|
|
577
|
+
else "OBJECT"
|
|
578
|
+
)
|
|
579
|
+
case "null":
|
|
580
|
+
return "VARCHAR"
|
|
581
|
+
case "short":
|
|
582
|
+
return "SMALLINT"
|
|
583
|
+
case "string" | "char" | "varchar":
|
|
584
|
+
return "VARCHAR"
|
|
585
|
+
case "timestamp" | "timestamp_ntz":
|
|
586
|
+
return "TIMESTAMP"
|
|
587
|
+
case _:
|
|
588
|
+
raise ValueError(f"Unsupported Spark type: {t}")
|
|
@@ -94,12 +94,6 @@ RECORDED_CONFIG_KEYS = {
|
|
|
94
94
|
"snowpark.connect.views.duplicate_column_names_handling_mode",
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
# io types for which we don't track options
|
|
98
|
-
REDACTED_IO_TYPES = {
|
|
99
|
-
"jdbc",
|
|
100
|
-
"net.snowflake.spark.snowflake",
|
|
101
|
-
}
|
|
102
|
-
|
|
103
97
|
# these fields will be redacted when reporting the spark query plan
|
|
104
98
|
REDACTED_PLAN_SUFFIXES = [
|
|
105
99
|
# config values can be set using SQL, so we have to redact it
|
|
@@ -444,7 +438,7 @@ class Telemetry:
|
|
|
444
438
|
|
|
445
439
|
summary["udf_usage"][udf_name] += 1
|
|
446
440
|
|
|
447
|
-
def _report_io(self, op: str, type: str
|
|
441
|
+
def _report_io(self, op: str, type: str):
|
|
448
442
|
if self._not_in_request():
|
|
449
443
|
return
|
|
450
444
|
|
|
@@ -453,20 +447,15 @@ class Telemetry:
|
|
|
453
447
|
if "io" not in summary:
|
|
454
448
|
summary["io"] = []
|
|
455
449
|
|
|
456
|
-
|
|
457
|
-
io = {"op": op, "type": type}
|
|
458
|
-
else:
|
|
459
|
-
io = {"op": op, "type": type, "options": options}
|
|
460
|
-
|
|
461
|
-
summary["io"].append(io)
|
|
450
|
+
summary["io"].append({"op": op, "type": type})
|
|
462
451
|
|
|
463
452
|
@safe
|
|
464
|
-
def report_io_read(self, type: str
|
|
465
|
-
self._report_io("read", type
|
|
453
|
+
def report_io_read(self, type: str):
|
|
454
|
+
self._report_io("read", type)
|
|
466
455
|
|
|
467
456
|
@safe
|
|
468
|
-
def report_io_write(self, type: str
|
|
469
|
-
self._report_io("write", type
|
|
457
|
+
def report_io_write(self, type: str):
|
|
458
|
+
self._report_io("write", type)
|
|
470
459
|
|
|
471
460
|
@safe
|
|
472
461
|
def send_server_started_telemetry(self):
|
|
@@ -240,6 +240,8 @@ def _check_supported_udf(
|
|
|
240
240
|
raise ValueError(
|
|
241
241
|
"Function type java_udf not supported for common inline user-defined function"
|
|
242
242
|
)
|
|
243
|
+
case "scalar_scala_udf":
|
|
244
|
+
pass
|
|
243
245
|
case _ as function_type:
|
|
244
246
|
raise ValueError(
|
|
245
247
|
f"Function type {function_type} not supported for common inline user-defined function"
|