* Update the plan fragment and return the bytes of the plan
*/
static byte[] writePlanBytes(VoltCompiler compiler, PlanFragment fragment, AbstractPlanNode planGraph)
throws VoltCompilerException {
// get the plan bytes
PlanNodeList node_list = new PlanNodeList(planGraph);
String json = node_list.toJSONString();
compiler.captureDiagnosticJsonFragment(json);
// Place serialized version of PlanNodeTree into a PlanFragment
byte[] jsonBytes = json.getBytes(Charsets.UTF_8);
String bin64String = Encoder.compressAndBase64Encode(jsonBytes);
fragment.setPlannodetree(bin64String);