Developing the Avatica Go Client
Issues
To file issues, please use the Calcite JIRA and select avatica-go
as the component.
Updating protobuf definitions
- Install docker and docker compose.
- From the root of the repository, run
docker compose run compile-protobuf
Live reload during development
It is possible to reload the code in real-time during development. This executes the test suite every time a .go
or
.mod
file is updated. The test suite takes a while to run, so the tests will not complete instantly, but live-reloading
during development allows us to not have to manually execute the test suite on save.
Set up
-
Install docker and docker compose.
-
From the root of the repository, run
docker compose run dev
. -
After terminating the container, stop all the containers and remove them using:
docker compose down
Testing
The test suite takes around 4 minutes to run if you run both the Avatica HSQLDB and Apache Phoenix tests.
Easy way
-
Install docker and docker compose.
-
From the root of the repository, run
docker compose run test
. -
After the tests complete, stop all the containers and remove them using:
docker compose down
Manual set up
-
Install Go.
-
The test suite requires access to an instance of Avatica running HSQLDB and an instance of Apache Phoenix running the Phoenix Query Server.
You should then set the HSQLDB_HOST
and PHOENIX_HOST
environment variables. For example:
-
To select the test suite, export
AVATICA_FLAVOR=HSQLDB
for Avatica HSQLDB orAVATICA_FLAVOR=PHOENIX
for Phoenix. -
Then run
go test -v ./...
from the root of the repository to execute the test suite.