You can also use Calcite if you're on the JVM:
Re:The SQL layer in CockroachDB
by AdamJacobMuller on Friday April 28, 2017 @10:01PM
(#14224617)
That's much nicer than hacking stuff out, unfortunately/fortunately (not sure anymore) I am not a java programmer, this particular app is in go.
I was looking at using/extracting their pgwire implementation to provide an SQL-like interface to the in-memory state of a particular application we use, this document will make it way way easier.