Enables to write sql level tests easily. Can be used to write tests against existing test backends (ComponentSupplier) - by doing so the testcases can be moved closer to the exercised codes.
These tests might come from real usages of Druid by some external tool - by utilizing the capture mode of this module iq tests could be captured and validated later that they retain their results. By adding tests for those here could act as an early warning that something might have changed.
If you don't have java&maven - one way to set that up is by using sdkman like this:
# install sdkman curl -s "https://get.sdkman.io" | bash # at the end of installation either open a new terminal; or follow the instructions at the end # install java&maven sdk install java 11.0.23-zulu sdk install maven # run mvn to see if it works mvn --version # download druid sources git clone https://github.com/apache/druid
QTest in this moduledev/quidem script can be used to run these tests (after the project is built)mvn install -pl quidem-ut/ -am -DskipTests -Pskip-static-checks
mvn exec:exec -pl quidem-ut -Dquidem.record.autostart=true
quidem.urimvn exec:exec -pl quidem-ut -Dquidem.uri=druidtest:///?componentSupplier=ThetaSketchComponentSupplier
quidem.record.autostart is omitted recording will not startrecord-123.iq file will be in the project's worktree - it will contain all the executed statementsdev/quidem -Dquidem.overwrite updates the resultsets of all iq files around there