sqlframe 3.21.1__tar.gz → 3.22.0__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {sqlframe-3.21.1 → sqlframe-3.22.0}/PKG-INFO +1 -1
- {sqlframe-3.21.1 → sqlframe-3.22.0}/docs/duckdb.md +1 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/docs/snowflake.md +1 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/_version.py +2 -2
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/base/dataframe.py +2 -2
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/base/functions.py +2 -1
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/base/mixins/readwriter_mixins.py +4 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/base/readerwriter.py +40 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/base/util.py +19 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/duckdb/readwriter.py +1 -0
- sqlframe-3.22.0/sqlframe/spark/readwriter.py +163 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe.egg-info/PKG-INFO +1 -1
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/integration/engines/databricks/test_databricks_dataframe.py +8 -8
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/integration/engines/duck/test_duckdb_dataframe.py +8 -8
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/integration/engines/postgres/test_postgres_dataframe.py +2 -2
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/integration/engines/test_engine_dataframe.py +5 -1
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/integration/engines/test_engine_reader.py +24 -7
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/integration/engines/test_engine_writer.py +31 -16
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/integration/engines/test_int_functions.py +1 -1
- sqlframe-3.21.1/sqlframe/spark/readwriter.py +0 -30
- {sqlframe-3.21.1 → sqlframe-3.22.0}/.github/CODEOWNERS +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/.github/workflows/main.workflow.yaml +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/.github/workflows/publish.workflow.yaml +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/.gitignore +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/.pre-commit-config.yaml +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/.readthedocs.yaml +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/LICENSE +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/Makefile +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/README.md +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/blogs/add_chatgpt_support.md +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/blogs/images/add_chatgpt_support/adding_ai_to_meal.jpeg +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/blogs/images/add_chatgpt_support/hype_train.gif +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/blogs/images/add_chatgpt_support/marvin_paranoid_robot.gif +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/blogs/images/add_chatgpt_support/nonsense_sql.png +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/blogs/images/add_chatgpt_support/openai_full_rewrite.png +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/blogs/images/add_chatgpt_support/openai_replacing_cte_names.png +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/blogs/images/add_chatgpt_support/sqlglot_optimized_code.png +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/blogs/images/add_chatgpt_support/sunny_shake_head_no.gif +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/blogs/images/but_wait_theres_more.gif +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/blogs/images/cake.gif +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/blogs/images/you_get_pyspark_api.gif +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/blogs/sqlframe_universal_dataframe_api.md +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/docs/bigquery.md +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/docs/configuration.md +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/docs/databricks.md +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/docs/docs/bigquery.md +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/docs/docs/duckdb.md +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/docs/docs/images/SF.png +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/docs/docs/images/favicon.png +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/docs/docs/images/favicon_old.png +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/docs/docs/images/sqlframe_diagram.png +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/docs/docs/images/sqlframe_logo.png +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/docs/docs/postgres.md +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/docs/images/SF.png +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/docs/images/favicon.png +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/docs/images/favicon_old.png +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/docs/images/sqlframe_diagram.png +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/docs/images/sqlframe_logo.png +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/docs/index.md +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/docs/postgres.md +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/docs/redshift.md +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/docs/requirements.txt +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/docs/spark.md +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/docs/standalone.md +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/docs/stylesheets/extra.css +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/mkdocs.yml +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/pytest.ini +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/renovate.json +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/setup.cfg +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/setup.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/LICENSE +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/__init__.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/base/__init__.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/base/_typing.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/base/catalog.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/base/column.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/base/decorators.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/base/exceptions.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/base/function_alternatives.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/base/group.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/base/mixins/__init__.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/base/mixins/catalog_mixins.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/base/mixins/dataframe_mixins.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/base/mixins/table_mixins.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/base/normalize.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/base/operations.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/base/session.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/base/table.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/base/transforms.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/base/types.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/base/udf.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/base/window.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/bigquery/__init__.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/bigquery/catalog.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/bigquery/column.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/bigquery/dataframe.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/bigquery/functions.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/bigquery/functions.pyi +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/bigquery/group.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/bigquery/readwriter.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/bigquery/session.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/bigquery/table.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/bigquery/types.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/bigquery/udf.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/bigquery/window.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/databricks/__init__.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/databricks/catalog.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/databricks/column.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/databricks/dataframe.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/databricks/functions.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/databricks/functions.pyi +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/databricks/group.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/databricks/readwriter.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/databricks/session.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/databricks/table.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/databricks/types.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/databricks/udf.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/databricks/window.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/duckdb/__init__.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/duckdb/catalog.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/duckdb/column.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/duckdb/dataframe.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/duckdb/functions.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/duckdb/functions.pyi +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/duckdb/group.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/duckdb/session.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/duckdb/table.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/duckdb/types.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/duckdb/udf.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/duckdb/window.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/postgres/__init__.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/postgres/catalog.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/postgres/column.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/postgres/dataframe.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/postgres/functions.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/postgres/functions.pyi +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/postgres/group.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/postgres/readwriter.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/postgres/session.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/postgres/table.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/postgres/types.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/postgres/udf.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/postgres/window.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/redshift/__init__.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/redshift/catalog.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/redshift/column.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/redshift/dataframe.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/redshift/functions.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/redshift/group.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/redshift/readwriter.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/redshift/session.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/redshift/table.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/redshift/types.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/redshift/udf.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/redshift/window.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/snowflake/__init__.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/snowflake/catalog.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/snowflake/column.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/snowflake/dataframe.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/snowflake/functions.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/snowflake/functions.pyi +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/snowflake/group.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/snowflake/readwriter.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/snowflake/session.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/snowflake/table.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/snowflake/types.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/snowflake/udf.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/snowflake/window.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/spark/__init__.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/spark/catalog.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/spark/column.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/spark/dataframe.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/spark/functions.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/spark/functions.pyi +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/spark/group.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/spark/session.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/spark/table.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/spark/types.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/spark/udf.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/spark/window.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/standalone/__init__.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/standalone/catalog.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/standalone/column.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/standalone/dataframe.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/standalone/functions.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/standalone/group.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/standalone/readwriter.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/standalone/session.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/standalone/table.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/standalone/types.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/standalone/udf.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/standalone/window.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/testing/__init__.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe/testing/utils.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe.egg-info/SOURCES.txt +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe.egg-info/dependency_links.txt +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe.egg-info/requires.txt +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/sqlframe.egg-info/top_level.txt +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/__init__.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/common_fixtures.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/conftest.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/employee.csv +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/employee.json +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/employee.parquet +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/employee_delta/.part-00000-e5965c7b-e58f-4d3c-ad56-002876814e3a-c000.snappy.parquet.crc +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/employee_delta/.part-00002-3fed7f18-370f-4b16-b232-504d6194eb52-c000.snappy.parquet.crc +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/employee_delta/.part-00004-143c5da1-d5ab-4706-8e84-0d2a324c6894-c000.snappy.parquet.crc +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/employee_delta/.part-00006-64f07e25-c30e-4075-acc6-b3c69c4ce80b-c000.snappy.parquet.crc +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/employee_delta/.part-00008-89ccad8d-df73-4ad5-8850-82ef3884db60-c000.snappy.parquet.crc +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/employee_delta/.part-00010-812b3382-8c7f-4c4e-9bcd-09ce8664f6e0-c000.snappy.parquet.crc +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/employee_delta/_delta_log/.00000000000000000000.json.crc +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/employee_delta/_delta_log/00000000000000000000.json +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/employee_delta/part-00000-e5965c7b-e58f-4d3c-ad56-002876814e3a-c000.snappy.parquet +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/employee_delta/part-00002-3fed7f18-370f-4b16-b232-504d6194eb52-c000.snappy.parquet +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/employee_delta/part-00004-143c5da1-d5ab-4706-8e84-0d2a324c6894-c000.snappy.parquet +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/employee_delta/part-00006-64f07e25-c30e-4075-acc6-b3c69c4ce80b-c000.snappy.parquet +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/employee_delta/part-00008-89ccad8d-df73-4ad5-8850-82ef3884db60-c000.snappy.parquet +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/employee_delta/part-00010-812b3382-8c7f-4c4e-9bcd-09ce8664f6e0-c000.snappy.parquet +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/employee_extra_line.csv +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/issue_219.csv +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds1.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds10.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds11.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds12.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds13.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds14.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds15.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds16.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds17.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds18.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds19.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds2.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds20.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds21.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds22.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds23.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds24.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds25.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds26.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds27.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds28.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds29.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds3.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds30.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds31.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds32.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds33.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds34.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds35.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds36.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds37.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds38.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds39.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds4.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds40.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds41.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds42.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds43.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds44.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds45.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds46.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds47.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds48.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds49.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds5.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds50.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds51.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds52.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds53.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds54.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds55.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds56.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds57.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds58.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds59.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds6.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds60.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds61.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds62.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds63.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds64.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds65.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds66.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds67.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds68.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds69.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds7.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds70.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds71.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds72.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds73.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds74.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds75.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds76.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds77.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds78.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds79.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds8.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds80.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds81.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds82.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds83.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds84.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds85.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds86.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds87.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds88.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds89.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds9.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds90.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds91.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds92.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds93.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds94.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds95.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds96.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds97.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds98.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/fixtures/tpcds/tpcds99.sql +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/integration/__init__.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/integration/engines/__init__.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/integration/engines/bigquery/__init__.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/integration/engines/bigquery/test_bigquery_catalog.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/integration/engines/bigquery/test_bigquery_dataframe.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/integration/engines/bigquery/test_bigquery_session.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/integration/engines/databricks/__init__.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/integration/engines/databricks/test_databricks_catalog.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/integration/engines/databricks/test_databricks_session.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/integration/engines/duck/__init__.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/integration/engines/duck/test_duckdb_activate.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/integration/engines/duck/test_duckdb_catalog.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/integration/engines/duck/test_duckdb_reader.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/integration/engines/duck/test_duckdb_session.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/integration/engines/duck/test_duckdb_udf.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/integration/engines/duck/test_tpcds.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/integration/engines/postgres/__init__.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/integration/engines/postgres/test_postgres_activate.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/integration/engines/postgres/test_postgres_catalog.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/integration/engines/postgres/test_postgres_session.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/integration/engines/redshift/__init__.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/integration/engines/redshift/test_redshift_catalog.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/integration/engines/redshift/test_redshift_session.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/integration/engines/snowflake/__init__.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/integration/engines/snowflake/test_snowflake_catalog.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/integration/engines/snowflake/test_snowflake_dataframe.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/integration/engines/snowflake/test_snowflake_session.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/integration/engines/spark/__init__.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/integration/engines/spark/test_spark_catalog.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/integration/engines/spark/test_spark_dataframe.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/integration/engines/test_engine_column.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/integration/engines/test_engine_session.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/integration/engines/test_engine_table.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/integration/engines/test_int_testing.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/integration/fixtures.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/integration/test_int_dataframe.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/integration/test_int_dataframe_stats.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/integration/test_int_grouped_data.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/integration/test_int_session.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/types.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/unit/__init__.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/unit/bigquery/__init__.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/unit/bigquery/test_activate.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/unit/conftest.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/unit/databricks/__init__.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/unit/databricks/test_activate.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/unit/duck/__init__.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/unit/duck/test_activate.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/unit/postgres/__init__.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/unit/postgres/test_activate.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/unit/redshift/__init__.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/unit/redshift/test_activate.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/unit/snowflake/__init__.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/unit/snowflake/test_activate.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/unit/spark/__init__.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/unit/spark/test_activate.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/unit/standalone/__init__.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/unit/standalone/fixtures.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/unit/standalone/test_activate.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/unit/standalone/test_column.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/unit/standalone/test_dataframe.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/unit/standalone/test_dataframe_writer.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/unit/standalone/test_functions.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/unit/standalone/test_session.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/unit/standalone/test_session_case_sensitivity.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/unit/standalone/test_types.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/unit/standalone/test_window.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/unit/test_activate.py +0 -0
- {sqlframe-3.21.1 → sqlframe-3.22.0}/tests/unit/test_util.py +0 -0
@@ -406,6 +406,7 @@ See something that you would like to see supported? [Open an issue](https://gith
|
|
406
406
|
* [min](https://spark.apache.org/docs/latest/api/python/reference/pyspark.sql/api/pyspark.sql.functions.min.html)
|
407
407
|
* [min_by](https://spark.apache.org/docs/latest/api/python/reference/pyspark.sql/api/pyspark.sql.functions.min_by.html)
|
408
408
|
* [minute](https://spark.apache.org/docs/latest/api/python/reference/pyspark.sql/api/pyspark.sql.functions.minute.html)
|
409
|
+
* [mode](https://spark.apache.org/docs/latest/api/python/reference/pyspark.sql/api/pyspark.sql.functions.mode.html)
|
409
410
|
* [month](https://spark.apache.org/docs/latest/api/python/reference/pyspark.sql/api/pyspark.sql.functions.month.html)
|
410
411
|
* [months_between](https://spark.apache.org/docs/latest/api/python/reference/pyspark.sql/api/pyspark.sql.functions.months_between.html)
|
411
412
|
* Rounded whole number is returned
|
@@ -439,6 +439,7 @@ See something that you would like to see supported? [Open an issue](https://gith
|
|
439
439
|
* [min](https://spark.apache.org/docs/latest/api/python/reference/pyspark.sql/api/pyspark.sql.functions.min.html)
|
440
440
|
* [min_by](https://spark.apache.org/docs/latest/api/python/reference/pyspark.sql/api/pyspark.sql.functions.min_by.html)
|
441
441
|
* [minute](https://spark.apache.org/docs/latest/api/python/reference/pyspark.sql/api/pyspark.sql.functions.minute.html)
|
442
|
+
* [mode](https://spark.apache.org/docs/latest/api/python/reference/pyspark.sql/api/pyspark.sql.functions.mode.html)
|
442
443
|
* [module](https://spark.apache.org/docs/latest/api/python/reference/pyspark.sql/api/pyspark.sql.functions.module.html)
|
443
444
|
* [month](https://spark.apache.org/docs/latest/api/python/reference/pyspark.sql/api/pyspark.sql.functions.month.html)
|
444
445
|
* [months_between](https://spark.apache.org/docs/latest/api/python/reference/pyspark.sql/api/pyspark.sql.functions.months_between.html)
|
@@ -342,7 +342,7 @@ class BaseDataFrame(t.Generic[SESSION, WRITER, NA, STAT, GROUP_DATA]):
|
|
342
342
|
return types.StructType(
|
343
343
|
[
|
344
344
|
types.StructField(
|
345
|
-
c.name,
|
345
|
+
self.display_name_mapping.get(c.name, c.name),
|
346
346
|
sqlglot_to_spark(
|
347
347
|
exp.DataType.build(c.dataType, dialect=self.session.output_dialect)
|
348
348
|
),
|
@@ -1898,7 +1898,7 @@ class BaseDataFrame(t.Generic[SESSION, WRITER, NA, STAT, GROUP_DATA]):
|
|
1898
1898
|
print("root")
|
1899
1899
|
for column in self._typed_columns:
|
1900
1900
|
print_schema(
|
1901
|
-
column.name,
|
1901
|
+
self.display_name_mapping.get(column.name, column.name),
|
1902
1902
|
exp.DataType.build(column.dataType, dialect=self.session.output_dialect),
|
1903
1903
|
column.nullable,
|
1904
1904
|
0,
|
@@ -4504,7 +4504,7 @@ def median(col: ColumnOrName) -> Column:
|
|
4504
4504
|
return Column.invoke_expression_over_column(col, expression.Median)
|
4505
4505
|
|
4506
4506
|
|
4507
|
-
@meta(unsupported_engines="
|
4507
|
+
@meta(unsupported_engines=["bigquery", "postgres"])
|
4508
4508
|
def mode(col: ColumnOrName) -> Column:
|
4509
4509
|
"""
|
4510
4510
|
Returns the most frequent value in a group.
|
@@ -4540,6 +4540,7 @@ def mode(col: ColumnOrName) -> Column:
|
|
4540
4540
|
|dotNET| 2012|
|
4541
4541
|
+------+----------+
|
4542
4542
|
"""
|
4543
|
+
|
4543
4544
|
return Column.invoke_anonymous_function(col, "mode")
|
4544
4545
|
|
4545
4546
|
|
@@ -82,6 +82,10 @@ class PandasLoaderMixin(_BaseDataFrameReader, t.Generic[SESSION, DF]):
|
|
82
82
|
elif format == "parquet":
|
83
83
|
df = pd.read_parquet(path, **kwargs) # type: ignore
|
84
84
|
elif format == "csv":
|
85
|
+
kwargs.pop("inferSchema", None)
|
86
|
+
if "header" in kwargs:
|
87
|
+
if isinstance(kwargs["header"], bool) and kwargs["header"]:
|
88
|
+
kwargs["header"] = "infer"
|
85
89
|
df = pd.read_csv(path, **kwargs) # type: ignore
|
86
90
|
else:
|
87
91
|
raise UnsupportedOperationError(f"Unsupported format: {format}")
|
@@ -393,10 +393,12 @@ class _BaseDataFrameWriter(t.Generic[SESSION, DF]):
|
|
393
393
|
df: DF,
|
394
394
|
mode: t.Optional[str] = None,
|
395
395
|
by_name: bool = False,
|
396
|
+
state_format_to_write: t.Optional[str] = None,
|
396
397
|
):
|
397
398
|
self._df = df
|
398
399
|
self._mode = mode
|
399
400
|
self._by_name = by_name
|
401
|
+
self._state_format_to_write = state_format_to_write
|
400
402
|
|
401
403
|
@property
|
402
404
|
def _session(self) -> SESSION:
|
@@ -484,6 +486,44 @@ class _BaseDataFrameWriter(t.Generic[SESSION, DF]):
|
|
484
486
|
def _write(self, path: str, mode: t.Optional[str], format: str, **options) -> None:
|
485
487
|
raise NotImplementedError
|
486
488
|
|
489
|
+
def format(self, source: str) -> "Self":
|
490
|
+
"""Specifies the input data source format.
|
491
|
+
|
492
|
+
.. versionadded:: 1.4.0
|
493
|
+
|
494
|
+
.. versionchanged:: 3.4.0
|
495
|
+
Supports Spark Connect.
|
496
|
+
|
497
|
+
Parameters
|
498
|
+
----------
|
499
|
+
source : str
|
500
|
+
string, name of the data source, e.g. 'json', 'parquet'.
|
501
|
+
|
502
|
+
Examples
|
503
|
+
--------
|
504
|
+
>>> spark.read.format('json')
|
505
|
+
<...readwriter.DataFrameReader object ...>
|
506
|
+
|
507
|
+
Write a DataFrame into a JSON file and read it back.
|
508
|
+
|
509
|
+
>>> import tempfile
|
510
|
+
>>> with tempfile.TemporaryDirectory() as d:
|
511
|
+
... # Write a DataFrame into a JSON file
|
512
|
+
... spark.createDataFrame(
|
513
|
+
... [{"age": 100, "name": "Hyukjin Kwon"}]
|
514
|
+
... ).write.mode("overwrite").format("json").save(d)
|
515
|
+
...
|
516
|
+
... # Read the JSON file as a DataFrame.
|
517
|
+
... spark.read.format('json').load(d).show()
|
518
|
+
+---+------------+
|
519
|
+
|age| name|
|
520
|
+
+---+------------+
|
521
|
+
|100|Hyukjin Kwon|
|
522
|
+
+---+------------+
|
523
|
+
"""
|
524
|
+
self._state_format_to_write = source
|
525
|
+
return self
|
526
|
+
|
487
527
|
def json(
|
488
528
|
self,
|
489
529
|
path: str,
|
@@ -1,6 +1,8 @@
|
|
1
1
|
from __future__ import annotations
|
2
2
|
|
3
3
|
import importlib
|
4
|
+
import random
|
5
|
+
import string
|
4
6
|
import typing as t
|
5
7
|
import unicodedata
|
6
8
|
|
@@ -427,3 +429,20 @@ def normalize_string(
|
|
427
429
|
for pos in star_positions:
|
428
430
|
normalized_value = normalized_value[:pos] + "*" + normalized_value[pos:]
|
429
431
|
return normalized_value
|
432
|
+
|
433
|
+
|
434
|
+
def generate_random_identifier(size=6, chars=string.ascii_uppercase + string.digits):
|
435
|
+
return "_" + "".join(random.choice(chars) for _ in range(size))
|
436
|
+
|
437
|
+
|
438
|
+
def split_filepath(filepath: str) -> tuple[str, str]:
|
439
|
+
if filepath.startswith("dbfs:") or filepath.startswith("/dbfs"):
|
440
|
+
prefix = "dbfs:"
|
441
|
+
return prefix, filepath[len(prefix) :]
|
442
|
+
if filepath.startswith("file://"):
|
443
|
+
prefix = "file://"
|
444
|
+
return "", filepath[len(prefix) :]
|
445
|
+
split_ = str(filepath).split("://", 1)
|
446
|
+
if len(split_) == 2: # noqa: PLR2004
|
447
|
+
return split_[0] + "://", split_[1]
|
448
|
+
return "", split_[0]
|
@@ -92,6 +92,7 @@ class DuckDBDataFrameReader(
|
|
92
92
|
if format == "delta":
|
93
93
|
from_clause = f"delta_scan('{path}')"
|
94
94
|
elif format:
|
95
|
+
options.pop("inferSchema", None)
|
95
96
|
paths = ",".join([f"'{path}'" for path in ensure_list(path)])
|
96
97
|
from_clause = f"read_{format}([{paths}], {to_csv(options)})"
|
97
98
|
else:
|
@@ -0,0 +1,163 @@
|
|
1
|
+
# This code is based on code from Apache Spark under the license found in the LICENSE file located in the 'sqlframe' folder.
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
|
5
|
+
import typing as t
|
6
|
+
|
7
|
+
from sqlglot import exp
|
8
|
+
from sqlglot.helper import ensure_list
|
9
|
+
|
10
|
+
from sqlframe.base.readerwriter import (
|
11
|
+
_BaseDataFrameReader,
|
12
|
+
_BaseDataFrameWriter,
|
13
|
+
_infer_format,
|
14
|
+
)
|
15
|
+
from sqlframe.base.util import ensure_column_mapping, generate_random_identifier, to_csv
|
16
|
+
|
17
|
+
if t.TYPE_CHECKING:
|
18
|
+
from sqlframe.base._typing import OptionalPrimitiveType, PathOrPaths
|
19
|
+
from sqlframe.base.types import StructType
|
20
|
+
from sqlframe.spark.dataframe import SparkDataFrame
|
21
|
+
from sqlframe.spark.session import SparkSession
|
22
|
+
from sqlframe.spark.table import SparkTable
|
23
|
+
|
24
|
+
|
25
|
+
class SparkDataFrameReader(
|
26
|
+
_BaseDataFrameReader["SparkSession", "SparkDataFrame", "SparkTable"],
|
27
|
+
):
|
28
|
+
def load(
|
29
|
+
self,
|
30
|
+
path: t.Optional[PathOrPaths] = None,
|
31
|
+
format: t.Optional[str] = None,
|
32
|
+
schema: t.Optional[t.Union[StructType, str]] = None,
|
33
|
+
**options: OptionalPrimitiveType,
|
34
|
+
) -> SparkDataFrame:
|
35
|
+
"""Loads data from a data source and returns it as a :class:`DataFrame`.
|
36
|
+
|
37
|
+
.. versionadded:: 1.4.0
|
38
|
+
|
39
|
+
.. versionchanged:: 3.4.0
|
40
|
+
Supports Spark Connect.
|
41
|
+
|
42
|
+
Parameters
|
43
|
+
----------
|
44
|
+
path : str or list, t.Optional
|
45
|
+
t.Optional string or a list of string for file-system backed data sources.
|
46
|
+
format : str, t.Optional
|
47
|
+
t.Optional string for format of the data source. Default to 'parquet'.
|
48
|
+
schema : :class:`pyspark.sql.types.StructType` or str, t.Optional
|
49
|
+
t.Optional :class:`pyspark.sql.types.StructType` for the input schema
|
50
|
+
or a DDL-formatted string (For example ``col0 INT, col1 DOUBLE``).
|
51
|
+
**options : dict
|
52
|
+
all other string options
|
53
|
+
|
54
|
+
Examples
|
55
|
+
--------
|
56
|
+
Load a CSV file with format, schema and options specified.
|
57
|
+
|
58
|
+
>>> import tempfile
|
59
|
+
>>> with tempfile.TemporaryDirectory() as d:
|
60
|
+
... # Write a DataFrame into a CSV file with a header
|
61
|
+
... df = spark.createDataFrame([{"age": 100, "name": "Hyukjin Kwon"}])
|
62
|
+
... df.write.option("header", True).mode("overwrite").format("csv").save(d)
|
63
|
+
...
|
64
|
+
... # Read the CSV file as a DataFrame with 'nullValue' option set to 'Hyukjin Kwon',
|
65
|
+
... # and 'header' option set to `True`.
|
66
|
+
... df = spark.read.load(
|
67
|
+
... d, schema=df.schema, format="csv", nullValue="Hyukjin Kwon", header=True)
|
68
|
+
... df.printSchema()
|
69
|
+
... df.show()
|
70
|
+
root
|
71
|
+
|-- age: long (nullable = true)
|
72
|
+
|-- name: string (nullable = true)
|
73
|
+
+---+----+
|
74
|
+
|age|name|
|
75
|
+
+---+----+
|
76
|
+
|100|NULL|
|
77
|
+
+---+----+
|
78
|
+
"""
|
79
|
+
assert path is not None, "path is required"
|
80
|
+
assert isinstance(path, str), "path must be a string"
|
81
|
+
format = format or self.state_format_to_read or _infer_format(path)
|
82
|
+
if schema:
|
83
|
+
column_mapping = ensure_column_mapping(schema)
|
84
|
+
select_column_mapping = column_mapping.copy()
|
85
|
+
select_columns = [x.expression for x in self._to_casted_columns(select_column_mapping)]
|
86
|
+
|
87
|
+
if hasattr(schema, "simpleString"):
|
88
|
+
schema = schema.simpleString()
|
89
|
+
else:
|
90
|
+
select_columns = [exp.Star()]
|
91
|
+
|
92
|
+
if format == "delta":
|
93
|
+
from_clause = f"delta.`{path}`"
|
94
|
+
elif format:
|
95
|
+
paths = ",".join([f"{path}" for path in ensure_list(path)])
|
96
|
+
tmp_view_key = options.get("_tmp_view_key_", f"{generate_random_identifier()}_vw")
|
97
|
+
options["_tmp_view_key_"] = tmp_view_key
|
98
|
+
|
99
|
+
format_options: dict[str, OptionalPrimitiveType] = {
|
100
|
+
k: v for k, v in options.items() if v is not None
|
101
|
+
}
|
102
|
+
format_options.pop("_tmp_view_key_")
|
103
|
+
format_options["path"] = paths
|
104
|
+
if schema:
|
105
|
+
format_options["schema"] = f"{schema}"
|
106
|
+
format_options.pop("inferSchema", None)
|
107
|
+
format_options = {key: f"'{val}'" for key, val in format_options.items()}
|
108
|
+
format_options_str = to_csv(format_options, " ")
|
109
|
+
|
110
|
+
tmp_view = f"CREATE OR REPLACE TEMPORARY VIEW {tmp_view_key} USING {format}" + (
|
111
|
+
f" OPTIONS ({format_options_str})" if format_options_str else ""
|
112
|
+
)
|
113
|
+
self.session.spark_session.sql(tmp_view).collect()
|
114
|
+
|
115
|
+
from_clause = f"{tmp_view_key}"
|
116
|
+
else:
|
117
|
+
from_clause = f"'{path}'"
|
118
|
+
|
119
|
+
df = self.session.sql(
|
120
|
+
exp.select(*select_columns).from_(from_clause, dialect=self.session.input_dialect),
|
121
|
+
qualify=False,
|
122
|
+
)
|
123
|
+
if select_columns == [exp.Star()] and df.schema:
|
124
|
+
return self.load(path=path, format=format, schema=df.schema, **options)
|
125
|
+
self.session._last_loaded_file = path # type: ignore
|
126
|
+
return df
|
127
|
+
|
128
|
+
|
129
|
+
class SparkDataFrameWriter(
|
130
|
+
_BaseDataFrameWriter["SparkSession", "SparkDataFrame"],
|
131
|
+
):
|
132
|
+
def save(
|
133
|
+
self,
|
134
|
+
path: str,
|
135
|
+
mode: t.Optional[str] = None,
|
136
|
+
format: t.Optional[str] = None,
|
137
|
+
partitionBy: t.Optional[t.Union[str, t.List[str]]] = None,
|
138
|
+
**options,
|
139
|
+
):
|
140
|
+
format = str(format or self._state_format_to_write)
|
141
|
+
self._write(path, mode, format, partitionBy=partitionBy, **options)
|
142
|
+
|
143
|
+
def _write(self, path: str, mode: t.Optional[str], format: str, **options):
|
144
|
+
spark_df = None
|
145
|
+
expressions = self._df._get_expressions()
|
146
|
+
for i, expression in enumerate(expressions):
|
147
|
+
if i < len(expressions) - 1:
|
148
|
+
self._df.session._collect(expressions)
|
149
|
+
else:
|
150
|
+
sql = self._df.session._to_sql(expression)
|
151
|
+
spark_df = self._session.spark_session.sql(sql)
|
152
|
+
if spark_df is not None:
|
153
|
+
options = {k: v for k, v in options.items() if v is not None}
|
154
|
+
mode = str(mode or self._mode or "default")
|
155
|
+
spark_writer = spark_df.write.format(format).mode(mode)
|
156
|
+
partition_columns = options.pop("partitionBy", None)
|
157
|
+
compression = options.pop("compression", None)
|
158
|
+
if partition_columns:
|
159
|
+
partition_columns = options.pop("partitionBy")
|
160
|
+
spark_writer = spark_writer.partitionBy(*partition_columns)
|
161
|
+
if compression:
|
162
|
+
spark_writer = spark_writer.option("compression", compression)
|
163
|
+
spark_writer.save(path=path, **options)
|
@@ -71,16 +71,16 @@ root
|
|
71
71
|
|-- bigint_col: bigint (nullable = true)
|
72
72
|
|-- double_col: double (nullable = true)
|
73
73
|
|-- string_col: string (nullable = true)
|
74
|
-
|--
|
74
|
+
|-- map<string,bigint>_col: map<string, bigint> (nullable = true)
|
75
75
|
| |-- key: string (nullable = true)
|
76
76
|
| |-- value: bigint (nullable = true)
|
77
|
-
|--
|
77
|
+
|-- array<struct<a:bigint,b:bigint>>: array<struct<a: bigint, b: bigint>> (nullable = true)
|
78
78
|
| |-- element: struct<a: bigint, b: bigint> (nullable = true)
|
79
79
|
| | |-- a: bigint (nullable = true)
|
80
80
|
| | |-- b: bigint (nullable = true)
|
81
|
-
|--
|
81
|
+
|-- array<bigint>_col: array<bigint> (nullable = true)
|
82
82
|
| |-- element: bigint (nullable = true)
|
83
|
-
|--
|
83
|
+
|-- struct<a:bigint>_col: struct<a: bigint> (nullable = true)
|
84
84
|
| |-- a: bigint (nullable = true)
|
85
85
|
|-- date_col: date (nullable = true)
|
86
86
|
|-- timestamp_col: timestamp (nullable = true)
|
@@ -126,12 +126,12 @@ def test_schema_nested(databricks_datatypes: DatabricksDataFrame):
|
|
126
126
|
assert struct_fields[1].dataType == types.DoubleType()
|
127
127
|
assert struct_fields[2].name == "string_col"
|
128
128
|
assert struct_fields[2].dataType == types.StringType()
|
129
|
-
assert struct_fields[3].name == "
|
129
|
+
assert struct_fields[3].name == "map<string,bigint>_col"
|
130
130
|
assert struct_fields[3].dataType == types.MapType(
|
131
131
|
types.StringType(),
|
132
132
|
types.LongType(),
|
133
133
|
)
|
134
|
-
assert struct_fields[4].name == "
|
134
|
+
assert struct_fields[4].name == "array<struct<a:bigint,b:bigint>>"
|
135
135
|
assert struct_fields[4].dataType == types.ArrayType(
|
136
136
|
types.StructType(
|
137
137
|
[
|
@@ -146,11 +146,11 @@ def test_schema_nested(databricks_datatypes: DatabricksDataFrame):
|
|
146
146
|
]
|
147
147
|
),
|
148
148
|
)
|
149
|
-
assert struct_fields[5].name == "
|
149
|
+
assert struct_fields[5].name == "array<bigint>_col"
|
150
150
|
assert struct_fields[5].dataType == types.ArrayType(
|
151
151
|
types.LongType(),
|
152
152
|
)
|
153
|
-
assert struct_fields[6].name == "
|
153
|
+
assert struct_fields[6].name == "struct<a:bigint>_col"
|
154
154
|
assert struct_fields[6].dataType == types.StructType(
|
155
155
|
[
|
156
156
|
types.StructField(
|
@@ -67,16 +67,16 @@ root
|
|
67
67
|
|-- bigint_col: bigint (nullable = true)
|
68
68
|
|-- double_col: double (nullable = true)
|
69
69
|
|-- string_col: string (nullable = true)
|
70
|
-
|--
|
70
|
+
|-- map<string,bigint>_col: map<string, bigint> (nullable = true)
|
71
71
|
| |-- key: string (nullable = true)
|
72
72
|
| |-- value: bigint (nullable = true)
|
73
|
-
|--
|
73
|
+
|-- array<struct<a:bigint,b:bigint>>: array<struct<a: bigint, b: bigint>> (nullable = true)
|
74
74
|
| |-- element: struct<a: bigint, b: bigint> (nullable = true)
|
75
75
|
| | |-- a: bigint (nullable = true)
|
76
76
|
| | |-- b: bigint (nullable = true)
|
77
|
-
|--
|
77
|
+
|-- array<bigint>_col: array<bigint> (nullable = true)
|
78
78
|
| |-- element: bigint (nullable = true)
|
79
|
-
|--
|
79
|
+
|-- struct<a:bigint>_col: struct<a: bigint> (nullable = true)
|
80
80
|
| |-- a: bigint (nullable = true)
|
81
81
|
|-- date_col: date (nullable = true)
|
82
82
|
|-- timestamp_col: timestamp (nullable = true)
|
@@ -122,12 +122,12 @@ def test_schema_nested(duckdb_datatypes: DuckDBDataFrame):
|
|
122
122
|
assert struct_fields[1].dataType == types.DoubleType()
|
123
123
|
assert struct_fields[2].name == "string_col"
|
124
124
|
assert struct_fields[2].dataType == types.StringType()
|
125
|
-
assert struct_fields[3].name == "
|
125
|
+
assert struct_fields[3].name == "map<string,bigint>_col"
|
126
126
|
assert struct_fields[3].dataType == types.MapType(
|
127
127
|
types.StringType(),
|
128
128
|
types.LongType(),
|
129
129
|
)
|
130
|
-
assert struct_fields[4].name == "
|
130
|
+
assert struct_fields[4].name == "array<struct<a:bigint,b:bigint>>"
|
131
131
|
assert struct_fields[4].dataType == types.ArrayType(
|
132
132
|
types.StructType(
|
133
133
|
[
|
@@ -142,11 +142,11 @@ def test_schema_nested(duckdb_datatypes: DuckDBDataFrame):
|
|
142
142
|
]
|
143
143
|
),
|
144
144
|
)
|
145
|
-
assert struct_fields[5].name == "
|
145
|
+
assert struct_fields[5].name == "array<bigint>_col"
|
146
146
|
assert struct_fields[5].dataType == types.ArrayType(
|
147
147
|
types.LongType(),
|
148
148
|
)
|
149
|
-
assert struct_fields[6].name == "
|
149
|
+
assert struct_fields[6].name == "struct<a:bigint>_col"
|
150
150
|
assert struct_fields[6].dataType == types.StructType(
|
151
151
|
[
|
152
152
|
types.StructField(
|
{sqlframe-3.21.1 → sqlframe-3.22.0}/tests/integration/engines/postgres/test_postgres_dataframe.py
RENAMED
@@ -62,7 +62,7 @@ root
|
|
62
62
|
|-- bigint_col: bigint (nullable = true)
|
63
63
|
|-- double_col: double (nullable = true)
|
64
64
|
|-- string_col: string (nullable = true)
|
65
|
-
|--
|
65
|
+
|-- array<bigint>_col: array<bigint> (nullable = true)
|
66
66
|
| |-- element: bigint (nullable = true)
|
67
67
|
|-- date_col: date (nullable = true)
|
68
68
|
|-- timestamp_col: timestamp (nullable = true)
|
@@ -108,7 +108,7 @@ def test_schema_nested(postgres_datatypes: PostgresDataFrame):
|
|
108
108
|
assert struct_fields[1].dataType == types.DoubleType()
|
109
109
|
assert struct_fields[2].name == "string_col"
|
110
110
|
assert struct_fields[2].dataType == types.StringType()
|
111
|
-
assert struct_fields[3].name == "
|
111
|
+
assert struct_fields[3].name == "array<bigint>_col"
|
112
112
|
assert struct_fields[3].dataType == types.ArrayType(
|
113
113
|
types.LongType(),
|
114
114
|
)
|
@@ -3,7 +3,7 @@ from __future__ import annotations
|
|
3
3
|
import typing as t
|
4
4
|
|
5
5
|
from sqlframe.base.session import _BaseSession
|
6
|
-
from sqlframe.base.types import Row
|
6
|
+
from sqlframe.base.types import DoubleType, LongType, Row, StructField, StructType
|
7
7
|
from sqlframe.snowflake import SnowflakeSession
|
8
8
|
from sqlframe.spark import SparkSession
|
9
9
|
|
@@ -185,3 +185,7 @@ def test_show_from_create_with_space_with_schema(get_session: t.Callable[[], _Ba
|
|
185
185
|
Row(**{"an tan": 3, "b": 4, "z": 8.0}),
|
186
186
|
Row(**{"an tan": 2, "b": 6, "z": 9.0}),
|
187
187
|
]
|
188
|
+
assert df.schema.fields[0].name == "an tan"
|
189
|
+
df.printSchema()
|
190
|
+
captured = capsys.readouterr()
|
191
|
+
assert "|-- an tan:" in captured.out.strip()
|
@@ -13,7 +13,7 @@ pytest_plugins = ["tests.integration.fixtures"]
|
|
13
13
|
def test_load_no_format(get_session: t.Callable[[], _BaseSession]):
|
14
14
|
session = get_session()
|
15
15
|
df = session.read.load("tests/fixtures/employee.json")
|
16
|
-
|
16
|
+
expected = [
|
17
17
|
Row(**{"employee_id": 1, "fname": "Jack", "lname": "Shephard", "age": 37, "store_id": 1}),
|
18
18
|
Row(**{"employee_id": 2, "fname": "John", "lname": "Locke", "age": 65, "store_id": 1}),
|
19
19
|
Row(**{"employee_id": 3, "fname": "Kate", "lname": "Austen", "age": 37, "store_id": 2}),
|
@@ -22,6 +22,9 @@ def test_load_no_format(get_session: t.Callable[[], _BaseSession]):
|
|
22
22
|
),
|
23
23
|
Row(**{"employee_id": 5, "fname": "Hugo", "lname": "Reyes", "age": 29, "store_id": 100}),
|
24
24
|
]
|
25
|
+
assert sorted([sorted(row.asDict().items()) for row in df.collect()]) == sorted(
|
26
|
+
[sorted(row.asDict().items()) for row in expected]
|
27
|
+
)
|
25
28
|
|
26
29
|
|
27
30
|
def test_load_no_format_schema(get_session: t.Callable[[], _BaseSession]):
|
@@ -50,7 +53,7 @@ def test_load_no_format_schema(get_session: t.Callable[[], _BaseSession]):
|
|
50
53
|
def test_load_json(get_session: t.Callable[[], _BaseSession]):
|
51
54
|
session = get_session()
|
52
55
|
df = session.read.load("tests/fixtures/employee.json", format="json")
|
53
|
-
|
56
|
+
expected = [
|
54
57
|
Row(**{"employee_id": 1, "fname": "Jack", "lname": "Shephard", "age": 37, "store_id": 1}),
|
55
58
|
Row(**{"employee_id": 2, "fname": "John", "lname": "Locke", "age": 65, "store_id": 1}),
|
56
59
|
Row(**{"employee_id": 3, "fname": "Kate", "lname": "Austen", "age": 37, "store_id": 2}),
|
@@ -59,12 +62,15 @@ def test_load_json(get_session: t.Callable[[], _BaseSession]):
|
|
59
62
|
),
|
60
63
|
Row(**{"employee_id": 5, "fname": "Hugo", "lname": "Reyes", "age": 29, "store_id": 100}),
|
61
64
|
]
|
65
|
+
assert sorted([sorted(row.asDict().items()) for row in df.collect()]) == sorted(
|
66
|
+
[sorted(row.asDict().items()) for row in expected]
|
67
|
+
)
|
62
68
|
|
63
69
|
|
64
70
|
def test_json(get_session: t.Callable[[], _BaseSession]):
|
65
71
|
session = get_session()
|
66
72
|
df = session.read.json("tests/fixtures/employee.json")
|
67
|
-
|
73
|
+
expected = [
|
68
74
|
Row(**{"employee_id": 1, "fname": "Jack", "lname": "Shephard", "age": 37, "store_id": 1}),
|
69
75
|
Row(**{"employee_id": 2, "fname": "John", "lname": "Locke", "age": 65, "store_id": 1}),
|
70
76
|
Row(**{"employee_id": 3, "fname": "Kate", "lname": "Austen", "age": 37, "store_id": 2}),
|
@@ -73,6 +79,9 @@ def test_json(get_session: t.Callable[[], _BaseSession]):
|
|
73
79
|
),
|
74
80
|
Row(**{"employee_id": 5, "fname": "Hugo", "lname": "Reyes", "age": 29, "store_id": 100}),
|
75
81
|
]
|
82
|
+
assert sorted([sorted(row.asDict().items()) for row in df.collect()]) == sorted(
|
83
|
+
[sorted(row.asDict().items()) for row in expected]
|
84
|
+
)
|
76
85
|
|
77
86
|
|
78
87
|
def test_load_parquet(get_session: t.Callable[[], _BaseSession]):
|
@@ -105,8 +114,10 @@ def test_parquet(get_session: t.Callable[[], _BaseSession]):
|
|
105
114
|
|
106
115
|
def test_load_csv(get_session: t.Callable[[], _BaseSession]):
|
107
116
|
session = get_session()
|
108
|
-
df = session.read.load(
|
109
|
-
|
117
|
+
df = session.read.load(
|
118
|
+
"tests/fixtures/employee.csv", format="csv", header=True, inferSchema=True
|
119
|
+
)
|
120
|
+
expected = [
|
110
121
|
Row(**{"employee_id": 1, "fname": "Jack", "lname": "Shephard", "age": 37, "store_id": 1}),
|
111
122
|
Row(**{"employee_id": 2, "fname": "John", "lname": "Locke", "age": 65, "store_id": 1}),
|
112
123
|
Row(**{"employee_id": 3, "fname": "Kate", "lname": "Austen", "age": 37, "store_id": 2}),
|
@@ -115,12 +126,15 @@ def test_load_csv(get_session: t.Callable[[], _BaseSession]):
|
|
115
126
|
),
|
116
127
|
Row(**{"employee_id": 5, "fname": "Hugo", "lname": "Reyes", "age": 29, "store_id": 100}),
|
117
128
|
]
|
129
|
+
assert sorted([sorted(row.asDict().items()) for row in df.collect()]) == sorted(
|
130
|
+
[sorted(row.asDict().items()) for row in expected]
|
131
|
+
)
|
118
132
|
|
119
133
|
|
120
134
|
def test_csv(get_session: t.Callable[[], _BaseSession]):
|
121
135
|
session = get_session()
|
122
|
-
df = session.read.csv("tests/fixtures/employee.csv")
|
123
|
-
|
136
|
+
df = session.read.csv("tests/fixtures/employee.csv", header=True, inferSchema=True)
|
137
|
+
expected = [
|
124
138
|
Row(**{"employee_id": 1, "fname": "Jack", "lname": "Shephard", "age": 37, "store_id": 1}),
|
125
139
|
Row(**{"employee_id": 2, "fname": "John", "lname": "Locke", "age": 65, "store_id": 1}),
|
126
140
|
Row(**{"employee_id": 3, "fname": "Kate", "lname": "Austen", "age": 37, "store_id": 2}),
|
@@ -129,3 +143,6 @@ def test_csv(get_session: t.Callable[[], _BaseSession]):
|
|
129
143
|
),
|
130
144
|
Row(**{"employee_id": 5, "fname": "Hugo", "lname": "Reyes", "age": 29, "store_id": 100}),
|
131
145
|
]
|
146
|
+
assert sorted([sorted(row.asDict().items()) for row in df.collect()]) == sorted(
|
147
|
+
[sorted(row.asDict().items()) for row in expected]
|
148
|
+
)
|