Implement :join-flow support and query testing on sql datasets
Small cleanups