Releases: databrickslabs/lsql
Releases · databrickslabs/lsql
v0.2.1
- Fixed row converter to properly handle nullable values (#53). In this release, the row converter in the
databricks.labs.lsql.core
module has been updated to handle nullable values correctly. A new methodStatementExecutionExt
has been added, which manages the handling of nullable values during SQL statement execution. TheRow
class has also been modified to include nullable values, improving the robustness and flexibility of SQL execution in dealing with various data types, including null values. These enhancements increase the overall reliability of the system, making it more production-ready. - Improved integration test coverage (#52). In this release, the project's integration test coverage has been significantly improved through several changes. A new function,
make_random()
, has been added to theconftest.py
file to generate a random string of fixed length, aiding in the creation of more meaningful and readable random strings for integration tests. A new file,test_deployment.py
, has been introduced, containing a test function for deploying a database schema and verifying successful data retrieval via a view. Thetest_integration.py
file has been renamed totest_core.py
, with updates to thetest_fetch_one
function to test thefetch_one
method using a SQL query with an aliased value. Additionally, a newFoo
dataclass has been added to thetests/integration/views/__init__.py
file, supporting integration test coverage. Lastly, a new SQL query has been added to the integration test suite, located in thesome.sql
file, which retrieves data from a table namedfoo
in theinventory
schema. These changes aim to enhance the overall stability, reliability, and coverage of the project's integration tests. Note: The changes to the.gitignore
file and the improvements to theStatementExecutionBackend
class in thebackends.py
file are not included in this summary, as they were described in the opening statement. - Rely on
hatch
being present on the build machine (#54). In this release, we have made significant changes to how we manage our build process and toolchain configuration. We have removed the need to manually installhatch
version 1.7.0 in the build machine, and instead, rely on its presence, adding it to the list of required tools in the toolchain configuration. The command to create a virtual environment usinghatch
has also been added, and thepre_setup
section no longer includes installinghatch
, assuming its availability. We have also updated thehatch
package version from 1.7.0 to 1.9.4, which may include bug fixes, performance improvements, or new features. This change may impact the behavior of any existing functionality that relies onhatch
. Thepyproject.toml
file has been modified to update thefmt
andverify
sections, withruff check . --fix
replacingruff . --fix
and the removal ofblack --check .
andisort . --check-only
. A new configuration forisort
has also been added to specify thedatabricks.labs.blueprint
package as a known first-party package, enabling more precise management of imports related to that package. These changes simplify the build process and ensure that the project is using a more recent version of thehatch
package for packaging and distributing Python projects. - Updated sqlglot requirement from ~=22.3.1 to >=22.3.1,<22.5.0 (#51). In this release, we have updated the version constraint for the
sqlglot
package in our project'spyproject.toml
file. Previously, we had set the constraint to~=22.3.1
, allowing for any version with the same major and minor numbers but different patch numbers. With this update, we have changed the constraint to>=22.3.1,<22.5.0
. This change enables our project to utilize bug fixes and improvements made in the latest patch versions ofsqlglot
, while still preventing it from inadvertently using any breaking changes introduced in version 22.5.0 or later versions. This modification allows us to take advantage of the latest features and improvements insqlglot
while maintaining compatibility and stability in our project.
Dependency updates:
- Updated sqlglot requirement from ~=22.3.1 to >=22.3.1,<22.5.0 (#51).
Contributors: @nfx, @dependabot[bot]
v0.2.0
- Added
MockBackend.rows("col1", "col2")[(...), (...)]
helper (#49). In this release, we have added a new helper methodMockBackend.rows("col1", "col2")[(...), (...)]
to simplify testing withMockBackend
. This method allows for the creation of rows using a more concise syntax, taking in the column names and a list of values to be used for each column, and returning a list ofRow
objects with the specified columns and values. Additionally, a__eq__
method has been introduced to check if two rows are equal by converting the rows to dictionaries using the existingas_dict
method and comparing them. The__contains__
method has also been modified to improve the behavior of thein
keyword when used with rows, ensuring columns can be checked for membership in the row in a more intuitive and predictable manner. These changes make it easier to test and work withMockBackend
, improving overall quality and maintainability of the project.
Contributors: @nfx
v0.1.1
- Updated project metadata (#46). In this release, the project metadata has been updated to reflect changes in the library's capabilities and dependencies. The project now supports lightweight SQL statement execution using the Databricks SDK for Python, setting it apart from other solutions. The library size comparison in the documentation has been updated, reflecting an increase in the compressed and uncompressed size of Databricks Labs LightSQL, as well as the addition of a new direct dependency, SQLglot. The project's dependencies and URLs in the
pyproject.toml
file have also been updated, including a version update fordatabricks-labs-blueprint
and the removal of a specific range forPyYAML
.
Dependency updates:
- Updated sqlglot requirement from ~=22.2.1 to ~=22.3.1 (#43).
Contributors: @dependabot[bot], @nfx