@Test public void testGetSqlWarning() throws OdpsException { Map<String, String> hints = new HashMap<String, String>(); hints.put("odps.sql.preparse.odps2", "lot"); hints.put("odps.sql.planner.parser.odps2", "true"); hints.put("odps.sql.planner.mode", "lot"); hints.put("odps.compiler.warning.disable", "false"); Instance i = SQLTask.run(odps, odps.getDefaultProject(), "select 1 +'1' from src;", hints, null); List<String> res = SQLTask.getSqlWarning(i); if (res != null) { for (String r : res) { System.out.println(r); } } }
public static List<String> getSqlWarning(Instance instance) throws OdpsException { return getSqlWarning(instance, AnonymousSQLTaskName); }
SQLTask extends Task { public static List<String> getSqlWarning(Instance instance) throws OdpsException { return getSqlWarning(instance, AnonymousSQLTaskName); } }
SQLTask extends Task { public static List<String> getSqlWarning(Instance instance) throws OdpsException { return getSqlWarning(instance, AnonymousSQLTaskName); }  }
SQLTask extends Task { public static List<String> getSqlWarning(Instance instance) throws OdpsException { return getSqlWarning(instance, AnonymousSQLTaskName); }  String getQuery(); static void setDefaultHints(Map<String,String> hints); static void removeDefaultHints(); void setQuery(String query); static List<Record> parseCsvRecord(String csvResult); static List<Record> getResult(Instance instance, String taskName); @Survey static List<Record> getResultByInstanceTunnel(Instance instance, String taskName,
                                                       Long limit); @Survey static List<Record> getResultByInstanceTunnel(Instance instance, Long limit); @Survey static List<Record> getResultByInstanceTunnel(Instance instance, String taskName); @Survey static List<Record> getResultByInstanceTunnel(Instance instance); static List<Record> getResult(Instance instance); static ResultSet getResultSet(Instance instance); static ResultSet getResultSet(Instance instance, String taskName); static ResultSet getResultSet(Instance instance, Long limit); static ResultSet getResultSet(Instance instance, String taskName, Long limit); static ResultSet getResultSet(Instance instance, String taskName, Long limit, boolean limitHint); static ResultSet getResultSet(Instance instance, String taskName, Long limit,
                                       boolean limitHint, URI tunnelEndpoint); @Override String getCommandText(); static List<String> getSqlWarning(Instance instance); static List<String> getSqlWarning(Instance instance, String taskName); static Instance run(Odps odps, String sql); static Instance run(Odps odps, String project, String sql,
                             Map<String, String> hints, Map<String, String> aliases); static Instance run(Odps odps, String project, String sql,
                             String taskName, Map<String, String> hints,
                             Map<String, String> aliases); static Instance run(Odps odps, String project, String sql,
                             String taskName, Map<String, String> hints,
                             Map<String, String> aliases, int priority); }
SQLTask extends Task { public static List<String> getSqlWarning(Instance instance) throws OdpsException { return getSqlWarning(instance, AnonymousSQLTaskName); }  String getQuery(); static void setDefaultHints(Map<String,String> hints); static void removeDefaultHints(); void setQuery(String query); static List<Record> parseCsvRecord(String csvResult); static List<Record> getResult(Instance instance, String taskName); @Survey static List<Record> getResultByInstanceTunnel(Instance instance, String taskName,
                                                       Long limit); @Survey static List<Record> getResultByInstanceTunnel(Instance instance, Long limit); @Survey static List<Record> getResultByInstanceTunnel(Instance instance, String taskName); @Survey static List<Record> getResultByInstanceTunnel(Instance instance); static List<Record> getResult(Instance instance); static ResultSet getResultSet(Instance instance); static ResultSet getResultSet(Instance instance, String taskName); static ResultSet getResultSet(Instance instance, Long limit); static ResultSet getResultSet(Instance instance, String taskName, Long limit); static ResultSet getResultSet(Instance instance, String taskName, Long limit, boolean limitHint); static ResultSet getResultSet(Instance instance, String taskName, Long limit,
                                       boolean limitHint, URI tunnelEndpoint); @Override String getCommandText(); static List<String> getSqlWarning(Instance instance); static List<String> getSqlWarning(Instance instance, String taskName); static Instance run(Odps odps, String sql); static Instance run(Odps odps, String project, String sql,
                             Map<String, String> hints, Map<String, String> aliases); static Instance run(Odps odps, String project, String sql,
                             String taskName, Map<String, String> hints,
                             Map<String, String> aliases); static Instance run(Odps odps, String project, String sql,
                             String taskName, Map<String, String> hints,
                             Map<String, String> aliases, int priority);  }