snowpark-connect 0.23.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/function_defaults.py +207 -0
- snowflake/snowpark_connect/expression/literal.py +18 -2
- snowflake/snowpark_connect/expression/map_cast.py +5 -8
- snowflake/snowpark_connect/expression/map_expression.py +10 -1
- snowflake/snowpark_connect/expression/map_extension.py +12 -2
- 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 +836 -365
- 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 +18 -36
- snowflake/snowpark_connect/relation/map_extension.py +56 -15
- snowflake/snowpark_connect/relation/map_join.py +258 -62
- snowflake/snowpark_connect/relation/map_row_ops.py +2 -29
- 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/read/utils.py +6 -7
- snowflake/snowpark_connect/relation/utils.py +1 -170
- 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.23.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/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.23.0.dist-info/RECORD +0 -893
- {snowpark_connect-0.23.0.data → snowpark_connect-0.25.0.data}/scripts/snowpark-connect +0 -0
- {snowpark_connect-0.23.0.data → snowpark_connect-0.25.0.data}/scripts/snowpark-session +0 -0
- {snowpark_connect-0.23.0.data → snowpark_connect-0.25.0.data}/scripts/snowpark-submit +0 -0
- {snowpark_connect-0.23.0.dist-info → snowpark_connect-0.25.0.dist-info}/WHEEL +0 -0
- {snowpark_connect-0.23.0.dist-info → snowpark_connect-0.25.0.dist-info}/licenses/LICENSE-binary +0 -0
- {snowpark_connect-0.23.0.dist-info → snowpark_connect-0.25.0.dist-info}/licenses/LICENSE.txt +0 -0
- {snowpark_connect-0.23.0.dist-info → snowpark_connect-0.25.0.dist-info}/licenses/NOTICE-binary +0 -0
- {snowpark_connect-0.23.0.dist-info → snowpark_connect-0.25.0.dist-info}/top_level.txt +0 -0
snowflake/snowpark_connect/includes/python/pyspark/pandas/tests/data_type_ops/test_boolean_ops.py
DELETED
|
@@ -1,825 +0,0 @@
|
|
|
1
|
-
#
|
|
2
|
-
# Licensed to the Apache Software Foundation (ASF) under one or more
|
|
3
|
-
# contributor license agreements. See the NOTICE file distributed with
|
|
4
|
-
# this work for additional information regarding copyright ownership.
|
|
5
|
-
# The ASF licenses this file to You under the Apache License, Version 2.0
|
|
6
|
-
# (the "License"); you may not use this file except in compliance with
|
|
7
|
-
# the License. You may obtain a copy of the License at
|
|
8
|
-
#
|
|
9
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
#
|
|
11
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
# See the License for the specific language governing permissions and
|
|
15
|
-
# limitations under the License.
|
|
16
|
-
#
|
|
17
|
-
|
|
18
|
-
import datetime
|
|
19
|
-
import unittest
|
|
20
|
-
from distutils.version import LooseVersion
|
|
21
|
-
|
|
22
|
-
import pandas as pd
|
|
23
|
-
import numpy as np
|
|
24
|
-
from pandas.api.types import CategoricalDtype
|
|
25
|
-
|
|
26
|
-
from pyspark import pandas as ps
|
|
27
|
-
from pyspark.pandas import option_context
|
|
28
|
-
from pyspark.pandas.tests.data_type_ops.testing_utils import OpsTestBase
|
|
29
|
-
from pyspark.pandas.typedef.typehints import (
|
|
30
|
-
extension_float_dtypes_available,
|
|
31
|
-
extension_object_dtypes_available,
|
|
32
|
-
)
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
class BooleanOpsTestsMixin:
|
|
36
|
-
@property
|
|
37
|
-
def bool_pdf(self):
|
|
38
|
-
return pd.DataFrame({"this": [True, False, True], "that": [False, True, True]})
|
|
39
|
-
|
|
40
|
-
@property
|
|
41
|
-
def bool_psdf(self):
|
|
42
|
-
return ps.from_pandas(self.bool_pdf)
|
|
43
|
-
|
|
44
|
-
def test_add(self):
|
|
45
|
-
pdf, psdf = self.pdf, self.psdf
|
|
46
|
-
|
|
47
|
-
b_pser, b_psser = pdf["bool"], psdf["bool"]
|
|
48
|
-
self.assert_eq(b_pser + 1, b_psser + 1)
|
|
49
|
-
self.assert_eq(b_pser + 0.1, b_psser + 0.1)
|
|
50
|
-
self.assert_eq(b_pser + b_pser.astype(int), b_psser + b_psser.astype(int))
|
|
51
|
-
self.assert_eq(b_pser + b_pser, b_psser + b_psser)
|
|
52
|
-
self.assert_eq(b_pser + True, b_psser + True)
|
|
53
|
-
self.assert_eq(b_pser + False, b_psser + False)
|
|
54
|
-
|
|
55
|
-
for col in self.numeric_df_cols:
|
|
56
|
-
pser, psser = pdf[col], psdf[col]
|
|
57
|
-
self.assert_eq(b_pser + pser, b_psser + psser)
|
|
58
|
-
for col in self.non_numeric_df_cols:
|
|
59
|
-
pser, psser = pdf[col], psdf[col]
|
|
60
|
-
if col == "bool":
|
|
61
|
-
self.assert_eq(b_pser + pser, b_psser + psser)
|
|
62
|
-
else:
|
|
63
|
-
self.assertRaises(TypeError, lambda: b_psser + psser)
|
|
64
|
-
|
|
65
|
-
def test_sub(self):
|
|
66
|
-
pdf, psdf = self.pdf, self.psdf
|
|
67
|
-
|
|
68
|
-
b_pser, b_psser = pdf["bool"], psdf["bool"]
|
|
69
|
-
self.assert_eq(b_pser - 1, b_psser - 1)
|
|
70
|
-
self.assert_eq(b_pser - 0.1, b_psser - 0.1)
|
|
71
|
-
self.assert_eq(b_pser - b_pser.astype(int), b_psser - b_psser.astype(int))
|
|
72
|
-
self.assertRaises(TypeError, lambda: b_psser - b_psser)
|
|
73
|
-
self.assertRaises(TypeError, lambda: b_psser - True)
|
|
74
|
-
|
|
75
|
-
for col in self.numeric_df_cols:
|
|
76
|
-
self.assert_eq(b_pser - pdf[col], b_psser - psdf[col])
|
|
77
|
-
|
|
78
|
-
for col in self.non_numeric_df_cols:
|
|
79
|
-
self.assertRaises(TypeError, lambda: b_psser - psdf[col])
|
|
80
|
-
|
|
81
|
-
def test_mul(self):
|
|
82
|
-
pdf, psdf = self.pdf, self.psdf
|
|
83
|
-
|
|
84
|
-
b_pser, b_psser = pdf["bool"], psdf["bool"]
|
|
85
|
-
self.assert_eq(b_pser * 1, b_psser * 1)
|
|
86
|
-
self.assert_eq(b_pser * 0.1, b_psser * 0.1)
|
|
87
|
-
self.assert_eq(b_pser * b_pser.astype(int), b_psser * b_psser.astype(int))
|
|
88
|
-
self.assert_eq(b_pser * b_pser, b_psser * b_psser)
|
|
89
|
-
self.assert_eq(b_pser * True, b_psser * True)
|
|
90
|
-
self.assert_eq(b_pser * False, b_psser * False)
|
|
91
|
-
|
|
92
|
-
for col in self.numeric_df_cols:
|
|
93
|
-
self.assert_eq(b_pser * pdf[col], b_psser * psdf[col])
|
|
94
|
-
|
|
95
|
-
for col in self.non_numeric_df_cols:
|
|
96
|
-
pser, psser = pdf[col], psdf[col]
|
|
97
|
-
if col == "bool":
|
|
98
|
-
self.assert_eq(b_pser * pser, b_psser * psser)
|
|
99
|
-
else:
|
|
100
|
-
self.assertRaises(TypeError, lambda: b_psser * psser)
|
|
101
|
-
|
|
102
|
-
def test_truediv(self):
|
|
103
|
-
pdf, psdf = self.pdf, self.psdf
|
|
104
|
-
|
|
105
|
-
b_pser, b_psser = pdf["bool"], psdf["bool"]
|
|
106
|
-
self.assert_eq(b_pser / 1, b_psser / 1)
|
|
107
|
-
self.assert_eq(b_pser / 0.1, b_psser / 0.1)
|
|
108
|
-
self.assert_eq(b_pser / b_pser.astype(int), b_psser / b_psser.astype(int))
|
|
109
|
-
self.assertRaises(TypeError, lambda: b_psser / b_psser)
|
|
110
|
-
self.assertRaises(TypeError, lambda: b_psser / True)
|
|
111
|
-
|
|
112
|
-
self.assert_eq(b_pser / pdf["float"], b_psser / psdf["float"])
|
|
113
|
-
|
|
114
|
-
for col in self.non_numeric_df_cols:
|
|
115
|
-
self.assertRaises(TypeError, lambda: b_psser / psdf[col])
|
|
116
|
-
|
|
117
|
-
def test_floordiv(self):
|
|
118
|
-
pdf, psdf = self.pdf, self.psdf
|
|
119
|
-
|
|
120
|
-
b_pser, b_psser = pdf["bool"], psdf["bool"]
|
|
121
|
-
|
|
122
|
-
# float is always returned in pandas-on-Spark
|
|
123
|
-
self.assert_eq((b_pser // 1).astype("float"), b_psser // 1)
|
|
124
|
-
|
|
125
|
-
# in pandas, 1 // 0.1 = 9.0; in pandas-on-Spark, 1 // 0.1 = 10.0
|
|
126
|
-
# self.assert_eq(b_pser // 0.1, b_psser // 0.1)
|
|
127
|
-
|
|
128
|
-
self.assert_eq(b_pser // b_pser.astype(int), b_psser // b_psser.astype(int))
|
|
129
|
-
self.assertRaises(TypeError, lambda: b_psser // b_psser)
|
|
130
|
-
self.assertRaises(TypeError, lambda: b_psser // True)
|
|
131
|
-
|
|
132
|
-
self.assert_eq(b_pser // pdf["float"], b_psser // psdf["float"])
|
|
133
|
-
|
|
134
|
-
for col in self.non_numeric_df_cols:
|
|
135
|
-
self.assertRaises(TypeError, lambda: b_psser // psdf[col])
|
|
136
|
-
|
|
137
|
-
def test_mod(self):
|
|
138
|
-
pdf, psdf = self.pdf, self.psdf
|
|
139
|
-
|
|
140
|
-
b_pser, b_psser = pdf["bool"], psdf["bool"]
|
|
141
|
-
self.assert_eq(b_pser % 1, b_psser % 1)
|
|
142
|
-
self.assert_eq(b_pser % 0.1, b_psser % 0.1)
|
|
143
|
-
self.assert_eq(b_pser % b_pser.astype(float), b_psser % b_psser.astype(float))
|
|
144
|
-
self.assertRaises(TypeError, lambda: b_psser % b_psser)
|
|
145
|
-
self.assertRaises(TypeError, lambda: b_psser % True)
|
|
146
|
-
|
|
147
|
-
for col in self.numeric_df_cols:
|
|
148
|
-
self.assert_eq(b_pser % pdf[col], b_psser % psdf[col])
|
|
149
|
-
|
|
150
|
-
for col in self.non_numeric_df_cols:
|
|
151
|
-
self.assertRaises(TypeError, lambda: b_psser % psdf[col])
|
|
152
|
-
|
|
153
|
-
def test_pow(self):
|
|
154
|
-
pdf, psdf = self.pdf, self.psdf
|
|
155
|
-
|
|
156
|
-
b_pser, b_psser = pdf["bool"], psdf["bool"]
|
|
157
|
-
# float is always returned in pandas-on-Spark
|
|
158
|
-
self.assert_eq((b_pser**1).astype("float"), b_psser**1)
|
|
159
|
-
self.assert_eq(b_pser**0.1, b_psser**0.1)
|
|
160
|
-
self.assert_eq(b_pser ** b_pser.astype(float), b_psser ** b_psser.astype(float))
|
|
161
|
-
self.assertRaises(TypeError, lambda: b_psser**b_psser)
|
|
162
|
-
self.assertRaises(TypeError, lambda: b_psser**True)
|
|
163
|
-
|
|
164
|
-
self.assert_eq(b_pser % pdf["float"], b_psser % psdf["float"])
|
|
165
|
-
for col in self.non_numeric_df_cols:
|
|
166
|
-
self.assertRaises(TypeError, lambda: b_psser % psdf[col])
|
|
167
|
-
|
|
168
|
-
def test_radd(self):
|
|
169
|
-
pdf, psdf = self.pdf, self.psdf
|
|
170
|
-
|
|
171
|
-
b_pser, b_psser = pdf["bool"], psdf["bool"]
|
|
172
|
-
self.assert_eq(1 + b_pser, 1 + b_psser)
|
|
173
|
-
self.assert_eq(0.1 + b_pser, 0.1 + b_psser)
|
|
174
|
-
self.assert_eq(True + b_pser, True + b_psser)
|
|
175
|
-
self.assert_eq(False + b_pser, False + b_psser)
|
|
176
|
-
self.assertRaises(TypeError, lambda: datetime.date(1994, 1, 1) + b_psser)
|
|
177
|
-
self.assertRaises(TypeError, lambda: datetime.datetime(1994, 1, 1) + b_psser)
|
|
178
|
-
|
|
179
|
-
def test_rsub(self):
|
|
180
|
-
pdf, psdf = self.pdf, self.psdf
|
|
181
|
-
|
|
182
|
-
b_pser, b_psser = pdf["bool"], psdf["bool"]
|
|
183
|
-
self.assert_eq(1 - b_pser, 1 - b_psser)
|
|
184
|
-
self.assert_eq(0.1 - b_pser, 0.1 - b_psser)
|
|
185
|
-
self.assertRaises(TypeError, lambda: "x" - b_psser)
|
|
186
|
-
self.assertRaises(TypeError, lambda: True - b_psser)
|
|
187
|
-
self.assertRaises(TypeError, lambda: datetime.date(1994, 1, 1) - b_psser)
|
|
188
|
-
self.assertRaises(TypeError, lambda: datetime.datetime(1994, 1, 1) - b_psser)
|
|
189
|
-
|
|
190
|
-
def test_rmul(self):
|
|
191
|
-
pdf, psdf = self.pdf, self.psdf
|
|
192
|
-
|
|
193
|
-
b_pser, b_psser = pdf["bool"], psdf["bool"]
|
|
194
|
-
self.assert_eq(1 * b_pser, 1 * b_psser)
|
|
195
|
-
self.assert_eq(0.1 * b_pser, 0.1 * b_psser)
|
|
196
|
-
self.assertRaises(TypeError, lambda: "x" * b_psser)
|
|
197
|
-
self.assert_eq(True * b_pser, True * b_psser)
|
|
198
|
-
self.assert_eq(False * b_pser, False * b_psser)
|
|
199
|
-
self.assertRaises(TypeError, lambda: datetime.date(1994, 1, 1) * b_psser)
|
|
200
|
-
self.assertRaises(TypeError, lambda: datetime.datetime(1994, 1, 1) * b_psser)
|
|
201
|
-
|
|
202
|
-
def test_rtruediv(self):
|
|
203
|
-
pdf, psdf = self.pdf, self.psdf
|
|
204
|
-
|
|
205
|
-
b_pser, b_psser = pdf["bool"], psdf["bool"]
|
|
206
|
-
self.assert_eq(1 / b_pser, 1 / b_psser)
|
|
207
|
-
self.assert_eq(0.1 / b_pser, 0.1 / b_psser)
|
|
208
|
-
self.assertRaises(TypeError, lambda: "x" / b_psser)
|
|
209
|
-
self.assertRaises(TypeError, lambda: True / b_psser)
|
|
210
|
-
self.assertRaises(TypeError, lambda: datetime.date(1994, 1, 1) / b_psser)
|
|
211
|
-
self.assertRaises(TypeError, lambda: datetime.datetime(1994, 1, 1) / b_psser)
|
|
212
|
-
|
|
213
|
-
def test_rfloordiv(self):
|
|
214
|
-
pdf, psdf = self.pdf, self.psdf
|
|
215
|
-
|
|
216
|
-
b_pser, b_psser = pdf["bool"], psdf["bool"]
|
|
217
|
-
self.assert_eq(1 // b_pser, 1 // b_psser)
|
|
218
|
-
self.assert_eq(0.1 // b_pser, 0.1 // b_psser)
|
|
219
|
-
self.assertRaises(TypeError, lambda: "x" // b_psser)
|
|
220
|
-
self.assertRaises(TypeError, lambda: True // b_psser)
|
|
221
|
-
self.assertRaises(TypeError, lambda: datetime.date(1994, 1, 1) // b_psser)
|
|
222
|
-
self.assertRaises(TypeError, lambda: datetime.datetime(1994, 1, 1) // b_psser)
|
|
223
|
-
|
|
224
|
-
def test_rpow(self):
|
|
225
|
-
pdf, psdf = self.pdf, self.psdf
|
|
226
|
-
|
|
227
|
-
b_pser, b_psser = pdf["bool"], psdf["bool"]
|
|
228
|
-
# float is returned always in pandas-on-Spark
|
|
229
|
-
self.assert_eq((1**b_pser).astype(float), 1**b_psser)
|
|
230
|
-
self.assert_eq(0.1**b_pser, 0.1**b_psser)
|
|
231
|
-
self.assertRaises(TypeError, lambda: "x" ** b_psser)
|
|
232
|
-
self.assertRaises(TypeError, lambda: True**b_psser)
|
|
233
|
-
self.assertRaises(TypeError, lambda: datetime.date(1994, 1, 1) ** b_psser)
|
|
234
|
-
self.assertRaises(TypeError, lambda: datetime.datetime(1994, 1, 1) ** b_psser)
|
|
235
|
-
|
|
236
|
-
def test_rmod(self):
|
|
237
|
-
psdf = self.psdf
|
|
238
|
-
|
|
239
|
-
b_psser = psdf["bool"]
|
|
240
|
-
# 1 % False is 0.0 in pandas
|
|
241
|
-
self.assert_eq(pd.Series([0, 0, None], dtype=float, name="bool"), 1 % b_psser)
|
|
242
|
-
# 0.1 / True is 0.1 in pandas
|
|
243
|
-
self.assert_eq(
|
|
244
|
-
pd.Series([0.10000000000000009, 0.10000000000000009, None], dtype=float, name="bool"),
|
|
245
|
-
0.1 % b_psser,
|
|
246
|
-
)
|
|
247
|
-
self.assertRaises(TypeError, lambda: datetime.date(1994, 1, 1) % b_psser)
|
|
248
|
-
self.assertRaises(TypeError, lambda: True % b_psser)
|
|
249
|
-
|
|
250
|
-
def test_and(self):
|
|
251
|
-
pdf, psdf = self.bool_pdf, self.bool_psdf
|
|
252
|
-
pser, other_pser = pdf["this"], pdf["that"]
|
|
253
|
-
psser, other_psser = psdf["this"], psdf["that"]
|
|
254
|
-
|
|
255
|
-
self.assert_eq(pser & True, psser & True)
|
|
256
|
-
self.assert_eq(pser & False, psser & False)
|
|
257
|
-
self.assert_eq(pser & pser, psser & psser)
|
|
258
|
-
self.assert_eq(pser & other_pser, psser & other_psser)
|
|
259
|
-
self.assert_eq(other_pser & pser, other_psser & psser)
|
|
260
|
-
|
|
261
|
-
def test_rand(self):
|
|
262
|
-
pser, psser = self.pdf["bool"], self.psdf["bool"]
|
|
263
|
-
self.assert_eq(True & pser, True & psser)
|
|
264
|
-
self.assert_eq(False & pser, False & psser)
|
|
265
|
-
|
|
266
|
-
def test_or(self):
|
|
267
|
-
pdf, psdf = self.bool_pdf, self.bool_psdf
|
|
268
|
-
pser, other_pser = pdf["this"], pdf["that"]
|
|
269
|
-
psser, other_psser = psdf["this"], psdf["that"]
|
|
270
|
-
|
|
271
|
-
self.assert_eq(pser | True, psser | True)
|
|
272
|
-
self.assert_eq(pser | False, psser | False)
|
|
273
|
-
self.assert_eq(pser | pser, psser | psser)
|
|
274
|
-
self.assert_eq(True | pser, True | psser)
|
|
275
|
-
self.assert_eq(False | pser, False | psser)
|
|
276
|
-
|
|
277
|
-
self.assert_eq(pser | other_pser, psser | other_psser)
|
|
278
|
-
self.assert_eq(other_pser | pser, other_psser | psser)
|
|
279
|
-
|
|
280
|
-
def test_ror(self):
|
|
281
|
-
pser, psser = self.pdf["bool"], self.psdf["bool"]
|
|
282
|
-
self.assert_eq(True | pser, True | psser)
|
|
283
|
-
self.assert_eq(False | pser, False | psser)
|
|
284
|
-
|
|
285
|
-
def test_xor(self):
|
|
286
|
-
pdf, psdf = self.bool_pdf, self.bool_psdf
|
|
287
|
-
pser, other_pser = pdf["this"], pdf["that"]
|
|
288
|
-
psser, other_psser = psdf["this"], psdf["that"]
|
|
289
|
-
|
|
290
|
-
self.assert_eq(pser ^ other_pser, psser ^ other_psser)
|
|
291
|
-
self.assert_eq(pser ^ True, psser ^ True)
|
|
292
|
-
self.assert_eq(pser ^ False, psser ^ False)
|
|
293
|
-
self.assert_eq(pser ^ 2, psser ^ 2)
|
|
294
|
-
self.assert_eq(pser ^ 99, psser ^ 99)
|
|
295
|
-
|
|
296
|
-
with self.assertRaisesRegex(TypeError, "XOR can not be applied to given types."):
|
|
297
|
-
psser ^ "a"
|
|
298
|
-
|
|
299
|
-
with option_context("compute.ops_on_diff_frames", True):
|
|
300
|
-
pser, other_pser = self.pdf["bool"], self.integral_pdf["this"]
|
|
301
|
-
psser, other_psser = self.psdf["bool"], self.integral_psdf["this"]
|
|
302
|
-
|
|
303
|
-
self.assert_eq(pser ^ other_pser, psser ^ other_psser)
|
|
304
|
-
|
|
305
|
-
def test_rxor(self):
|
|
306
|
-
pser, psser = self.pdf["bool"], self.psdf["bool"]
|
|
307
|
-
self.assert_eq(True ^ pser, True ^ psser)
|
|
308
|
-
self.assert_eq(False ^ pser, False ^ psser)
|
|
309
|
-
self.assert_eq(1 ^ pser, 1 ^ psser)
|
|
310
|
-
|
|
311
|
-
def test_isnull(self):
|
|
312
|
-
self.assert_eq(self.pdf["bool"].isnull(), self.psdf["bool"].isnull())
|
|
313
|
-
|
|
314
|
-
def test_astype(self):
|
|
315
|
-
pser, psser = self.pdf["bool"], self.psdf["bool"]
|
|
316
|
-
self.assert_eq(pser.astype(int), psser.astype(int))
|
|
317
|
-
self.assert_eq(pser.astype(float), psser.astype(float))
|
|
318
|
-
self.assert_eq(pser.astype(np.float32), psser.astype(np.float32))
|
|
319
|
-
self.assert_eq(pser.astype(np.int32), psser.astype(np.int32))
|
|
320
|
-
self.assert_eq(pser.astype(np.int16), psser.astype(np.int16))
|
|
321
|
-
self.assert_eq(pser.astype(np.int8), psser.astype(np.int8))
|
|
322
|
-
self.assert_eq(pser.astype(str), psser.astype(str))
|
|
323
|
-
self.assert_eq(pser.astype(bool), psser.astype(bool))
|
|
324
|
-
self.assert_eq(pser.astype("category"), psser.astype("category"))
|
|
325
|
-
cat_type = CategoricalDtype(categories=[False, True])
|
|
326
|
-
self.assert_eq(pser.astype(cat_type), psser.astype(cat_type))
|
|
327
|
-
|
|
328
|
-
def test_neg(self):
|
|
329
|
-
self.assert_eq(-self.pdf["bool"], -self.psdf["bool"])
|
|
330
|
-
|
|
331
|
-
def test_abs(self):
|
|
332
|
-
self.assert_eq(abs(self.pdf["bool"]), abs(self.psdf["bool"]))
|
|
333
|
-
|
|
334
|
-
def test_invert(self):
|
|
335
|
-
self.assert_eq(~self.pdf["bool"], ~self.psdf["bool"])
|
|
336
|
-
|
|
337
|
-
def test_eq(self):
|
|
338
|
-
pdf, psdf = self.bool_pdf, self.bool_psdf
|
|
339
|
-
pser, other_pser = pdf["this"], pdf["that"]
|
|
340
|
-
psser, other_psser = psdf["this"], psdf["that"]
|
|
341
|
-
self.assert_eq(pser == other_pser, psser == other_psser)
|
|
342
|
-
self.assert_eq(pser == pser, psser == psser)
|
|
343
|
-
|
|
344
|
-
def test_ne(self):
|
|
345
|
-
pdf, psdf = self.bool_pdf, self.bool_psdf
|
|
346
|
-
pser, other_pser = pdf["this"], pdf["that"]
|
|
347
|
-
psser, other_psser = psdf["this"], psdf["that"]
|
|
348
|
-
self.assert_eq(pser != other_pser, psser != other_psser)
|
|
349
|
-
self.assert_eq(pser != pser, psser != psser)
|
|
350
|
-
|
|
351
|
-
def test_lt(self):
|
|
352
|
-
pdf, psdf = self.bool_pdf, self.bool_psdf
|
|
353
|
-
pser, other_pser = pdf["this"], pdf["that"]
|
|
354
|
-
psser, other_psser = psdf["this"], psdf["that"]
|
|
355
|
-
self.assert_eq(pser < other_pser, psser < other_psser)
|
|
356
|
-
self.assert_eq(pser < pser, psser < psser)
|
|
357
|
-
|
|
358
|
-
def test_le(self):
|
|
359
|
-
pdf, psdf = self.bool_pdf, self.bool_psdf
|
|
360
|
-
pser, other_pser = pdf["this"], pdf["that"]
|
|
361
|
-
psser, other_psser = psdf["this"], psdf["that"]
|
|
362
|
-
self.assert_eq(pser <= other_pser, psser <= other_psser)
|
|
363
|
-
self.assert_eq(pser <= pser, psser <= psser)
|
|
364
|
-
|
|
365
|
-
def test_gt(self):
|
|
366
|
-
pdf, psdf = self.bool_pdf, self.bool_psdf
|
|
367
|
-
pser, other_pser = pdf["this"], pdf["that"]
|
|
368
|
-
psser, other_psser = psdf["this"], psdf["that"]
|
|
369
|
-
self.assert_eq(pser > other_pser, psser > other_psser)
|
|
370
|
-
self.assert_eq(pser > pser, psser > psser)
|
|
371
|
-
|
|
372
|
-
def test_ge(self):
|
|
373
|
-
pdf, psdf = self.bool_pdf, self.bool_psdf
|
|
374
|
-
pser, other_pser = pdf["this"], pdf["that"]
|
|
375
|
-
psser, other_psser = psdf["this"], psdf["that"]
|
|
376
|
-
self.assert_eq(pser >= other_pser, psser >= other_psser)
|
|
377
|
-
self.assert_eq(pser >= pser, psser >= psser)
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
@unittest.skipIf(
|
|
381
|
-
not extension_object_dtypes_available, "pandas extension object dtypes are not available"
|
|
382
|
-
)
|
|
383
|
-
class BooleanExtensionOpsTest(OpsTestBase):
|
|
384
|
-
@property
|
|
385
|
-
def boolean_pdf(self):
|
|
386
|
-
return pd.DataFrame(
|
|
387
|
-
{"this": [True, False, None], "that": [False, None, True]}, dtype="boolean"
|
|
388
|
-
)
|
|
389
|
-
|
|
390
|
-
@property
|
|
391
|
-
def boolean_psdf(self):
|
|
392
|
-
return ps.from_pandas(self.boolean_pdf)
|
|
393
|
-
|
|
394
|
-
@property
|
|
395
|
-
def boolean_numeric_pdf(self):
|
|
396
|
-
return pd.concat([self.boolean_pdf, self.numeric_pdf], axis=1)
|
|
397
|
-
|
|
398
|
-
@property
|
|
399
|
-
def boolean_numeric_psdf(self):
|
|
400
|
-
return ps.from_pandas(self.boolean_numeric_pdf)
|
|
401
|
-
|
|
402
|
-
@property
|
|
403
|
-
def boolean_non_numeric_pdf(self):
|
|
404
|
-
return pd.concat([self.boolean_pdf, self.non_numeric_pdf], axis=1)
|
|
405
|
-
|
|
406
|
-
@property
|
|
407
|
-
def boolean_non_numeric_psdf(self):
|
|
408
|
-
return ps.from_pandas(self.boolean_non_numeric_pdf)
|
|
409
|
-
|
|
410
|
-
def test_add(self):
|
|
411
|
-
pser, psser = self.boolean_pdf["this"], self.boolean_psdf["this"]
|
|
412
|
-
self.check_extension(pser + 1, psser + 1)
|
|
413
|
-
if extension_float_dtypes_available:
|
|
414
|
-
self.check_extension(pser + 0.1, psser + 0.1)
|
|
415
|
-
else:
|
|
416
|
-
self.assert_eq(pser + 0.1, psser + 0.1)
|
|
417
|
-
|
|
418
|
-
# In pandas, NA | True is NA, whereas NA | True is True in pandas-on-Spark
|
|
419
|
-
self.check_extension(
|
|
420
|
-
pd.Series([True, True, True], dtype="boolean", name=psser.name), psser + True
|
|
421
|
-
)
|
|
422
|
-
self.check_extension(pser + False, psser + False)
|
|
423
|
-
self.check_extension(pser + pser, psser + psser)
|
|
424
|
-
|
|
425
|
-
pdf, psdf = self.boolean_numeric_pdf, self.boolean_numeric_psdf
|
|
426
|
-
for col in self.numeric_df_cols:
|
|
427
|
-
self.assert_eq(pdf["this"] + pdf[col], psdf["this"] + psdf[col], almost=True)
|
|
428
|
-
|
|
429
|
-
pdf, psdf = self.boolean_non_numeric_pdf, self.boolean_non_numeric_psdf
|
|
430
|
-
for col in self.non_numeric_df_cols:
|
|
431
|
-
if col == "bool":
|
|
432
|
-
self.check_extension(pdf["this"] + pdf[col], psdf["this"] + psdf[col])
|
|
433
|
-
else:
|
|
434
|
-
self.assertRaises(TypeError, lambda: psdf["this"] + psdf[col])
|
|
435
|
-
|
|
436
|
-
def test_sub(self):
|
|
437
|
-
pser, psser = self.boolean_pdf["this"], self.boolean_psdf["this"]
|
|
438
|
-
self.check_extension(pser - 1, psser - 1)
|
|
439
|
-
if extension_float_dtypes_available:
|
|
440
|
-
self.check_extension(pser - 0.1, psser - 0.1)
|
|
441
|
-
else:
|
|
442
|
-
self.assert_eq(pser - 0.1, psser - 0.1)
|
|
443
|
-
self.assertRaises(TypeError, lambda: psser - psser)
|
|
444
|
-
self.assertRaises(TypeError, lambda: psser - True)
|
|
445
|
-
|
|
446
|
-
pdf, psdf = self.boolean_numeric_pdf, self.boolean_numeric_psdf
|
|
447
|
-
for col in self.numeric_df_cols:
|
|
448
|
-
self.assert_eq(pdf["this"] - pdf[col], psdf["this"] - psdf[col], almost=True)
|
|
449
|
-
|
|
450
|
-
pdf, psdf = self.boolean_non_numeric_pdf, self.boolean_non_numeric_psdf
|
|
451
|
-
for col in self.non_numeric_df_cols:
|
|
452
|
-
self.assertRaises(TypeError, lambda: psdf["this"] - psdf[col])
|
|
453
|
-
|
|
454
|
-
def test_mul(self):
|
|
455
|
-
pser, psser = self.boolean_pdf["this"], self.boolean_psdf["this"]
|
|
456
|
-
self.check_extension(pser * 1, psser * 1)
|
|
457
|
-
if extension_float_dtypes_available:
|
|
458
|
-
self.check_extension(pser * 0.1, psser * 0.1)
|
|
459
|
-
else:
|
|
460
|
-
self.assert_eq(pser * 0.1, psser * 0.1)
|
|
461
|
-
|
|
462
|
-
# In pandas, NA & False is NA, whereas NA & False is False in pandas-on-Spark
|
|
463
|
-
self.check_extension(pser * True, psser * True)
|
|
464
|
-
self.check_extension(
|
|
465
|
-
pd.Series([False, False, False], dtype="boolean", name=psser.name), psser * False
|
|
466
|
-
)
|
|
467
|
-
self.check_extension(pser * pser, psser * psser)
|
|
468
|
-
|
|
469
|
-
pdf, psdf = self.boolean_numeric_pdf, self.boolean_numeric_psdf
|
|
470
|
-
for col in self.numeric_df_cols:
|
|
471
|
-
self.assert_eq(pdf["this"] * pdf[col], psdf["this"] * psdf[col], almost=True)
|
|
472
|
-
|
|
473
|
-
pdf, psdf = self.boolean_non_numeric_pdf, self.boolean_non_numeric_psdf
|
|
474
|
-
for col in self.non_numeric_df_cols:
|
|
475
|
-
if col == "bool":
|
|
476
|
-
self.check_extension(pdf["that"] * pdf[col], psdf["that"] * psdf[col])
|
|
477
|
-
else:
|
|
478
|
-
self.assertRaises(TypeError, lambda: psdf["this"] * psdf[col])
|
|
479
|
-
|
|
480
|
-
def test_truediv(self):
|
|
481
|
-
pdf, psdf = self.boolean_numeric_pdf, self.boolean_numeric_psdf
|
|
482
|
-
pser, psser = pdf["this"], psdf["this"]
|
|
483
|
-
if extension_float_dtypes_available:
|
|
484
|
-
self.check_extension(pser / 1, psser / 1)
|
|
485
|
-
self.check_extension(pser / 0.1, psser / 0.1)
|
|
486
|
-
else:
|
|
487
|
-
self.assert_eq(pser / 1, psser / 1)
|
|
488
|
-
self.assert_eq(pser / 0.1, psser / 0.1)
|
|
489
|
-
self.assertRaises(TypeError, lambda: psser / psser)
|
|
490
|
-
self.assertRaises(TypeError, lambda: psser / True)
|
|
491
|
-
|
|
492
|
-
self.assert_eq(
|
|
493
|
-
pser / pdf["float"],
|
|
494
|
-
psser / psdf["float"],
|
|
495
|
-
almost=True,
|
|
496
|
-
)
|
|
497
|
-
psdf = self.boolean_non_numeric_psdf
|
|
498
|
-
for col in self.non_numeric_df_cols:
|
|
499
|
-
self.assertRaises(TypeError, lambda: psdf["this"] / psdf[col])
|
|
500
|
-
|
|
501
|
-
def test_floordiv(self):
|
|
502
|
-
pdf, psdf = self.boolean_numeric_pdf, self.boolean_numeric_psdf
|
|
503
|
-
pser, psser = pdf["this"], psdf["this"]
|
|
504
|
-
|
|
505
|
-
# float is always returned in pandas-on-Spark
|
|
506
|
-
if extension_float_dtypes_available:
|
|
507
|
-
self.check_extension((pser // 1).astype("Float64"), psser // 1)
|
|
508
|
-
else:
|
|
509
|
-
self.assert_eq((pser // 1).astype("float"), psser // 1)
|
|
510
|
-
|
|
511
|
-
# in pandas, 1 // 0.1 = 9.0; in pandas-on-Spark, 1 // 0.1 = 10.0
|
|
512
|
-
# self.assert_eq(pser // 0.1, psser // 0.1)
|
|
513
|
-
|
|
514
|
-
self.assertRaises(TypeError, lambda: psser // psser)
|
|
515
|
-
self.assertRaises(TypeError, lambda: psser // True)
|
|
516
|
-
|
|
517
|
-
self.assert_eq(
|
|
518
|
-
pser // pdf["float"],
|
|
519
|
-
psser // psdf["float"],
|
|
520
|
-
almost=True,
|
|
521
|
-
)
|
|
522
|
-
psdf = self.boolean_non_numeric_psdf
|
|
523
|
-
for col in self.non_numeric_df_cols:
|
|
524
|
-
self.assertRaises(TypeError, lambda: psdf["this"] // psdf[col])
|
|
525
|
-
|
|
526
|
-
def test_mod(self):
|
|
527
|
-
pdf, psdf = self.boolean_numeric_pdf, self.boolean_numeric_psdf
|
|
528
|
-
pser, psser = pdf["this"], psdf["this"]
|
|
529
|
-
self.check_extension(pser % 1, psser % 1)
|
|
530
|
-
if extension_float_dtypes_available:
|
|
531
|
-
self.check_extension(pser % 0.1, psser % 0.1)
|
|
532
|
-
else:
|
|
533
|
-
self.assert_eq(pser % 0.1, psser % 0.1)
|
|
534
|
-
self.assertRaises(TypeError, lambda: psser % psser)
|
|
535
|
-
self.assertRaises(TypeError, lambda: psser % True)
|
|
536
|
-
|
|
537
|
-
pdf, psdf = self.boolean_numeric_pdf, self.boolean_numeric_psdf
|
|
538
|
-
for col in self.numeric_df_cols:
|
|
539
|
-
self.assert_eq(pdf["this"] % pdf[col], psdf["this"] % psdf[col], almost=True)
|
|
540
|
-
|
|
541
|
-
psdf = self.boolean_non_numeric_psdf
|
|
542
|
-
for col in self.non_numeric_df_cols:
|
|
543
|
-
self.assertRaises(TypeError, lambda: psdf["this"] % psdf[col])
|
|
544
|
-
|
|
545
|
-
def test_pow(self):
|
|
546
|
-
pdf, psdf = self.boolean_numeric_pdf, self.boolean_numeric_psdf
|
|
547
|
-
pser, psser = pdf["this"], psdf["this"]
|
|
548
|
-
# float is always returned in pandas-on-Spark
|
|
549
|
-
if extension_float_dtypes_available:
|
|
550
|
-
self.check_extension((pser**1).astype("Float64"), psser**1)
|
|
551
|
-
self.check_extension((pser**0.1).astype("Float64"), psser**0.1)
|
|
552
|
-
self.check_extension(
|
|
553
|
-
(pser ** pser.astype(float)).astype("Float64"), psser ** psser.astype(float)
|
|
554
|
-
)
|
|
555
|
-
else:
|
|
556
|
-
self.assert_eq((pser**1).astype("float"), psser**1)
|
|
557
|
-
self.assert_eq((pser**0.1).astype("float"), psser**0.1)
|
|
558
|
-
self.assert_eq(
|
|
559
|
-
(pser ** pser.astype(float)).astype("float"), psser ** psser.astype(float)
|
|
560
|
-
)
|
|
561
|
-
self.assertRaises(TypeError, lambda: psser**psser)
|
|
562
|
-
self.assertRaises(TypeError, lambda: psser**True)
|
|
563
|
-
|
|
564
|
-
self.assert_eq(
|
|
565
|
-
pser ** pdf["float"],
|
|
566
|
-
psser ** psdf["float"],
|
|
567
|
-
almost=True,
|
|
568
|
-
)
|
|
569
|
-
psdf = self.boolean_non_numeric_psdf
|
|
570
|
-
for col in self.non_numeric_df_cols:
|
|
571
|
-
self.assertRaises(TypeError, lambda: psdf["this"] % psdf[col])
|
|
572
|
-
|
|
573
|
-
def test_radd(self):
|
|
574
|
-
pser, psser = self.boolean_pdf["this"], self.boolean_psdf["this"]
|
|
575
|
-
|
|
576
|
-
self.check_extension(1 + pser, 1 + psser)
|
|
577
|
-
if extension_float_dtypes_available:
|
|
578
|
-
self.check_extension(0.1 + pser, 0.1 + psser)
|
|
579
|
-
else:
|
|
580
|
-
self.assert_eq(0.1 + pser, 0.1 + psser)
|
|
581
|
-
self.assertRaises(TypeError, lambda: "x" + psser)
|
|
582
|
-
|
|
583
|
-
# In pandas, NA | True is NA, whereas NA | True is True in pandas-on-Spark
|
|
584
|
-
self.check_extension(
|
|
585
|
-
ps.Series([True, True, True], dtype="boolean", name=psser.name), True + psser
|
|
586
|
-
)
|
|
587
|
-
self.check_extension(False + pser, False + psser)
|
|
588
|
-
|
|
589
|
-
self.assertRaises(TypeError, lambda: datetime.date(1994, 1, 1) + psser)
|
|
590
|
-
self.assertRaises(TypeError, lambda: datetime.datetime(1994, 1, 1) + psser)
|
|
591
|
-
|
|
592
|
-
def test_rsub(self):
|
|
593
|
-
pser, psser = self.boolean_pdf["this"], self.boolean_psdf["this"]
|
|
594
|
-
self.check_extension(1 - pser, 1 - psser)
|
|
595
|
-
if extension_float_dtypes_available:
|
|
596
|
-
self.check_extension(0.1 - pser, 0.1 - psser)
|
|
597
|
-
else:
|
|
598
|
-
self.assert_eq(0.1 - pser, 0.1 - psser)
|
|
599
|
-
self.assertRaises(TypeError, lambda: "x" - psser)
|
|
600
|
-
self.assertRaises(TypeError, lambda: True - psser)
|
|
601
|
-
self.assertRaises(TypeError, lambda: datetime.date(1994, 1, 1) - psser)
|
|
602
|
-
self.assertRaises(TypeError, lambda: datetime.datetime(1994, 1, 1) - psser)
|
|
603
|
-
|
|
604
|
-
def test_rmul(self):
|
|
605
|
-
pser, psser = self.boolean_pdf["this"], self.boolean_psdf["this"]
|
|
606
|
-
self.check_extension(1 * pser, 1 * psser)
|
|
607
|
-
if extension_float_dtypes_available:
|
|
608
|
-
self.check_extension(0.1 * pser, 0.1 * psser)
|
|
609
|
-
else:
|
|
610
|
-
self.assert_eq(0.1 * pser, 0.1 * psser)
|
|
611
|
-
self.assertRaises(TypeError, lambda: "x" * psser)
|
|
612
|
-
|
|
613
|
-
# In pandas, NA & False is NA, whereas NA & False is False in pandas-on-Spark
|
|
614
|
-
self.check_extension(True * pser, True * psser)
|
|
615
|
-
self.check_extension(
|
|
616
|
-
pd.Series([False, False, False], dtype="boolean", name=psser.name), False * psser
|
|
617
|
-
)
|
|
618
|
-
|
|
619
|
-
self.assertRaises(TypeError, lambda: datetime.date(1994, 1, 1) * psser)
|
|
620
|
-
self.assertRaises(TypeError, lambda: datetime.datetime(1994, 1, 1) * psser)
|
|
621
|
-
|
|
622
|
-
def test_rtruediv(self):
|
|
623
|
-
pser, psser = self.boolean_pdf["this"], self.boolean_psdf["this"]
|
|
624
|
-
if extension_float_dtypes_available:
|
|
625
|
-
self.check_extension(1 / pser, 1 / psser)
|
|
626
|
-
self.check_extension(0.1 / pser, 0.1 / psser)
|
|
627
|
-
else:
|
|
628
|
-
self.assert_eq(1 / pser, 1 / psser)
|
|
629
|
-
self.assert_eq(0.1 / pser, 0.1 / psser)
|
|
630
|
-
self.assertRaises(TypeError, lambda: "x" / psser)
|
|
631
|
-
self.assertRaises(TypeError, lambda: True / psser)
|
|
632
|
-
self.assertRaises(TypeError, lambda: datetime.date(1994, 1, 1) / psser)
|
|
633
|
-
self.assertRaises(TypeError, lambda: datetime.datetime(1994, 1, 1) / psser)
|
|
634
|
-
|
|
635
|
-
def test_rfloordiv(self):
|
|
636
|
-
psser = self.boolean_psdf["this"]
|
|
637
|
-
self.assert_eq(
|
|
638
|
-
pd.Series([1.0, np.inf, np.nan], name=psser.name), (1 // psser).astype(float)
|
|
639
|
-
)
|
|
640
|
-
self.assert_eq(
|
|
641
|
-
pd.Series([0.0, np.inf, np.nan], name=psser.name), (0.1 // psser).astype(float)
|
|
642
|
-
)
|
|
643
|
-
self.assertRaises(TypeError, lambda: "x" // psser)
|
|
644
|
-
self.assertRaises(TypeError, lambda: True // psser)
|
|
645
|
-
self.assertRaises(TypeError, lambda: datetime.date(1994, 1, 1) // psser)
|
|
646
|
-
self.assertRaises(TypeError, lambda: datetime.datetime(1994, 1, 1) // psser)
|
|
647
|
-
|
|
648
|
-
def test_rpow(self):
|
|
649
|
-
pser, psser = self.boolean_pdf["this"], self.boolean_psdf["this"]
|
|
650
|
-
if extension_float_dtypes_available:
|
|
651
|
-
self.check_extension(pd.Series([1, 1, 1], dtype="Float64", name=psser.name), 1**psser)
|
|
652
|
-
self.check_extension((0.1**pser).astype("Float64"), 0.1**psser)
|
|
653
|
-
else:
|
|
654
|
-
self.assert_eq(pd.Series([1, 1, 1], dtype="float", name=psser.name), 1**psser)
|
|
655
|
-
self.assert_eq((0.1**pser).astype("float"), 0.1**psser)
|
|
656
|
-
self.assertRaises(TypeError, lambda: "x" ** psser)
|
|
657
|
-
self.assertRaises(TypeError, lambda: True**psser)
|
|
658
|
-
self.assertRaises(TypeError, lambda: datetime.date(1994, 1, 1) ** psser)
|
|
659
|
-
self.assertRaises(TypeError, lambda: datetime.datetime(1994, 1, 1) ** psser)
|
|
660
|
-
|
|
661
|
-
def test_rmod(self):
|
|
662
|
-
psser = self.boolean_psdf["this"]
|
|
663
|
-
self.check_extension(
|
|
664
|
-
ps.Series([0, np.nan, np.nan], dtype="Int64", name=psser.name), 1 % psser
|
|
665
|
-
)
|
|
666
|
-
if extension_float_dtypes_available:
|
|
667
|
-
self.check_extension(
|
|
668
|
-
pd.Series([0.10000000000000009, np.nan, np.nan], dtype="Float64", name=psser.name),
|
|
669
|
-
0.1 % psser,
|
|
670
|
-
)
|
|
671
|
-
else:
|
|
672
|
-
self.assert_eq(
|
|
673
|
-
pd.Series([0.10000000000000009, np.nan, np.nan], dtype="float", name=psser.name),
|
|
674
|
-
0.1 % psser,
|
|
675
|
-
)
|
|
676
|
-
self.assertRaises(TypeError, lambda: datetime.date(1994, 1, 1) % psser)
|
|
677
|
-
self.assertRaises(TypeError, lambda: True % psser)
|
|
678
|
-
|
|
679
|
-
def test_and(self):
|
|
680
|
-
pdf, psdf = self.boolean_pdf, self.boolean_psdf
|
|
681
|
-
pser, psser = pdf["this"], psdf["this"]
|
|
682
|
-
other_pser, other_psser = pdf["that"], psdf["that"]
|
|
683
|
-
self.check_extension(pser & True, psser & True)
|
|
684
|
-
self.check_extension(pser & False, psser & False)
|
|
685
|
-
self.check_extension(pser & pser, psser & psser)
|
|
686
|
-
|
|
687
|
-
self.check_extension(pser & other_pser, psser & other_psser)
|
|
688
|
-
self.check_extension(other_pser & pser, other_psser & psser)
|
|
689
|
-
|
|
690
|
-
def test_rand(self):
|
|
691
|
-
pser, psser = self.boolean_pdf["this"], self.boolean_psdf["this"]
|
|
692
|
-
self.check_extension(True & pser, True & psser)
|
|
693
|
-
self.check_extension(False & pser, False & psser)
|
|
694
|
-
|
|
695
|
-
def test_or(self):
|
|
696
|
-
pdf, psdf = self.boolean_pdf, self.boolean_psdf
|
|
697
|
-
pser, psser = pdf["this"], psdf["this"]
|
|
698
|
-
other_pser, other_psser = pdf["that"], psdf["that"]
|
|
699
|
-
self.check_extension(pser | True, psser | True)
|
|
700
|
-
self.check_extension(pser | False, psser | False)
|
|
701
|
-
self.check_extension(pser | pser, psser | psser)
|
|
702
|
-
|
|
703
|
-
self.check_extension(pser | other_pser, psser | other_psser)
|
|
704
|
-
self.check_extension(other_pser | pser, other_psser | psser)
|
|
705
|
-
|
|
706
|
-
def test_ror(self):
|
|
707
|
-
pser, psser = self.boolean_pdf["this"], self.boolean_psdf["this"]
|
|
708
|
-
self.check_extension(True | pser, True | psser)
|
|
709
|
-
self.check_extension(False | pser, False | psser)
|
|
710
|
-
|
|
711
|
-
def test_xor(self):
|
|
712
|
-
pdf, psdf = self.boolean_pdf, self.boolean_psdf
|
|
713
|
-
pser, psser = pdf["this"], psdf["this"]
|
|
714
|
-
other_pser, other_psser = pdf["that"], psdf["that"]
|
|
715
|
-
self.check_extension(pser ^ True, psser ^ True)
|
|
716
|
-
self.check_extension(pser ^ False, psser ^ False)
|
|
717
|
-
self.check_extension(pser ^ pser, psser ^ psser)
|
|
718
|
-
|
|
719
|
-
self.check_extension(pser ^ other_pser, psser ^ other_psser)
|
|
720
|
-
self.check_extension(other_pser ^ pser, other_psser ^ psser)
|
|
721
|
-
with self.assertRaisesRegex(TypeError, "XOR can not be applied to given types."):
|
|
722
|
-
psser ^ 2
|
|
723
|
-
|
|
724
|
-
def test_rxor(self):
|
|
725
|
-
pser, psser = self.boolean_pdf["this"], self.boolean_psdf["this"]
|
|
726
|
-
self.check_extension(True | pser, True | psser)
|
|
727
|
-
self.check_extension(False | pser, False | psser)
|
|
728
|
-
with self.assertRaisesRegex(TypeError, "XOR can not be applied to given types."):
|
|
729
|
-
1 ^ psser
|
|
730
|
-
|
|
731
|
-
def test_from_to_pandas(self):
|
|
732
|
-
data = [True, True, False, None]
|
|
733
|
-
pser = pd.Series(data, dtype="boolean")
|
|
734
|
-
psser = ps.Series(data, dtype="boolean")
|
|
735
|
-
self.check_extension(pser, psser._to_pandas())
|
|
736
|
-
self.check_extension(ps.from_pandas(pser), psser)
|
|
737
|
-
|
|
738
|
-
def test_isnull(self):
|
|
739
|
-
self.assert_eq(self.boolean_pdf["this"].isnull(), self.boolean_psdf["this"].isnull())
|
|
740
|
-
|
|
741
|
-
def test_astype(self):
|
|
742
|
-
pser, psser = self.boolean_pdf["this"], self.boolean_psdf["this"]
|
|
743
|
-
|
|
744
|
-
self.assert_eq(pser.astype(str).tolist(), psser.astype(str).tolist())
|
|
745
|
-
|
|
746
|
-
self.assert_eq(pser.astype("category"), psser.astype("category"))
|
|
747
|
-
cat_type = CategoricalDtype(categories=[False, True])
|
|
748
|
-
self.assert_eq(pser.astype(cat_type), psser.astype(cat_type))
|
|
749
|
-
for dtype in self.extension_dtypes:
|
|
750
|
-
if dtype in self.fractional_extension_dtypes:
|
|
751
|
-
# A pandas boolean extension series cannot be casted to fractional extension dtypes
|
|
752
|
-
self.assert_eq([1.0, 0.0, np.nan], psser.astype(dtype).tolist())
|
|
753
|
-
elif dtype in self.string_extension_dtype:
|
|
754
|
-
if LooseVersion(pd.__version__) >= LooseVersion("1.1.0"):
|
|
755
|
-
# Limit pandas version due to https://github.com/pandas-dev/pandas/issues/31204
|
|
756
|
-
self.check_extension(pser.astype(dtype), psser.astype(dtype))
|
|
757
|
-
else:
|
|
758
|
-
self.check_extension(pser.astype(dtype), psser.astype(dtype))
|
|
759
|
-
|
|
760
|
-
def test_neg(self):
|
|
761
|
-
self.assertRaises(TypeError, lambda: -self.boolean_psdf["this"])
|
|
762
|
-
|
|
763
|
-
def test_abs(self):
|
|
764
|
-
self.assertRaises(TypeError, lambda: abs(self.boolean_psdf["this"]))
|
|
765
|
-
|
|
766
|
-
def test_invert(self):
|
|
767
|
-
self.assertRaises(TypeError, lambda: ~self.boolean_psdf["this"])
|
|
768
|
-
|
|
769
|
-
def test_eq(self):
|
|
770
|
-
pdf, psdf = self.boolean_pdf, self.boolean_psdf
|
|
771
|
-
pser, psser = pdf["this"], psdf["this"]
|
|
772
|
-
other_pser, other_psser = pdf["that"], psdf["that"]
|
|
773
|
-
self.check_extension(pser == other_pser, psser == other_psser)
|
|
774
|
-
self.check_extension(pser == pser, psser == psser)
|
|
775
|
-
|
|
776
|
-
def test_ne(self):
|
|
777
|
-
pdf, psdf = self.boolean_pdf, self.boolean_psdf
|
|
778
|
-
pser, psser = pdf["this"], psdf["this"]
|
|
779
|
-
other_pser, other_psser = pdf["that"], psdf["that"]
|
|
780
|
-
self.check_extension(pser != other_pser, psser != other_psser)
|
|
781
|
-
self.check_extension(pser != pser, psser != psser)
|
|
782
|
-
|
|
783
|
-
def test_lt(self):
|
|
784
|
-
pdf, psdf = self.boolean_pdf, self.boolean_psdf
|
|
785
|
-
pser, psser = pdf["this"], psdf["this"]
|
|
786
|
-
other_pser, other_psser = pdf["that"], psdf["that"]
|
|
787
|
-
self.check_extension(pser < other_pser, psser < other_psser)
|
|
788
|
-
self.check_extension(pser < pser, psser < psser)
|
|
789
|
-
|
|
790
|
-
def test_le(self):
|
|
791
|
-
pdf, psdf = self.boolean_pdf, self.boolean_psdf
|
|
792
|
-
pser, psser = pdf["this"], psdf["this"]
|
|
793
|
-
other_pser, other_psser = pdf["that"], psdf["that"]
|
|
794
|
-
self.check_extension(pser <= other_pser, psser <= other_psser)
|
|
795
|
-
self.check_extension(pser <= pser, psser <= psser)
|
|
796
|
-
|
|
797
|
-
def test_gt(self):
|
|
798
|
-
pdf, psdf = self.boolean_pdf, self.boolean_psdf
|
|
799
|
-
pser, psser = pdf["this"], psdf["this"]
|
|
800
|
-
other_pser, other_psser = pdf["that"], psdf["that"]
|
|
801
|
-
self.check_extension(pser > other_pser, psser > other_psser)
|
|
802
|
-
self.check_extension(pser > pser, psser > psser)
|
|
803
|
-
|
|
804
|
-
def test_ge(self):
|
|
805
|
-
pdf, psdf = self.boolean_pdf, self.boolean_psdf
|
|
806
|
-
pser, psser = pdf["this"], psdf["this"]
|
|
807
|
-
other_pser, other_psser = pdf["that"], psdf["that"]
|
|
808
|
-
self.check_extension(pser >= other_pser, psser >= other_psser)
|
|
809
|
-
self.check_extension(pser >= pser, psser >= psser)
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
class BooleanOpsTests(BooleanOpsTestsMixin, OpsTestBase):
|
|
813
|
-
pass
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
if __name__ == "__main__":
|
|
817
|
-
from pyspark.pandas.tests.data_type_ops.test_boolean_ops import * # noqa: F401
|
|
818
|
-
|
|
819
|
-
try:
|
|
820
|
-
import xmlrunner
|
|
821
|
-
|
|
822
|
-
testRunner = xmlrunner.XMLTestRunner(output="target/test-reports", verbosity=2)
|
|
823
|
-
except ImportError:
|
|
824
|
-
testRunner = None
|
|
825
|
-
unittest.main(testRunner=testRunner, verbosity=2)
|