@@ -105,33 +105,22 @@ public SqlContext(final Configuration configuration, final List<Plugin> plugins)
105105 * args[6...] = platforms
106106 */
107107 public static void main (final String [] args ) throws Exception {
108- if (args .length < 3 )
108+ if (args .length < 4 )
109109 throw new IllegalArgumentException (
110110 "Usage: ./bin/wayang-submit org.apache.wayang.api.sql.SqlContext <configuration path> <SQL statement path> <output path> [platforms...]" );
111111
112112 //Specify the named arguments
113113 Options options = new Options ();
114114 options .addOption ("p" , "platforms" , true , "[platforms...]" );
115- options .addOption ("s" , "schema" , true , "Schema path" );
116115 options .addOption ("q" , "query" , true , "SQL statement path" );
117116 options .addOption ("o" , "outputPath" , true , "Output path" );
118- options .addOption ("d" , "data" , true , "Data path for file-based schema" );
119117 options .addOption ("c" , "config" , true , "File path for config file" );
120- options .addOption ("jdbcDriver" , true , "JDBC driver" );
121- options .addOption ("jdbcUrl" , true , "JDBC URL" );
122- options .addOption ("jdbcPassword" , true , "JDBC URL" );
123118
124119 CommandLineParser parser = new DefaultParser ();
125120 CommandLine cmd = parser .parse (options , args );
126121
127122 final String queryPath = cmd .getOptionValue ("q" );
128- final String jdbcDriver = cmd .getOptionValue ("jdbcDriver" );
129- final String jdbcUrl = cmd .getOptionValue ("jdbcUrl" );
130- final String jdbcUser = cmd .getOptionValue ("jdbcUser" );
131- final String jdbcPassword = cmd .getOptionValue ("jdbcPassword" );
132123 final String outputPath = cmd .getOptionValue ("o" );
133- final String dataPath = cmd .getOptionValue ("d" );
134- final String schemaPath = cmd .getOptionValue ("s" );
135124
136125 final String query = StringUtils .chop (Files .readString (Paths .get (queryPath )).stripTrailing ());
137126 final Configuration configuration = new Configuration ();
@@ -140,13 +129,6 @@ public static void main(final String[] args) throws Exception {
140129 configuration .load (cmd .getOptionValue ("c" ));
141130 }
142131
143- final String calciteModel = Resources .toString (
144- new URL (schemaPath ),
145- Charset .defaultCharset ()
146- );
147-
148- final JSONObject calciteModelJSON = (JSONObject ) new JSONParser ().parse (calciteModel );
149-
150132 final SqlContext context = new SqlContext (configuration , List .of (Java .channelConversionPlugin (), Postgres .conversionPlugin ()));
151133
152134 final List <Plugin > plugins = JavaConversions .seqAsJavaList (Parameters .loadPlugins (cmd .getOptionValue ("p" )));
0 commit comments