partiql / partiql-lang-kotlin

PartiQL libraries and tools in Kotlin.
https://partiql.org/
Apache License 2.0
536 stars 60 forks source link

Defines the V1 bindings and metadata interfaces (updating SPI) #1497

Open RCHowell opened 5 days ago

RCHowell commented 5 days ago

Relevant Issues

https://github.com/partiql/partiql-lang-kotlin/issues/1496

Description

This PR introduces the V1 interfaces for data and metadata access.

In PartiQL 0.x implementations, all packages depended on SPI for access to data and catalog information. With the additions of Datum and PType, we are flipping the dependency such that SPI depends upon the package-specific interfaces.

Current customers of partiql-lang-kotlin (eval) use the lang.eval.Bindings and lang.eval.ExprValue interfaces which are inside of the lang.eval package. However, there is not an equivalent metadata layer. We initially used Trino's SPI approach to the metadata layer (early 2023), but it results in two disparate extension models. This PR is an effort to extend the existing partiql-lang-kotlin model to include metadata while defining the SPI as a layer on top of both eval.Bindings and planner.Metadata. The end result is to make the changes from 0.x to 1.0 more of an extension to current models rather than a different design approach altogether.

Other Information

License Information

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.