@Override public void planRelTransform(final PlannerPhase phase, final RelNode before, final RelNode after, final long millisTaken) { if (phase == PlannerPhase.PHYSICAL) { physical.set(after); } super.planRelTransform(phase, before, after, millisTaken); } });
private static QueryProfile getQueryProfile(final String query) throws JobNotFoundException { final Job job = getJobsService().submitJob(JobRequest.newBuilder() .setSqlQuery(new SqlQuery(query, DEFAULT_USERNAME)) .setQueryType(QueryType.UI_INTERNAL_RUN) .setDatasetPath(DatasetPath.NONE.toNamespaceKey()) .setDatasetVersion(DatasetVersion.NONE) .build(), new NoOpJobStatusListener()); job.getData().loadIfNecessary(); return getJobsService().getProfile(job.getJobId(), 0); }