@Test public void testExecute() throws Exception { QueryGeneratorCLI queryGeneratorCLI = new QueryGeneratorCLI(); Pair<List<String>, double[]> result = queryGeneratorCLI.execute(cubeName, 10); List<String> sqls = result.getFirst(); double[] probs = result.getSecond(); for (int i = 0; i < sqls.size(); i++) { System.out.println("Accumulate Probability: " + probs[i]); System.out.println("SQL: " + sqls.get(i)); } }
protected void execute(OptionsHelper optionsHelper) throws Exception { String temp = optionsHelper.getOptionValue(OPTION_MAX_DIM_NUM); if (!Strings.isNullOrEmpty(temp)) { this.maxNumOfDim = Integer.parseInt(temp); } this.outputPath = optionsHelper.getOptionValue(OPTION_OUTPUT); this.sizeOfQueryList = Integer.parseInt(optionsHelper.getOptionValue(OPTION_SIZE)); String cubeName = optionsHelper.getOptionValue(OPTION_CUBE); run(cubeName, true); }
QueryGeneratorCLI extends AbstractApplication { protected void execute(OptionsHelper optionsHelper) throws Exception { String temp = optionsHelper.getOptionValue(OPTION_MAX_DIM_NUM); if (!Strings.isNullOrEmpty(temp)) { this.maxNumOfDim = Integer.parseInt(temp); } this.outputPath = optionsHelper.getOptionValue(OPTION_OUTPUT); this.sizeOfQueryList = Integer.parseInt(optionsHelper.getOptionValue(OPTION_SIZE)); String cubeName = optionsHelper.getOptionValue(OPTION_CUBE); run(cubeName, true); } }
QueryGeneratorCLI extends AbstractApplication { protected void execute(OptionsHelper optionsHelper) throws Exception { String temp = optionsHelper.getOptionValue(OPTION_MAX_DIM_NUM); if (!Strings.isNullOrEmpty(temp)) { this.maxNumOfDim = Integer.parseInt(temp); } this.outputPath = optionsHelper.getOptionValue(OPTION_OUTPUT); this.sizeOfQueryList = Integer.parseInt(optionsHelper.getOptionValue(OPTION_SIZE)); String cubeName = optionsHelper.getOptionValue(OPTION_CUBE); run(cubeName, true); } QueryGeneratorCLI(); }
QueryGeneratorCLI extends AbstractApplication { protected void execute(OptionsHelper optionsHelper) throws Exception { String temp = optionsHelper.getOptionValue(OPTION_MAX_DIM_NUM); if (!Strings.isNullOrEmpty(temp)) { this.maxNumOfDim = Integer.parseInt(temp); } this.outputPath = optionsHelper.getOptionValue(OPTION_OUTPUT); this.sizeOfQueryList = Integer.parseInt(optionsHelper.getOptionValue(OPTION_SIZE)); String cubeName = optionsHelper.getOptionValue(OPTION_CUBE); run(cubeName, true); } QueryGeneratorCLI(); Pair<List<String>, double[]> execute(String cubeName, int sizeOfQueryList, String outputPath); Pair<List<String>, double[]> execute(String cubeName, int sizeOfQueryList); static void storeQuery(List<String> querySet, String outputPath); static void main(String[] args); }
QueryGeneratorCLI extends AbstractApplication { protected void execute(OptionsHelper optionsHelper) throws Exception { String temp = optionsHelper.getOptionValue(OPTION_MAX_DIM_NUM); if (!Strings.isNullOrEmpty(temp)) { this.maxNumOfDim = Integer.parseInt(temp); } this.outputPath = optionsHelper.getOptionValue(OPTION_OUTPUT); this.sizeOfQueryList = Integer.parseInt(optionsHelper.getOptionValue(OPTION_SIZE)); String cubeName = optionsHelper.getOptionValue(OPTION_CUBE); run(cubeName, true); } QueryGeneratorCLI(); Pair<List<String>, double[]> execute(String cubeName, int sizeOfQueryList, String outputPath); Pair<List<String>, double[]> execute(String cubeName, int sizeOfQueryList); static void storeQuery(List<String> querySet, String outputPath); static void main(String[] args); static final String SQL_SEPARATOR; }