OmniSciDB  471d68cefb
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
com.mapd.parser.server.test.SqlIdentifierCapturerTest Class Reference

Classes

class  MockSchema
 

Public Member Functions

void testSelect (String sql, Set< ImmutableList< String >> expectedSelects) throws Exception
 
void testUpdate (String sql, Set< ImmutableList< String >> expectedUpdates, Set< ImmutableList< String >> expectedSelects) throws Exception
 
void testInsert (String sql, Set< ImmutableList< String >> expectedInserts, Set< ImmutableList< String >> expectedSelects) throws Exception
 
void testDelete (String sql, Set< ImmutableList< String >> expectedDeletes, Set< ImmutableList< String >> expectedSelects) throws Exception
 
void testSelects () throws Exception
 
void testSelectsWithSchema () throws Exception
 
void testInserts () throws Exception
 
void testInsertsWithSchema () throws Exception
 
void testUpdates () throws Exception
 
void testUpdatesWithSchema () throws Exception
 
void testDeletes () throws Exception
 
void testDeletesWithSchema () throws Exception
 

Static Public Member Functions

static ImmutableList< String > asImmutableList (String...vals)
 
static ImmutableList< String > asImmutableList ()
 
static Set< ImmutableList
< String > > 
asSet (ImmutableList< String > val)
 
static Set< ImmutableList
< String > > 
asSet (ImmutableList< String >...vals)
 
static Set< ImmutableList
< String > > 
asSet ()
 

Private Member Functions

Planner getPlanner ()
 

Detailed Description

Definition at line 34 of file SqlIdentifierCapturerTest.java.

Member Function Documentation

static ImmutableList<String> com.mapd.parser.server.test.SqlIdentifierCapturerTest.asImmutableList ( String...  vals)
inlinestatic

Definition at line 110 of file SqlIdentifierCapturerTest.java.

110  {
111  return ImmutableList.copyOf(asList(vals));
112  }
static Set<ImmutableList<String> > com.mapd.parser.server.test.SqlIdentifierCapturerTest.asSet ( ImmutableList< String >  val)
inlinestatic

Definition at line 118 of file SqlIdentifierCapturerTest.java.

118  {
119  Set<ImmutableList<String>> ret = new HashSet<ImmutableList<String>>();
120  ret.add(val);
121  return ret;
122  }
static Set<ImmutableList<String> > com.mapd.parser.server.test.SqlIdentifierCapturerTest.asSet ( ImmutableList< String >...  vals)
inlinestatic

Definition at line 124 of file SqlIdentifierCapturerTest.java.

124  {
125  Set<ImmutableList<String>> ret = new HashSet<ImmutableList<String>>();
126  ret.addAll(Arrays.asList(vals));
127  return ret;
128  }
Planner com.mapd.parser.server.test.SqlIdentifierCapturerTest.getPlanner ( )
inlineprivate

Definition at line 92 of file SqlIdentifierCapturerTest.java.

Referenced by com.mapd.parser.server.test.SqlIdentifierCapturerTest.testDelete(), com.mapd.parser.server.test.SqlIdentifierCapturerTest.testInsert(), com.mapd.parser.server.test.SqlIdentifierCapturerTest.testSelect(), and com.mapd.parser.server.test.SqlIdentifierCapturerTest.testUpdate().

92  {
93  Schema mapd = new MockSchema() {
94 
95  };
96  final SchemaPlus rootSchema = Frameworks.createRootSchema(true);
97  final FrameworkConfig config =
98  Frameworks.newConfigBuilder()
99  .defaultSchema(rootSchema.add("omnisci", mapd))
100  .operatorTable(
101  new MapDSqlOperatorTable(SqlStdOperatorTable.instance()))
102  .parserConfig(SqlParser.configBuilder()
103  .setUnquotedCasing(Casing.UNCHANGED)
104  .setCaseSensitive(false)
105  .build())
106  .build();
107  return new MapDPlanner(config);
108  }

+ Here is the caller graph for this function:

void com.mapd.parser.server.test.SqlIdentifierCapturerTest.testDelete ( String  sql,
Set< ImmutableList< String >>  expectedDeletes,
Set< ImmutableList< String >>  expectedSelects 
) throws Exception
inline

Definition at line 170 of file SqlIdentifierCapturerTest.java.

References com.mapd.parser.server.test.SqlIdentifierCapturerTest.asSet(), org.apache.calcite.prepare.SqlIdentifierCapturer.deletes, com.mapd.parser.server.test.SqlIdentifierCapturerTest.getPlanner(), org.apache.calcite.prepare.SqlIdentifierCapturer.inserts, org.apache.calcite.prepare.SqlIdentifierCapturer.selects, and org.apache.calcite.prepare.SqlIdentifierCapturer.updates.

Referenced by com.mapd.parser.server.test.SqlIdentifierCapturerTest.testDeletes(), and com.mapd.parser.server.test.SqlIdentifierCapturerTest.testDeletesWithSchema().

172  {
173  SqlIdentifierCapturer capturer = new SqlIdentifierCapturer();
174  capturer.scan(getPlanner().parse(sql));
175 
176  assertEquals("selects", expectedSelects, capturer.selects);
177  assertEquals("inserts", asSet(), capturer.inserts);
178  assertEquals("updates", asSet(), capturer.updates);
179  assertEquals("deletes", expectedDeletes, capturer.deletes);
180  }

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void com.mapd.parser.server.test.SqlIdentifierCapturerTest.testDeletes ( ) throws Exception
inline

Definition at line 352 of file SqlIdentifierCapturerTest.java.

References com.mapd.parser.server.test.SqlIdentifierCapturerTest.asImmutableList(), com.mapd.parser.server.test.SqlIdentifierCapturerTest.asSet(), and com.mapd.parser.server.test.SqlIdentifierCapturerTest.testDelete().

352  {
353  String sql = "DELETE FROM sales";
354  testDelete(sql, asSet(asImmutableList("sales")), asSet());
355 
356  sql = "DELETE FROM sales WHERE id=1";
357  testDelete(sql, asSet(asImmutableList("sales")), asSet());
358 
359  sql = "DELETE FROM sales WHERE id=(SELECT max(r.val) FROM reports AS r)";
360  testDelete(sql, asSet(asImmutableList("sales")), asSet(asImmutableList("reports")));
361 
362  sql = "DELETE FROM sales WHERE id=(SELECT max(r.val) FROM reports AS r) AND id=(SELECT max(m.val) FROM marketing AS m)";
363  testDelete(sql,
364  asSet(asImmutableList("sales")),
365  asSet(asImmutableList("reports"), asImmutableList("marketing")));
366  }
void testDelete(String sql, Set< ImmutableList< String >> expectedDeletes, Set< ImmutableList< String >> expectedSelects)

+ Here is the call graph for this function:

void com.mapd.parser.server.test.SqlIdentifierCapturerTest.testDeletesWithSchema ( ) throws Exception
inline

Definition at line 369 of file SqlIdentifierCapturerTest.java.

References com.mapd.parser.server.test.SqlIdentifierCapturerTest.asImmutableList(), com.mapd.parser.server.test.SqlIdentifierCapturerTest.asSet(), and com.mapd.parser.server.test.SqlIdentifierCapturerTest.testDelete().

369  {
370  String sql = "DELETE FROM mapd.sales";
371  testDelete(sql, asSet(asImmutableList("sales", "mapd")), asSet());
372 
373  sql = "DELETE FROM mapd.sales WHERE id=1";
374  testDelete(sql, asSet(asImmutableList("sales", "mapd")), asSet());
375 
376  sql = "DELETE FROM mapd.sales WHERE id=(SELECT max(r.val) FROM mapd.reports AS r)";
377  testDelete(sql,
378  asSet(asImmutableList("sales", "mapd")),
379  asSet(asImmutableList("reports", "mapd")));
380 
381  sql = "DELETE FROM mapd.sales WHERE id=(SELECT max(r.val) FROM mapd.reports AS r) AND id=(SELECT max(m.val) FROM mapd.marketing AS m)";
382  testDelete(sql,
383  asSet(asImmutableList("sales", "mapd")),
384  asSet(asImmutableList("reports", "mapd"),
385  asImmutableList("marketing", "mapd")));
386  }
void testDelete(String sql, Set< ImmutableList< String >> expectedDeletes, Set< ImmutableList< String >> expectedSelects)

+ Here is the call graph for this function:

void com.mapd.parser.server.test.SqlIdentifierCapturerTest.testInsert ( String  sql,
Set< ImmutableList< String >>  expectedInserts,
Set< ImmutableList< String >>  expectedSelects 
) throws Exception
inline

Definition at line 158 of file SqlIdentifierCapturerTest.java.

References com.mapd.parser.server.test.SqlIdentifierCapturerTest.asSet(), org.apache.calcite.prepare.SqlIdentifierCapturer.deletes, com.mapd.parser.server.test.SqlIdentifierCapturerTest.getPlanner(), org.apache.calcite.prepare.SqlIdentifierCapturer.inserts, org.apache.calcite.prepare.SqlIdentifierCapturer.selects, and org.apache.calcite.prepare.SqlIdentifierCapturer.updates.

Referenced by com.mapd.parser.server.test.SqlIdentifierCapturerTest.testInserts(), and com.mapd.parser.server.test.SqlIdentifierCapturerTest.testInsertsWithSchema().

160  {
161  SqlIdentifierCapturer capturer = new SqlIdentifierCapturer();
162  capturer.scan(getPlanner().parse(sql));
163 
164  assertEquals("selects", expectedSelects, capturer.selects);
165  assertEquals("inserts", expectedInserts, capturer.inserts);
166  assertEquals("updates", asSet(), capturer.updates);
167  assertEquals("deletes", asSet(), capturer.deletes);
168  }

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void com.mapd.parser.server.test.SqlIdentifierCapturerTest.testInserts ( ) throws Exception
inline

Definition at line 270 of file SqlIdentifierCapturerTest.java.

References com.mapd.parser.server.test.SqlIdentifierCapturerTest.asImmutableList(), com.mapd.parser.server.test.SqlIdentifierCapturerTest.asSet(), and com.mapd.parser.server.test.SqlIdentifierCapturerTest.testInsert().

270  {
271  String sql = "INSERT INTO sales VALUES(10)";
272  testInsert(sql, asSet(asImmutableList("sales")), asSet());
273 
274  sql = "INSERT INTO sales(id, target) VALUES(10, 21321)";
275  testInsert(sql, asSet(asImmutableList("sales")), asSet());
276 
277  sql = "INSERT INTO sales(id, target) VALUES(10, (SELECT max(r.val) FROM reports AS r))";
278  testInsert(sql, asSet(asImmutableList("sales")), asSet(asImmutableList("reports")));
279 
280  sql = "INSERT INTO sales(id, target) VALUES((SELECT m.id FROM marketing m), (SELECT max(r.val) FROM reports AS r))";
281  testInsert(sql,
282  asSet(asImmutableList("sales")),
283  asSet(asImmutableList("reports"), asImmutableList("marketing")));
284  }
void testInsert(String sql, Set< ImmutableList< String >> expectedInserts, Set< ImmutableList< String >> expectedSelects)

+ Here is the call graph for this function:

void com.mapd.parser.server.test.SqlIdentifierCapturerTest.testInsertsWithSchema ( ) throws Exception
inline

Definition at line 287 of file SqlIdentifierCapturerTest.java.

References com.mapd.parser.server.test.SqlIdentifierCapturerTest.asImmutableList(), com.mapd.parser.server.test.SqlIdentifierCapturerTest.asSet(), and com.mapd.parser.server.test.SqlIdentifierCapturerTest.testInsert().

287  {
288  String sql = "INSERT INTO mapd.sales VALUES(10)";
289  testInsert(sql, asSet(asImmutableList("sales", "mapd")), asSet());
290 
291  sql = "INSERT INTO mapd.sales(id, target) VALUES(10, 21321)";
292  testInsert(sql, asSet(asImmutableList("sales", "mapd")), asSet());
293 
294  sql = "INSERT INTO mapd.sales(id, target) VALUES(10, (SELECT max(r.val) FROM mapd.reports AS r))";
295  testInsert(sql,
296  asSet(asImmutableList("sales", "mapd")),
297  asSet(asImmutableList("reports", "mapd")));
298 
299  sql = "INSERT INTO mapd.sales(id, target) VALUES((SELECT m.id FROM mapd.marketing m), (SELECT max(r.val) FROM mapd.reports AS r))";
300  testInsert(sql,
301  asSet(asImmutableList("sales", "mapd")),
302  asSet(asImmutableList("reports", "mapd"),
303  asImmutableList("marketing", "mapd")));
304  }
void testInsert(String sql, Set< ImmutableList< String >> expectedInserts, Set< ImmutableList< String >> expectedSelects)

+ Here is the call graph for this function:

void com.mapd.parser.server.test.SqlIdentifierCapturerTest.testSelect ( String  sql,
Set< ImmutableList< String >>  expectedSelects 
) throws Exception
inline

Definition at line 135 of file SqlIdentifierCapturerTest.java.

References com.mapd.parser.server.test.SqlIdentifierCapturerTest.asSet(), org.apache.calcite.prepare.SqlIdentifierCapturer.deletes, com.mapd.parser.server.test.SqlIdentifierCapturerTest.getPlanner(), org.apache.calcite.prepare.SqlIdentifierCapturer.inserts, org.apache.calcite.prepare.SqlIdentifierCapturer.selects, and org.apache.calcite.prepare.SqlIdentifierCapturer.updates.

Referenced by com.mapd.parser.server.test.SqlIdentifierCapturerTest.testSelects(), and com.mapd.parser.server.test.SqlIdentifierCapturerTest.testSelectsWithSchema().

136  {
137  SqlIdentifierCapturer capturer = new SqlIdentifierCapturer();
138  capturer.scan(getPlanner().parse(sql));
139 
140  assertEquals("selects", expectedSelects, capturer.selects);
141  assertEquals("inserts", asSet(), capturer.inserts);
142  assertEquals("updates", asSet(), capturer.updates);
143  assertEquals("deletes", asSet(), capturer.deletes);
144  }

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void com.mapd.parser.server.test.SqlIdentifierCapturerTest.testSelects ( ) throws Exception
inline

Definition at line 183 of file SqlIdentifierCapturerTest.java.

References com.mapd.parser.server.test.SqlIdentifierCapturerTest.asImmutableList(), com.mapd.parser.server.test.SqlIdentifierCapturerTest.asSet(), and com.mapd.parser.server.test.SqlIdentifierCapturerTest.testSelect().

183  {
184  String sql = "SELECT * FROM sales";
185  testSelect(sql, asSet(asImmutableList("sales")));
186 
187  sql = "SELECT * FROM sales AS s";
188  testSelect(sql, asSet(asImmutableList("sales")));
189 
190  sql = "SELECT * FROM sales AS s, reports AS r WHERE s.id = r.id";
191  testSelect(sql, asSet(asImmutableList("sales"), asImmutableList("reports")));
192 
193  sql = "SELECT * FROM sales AS s left outer join reports AS r on s.id = r.id";
194  testSelect(sql, asSet(asImmutableList("sales"), asImmutableList("reports")));
195 
196  sql = "SELECT *, (SELECT sum(val) FROM marketing m WHERE m.id=a.id) FROM sales AS s left outer join reports AS r on s.id = r.id";
197  testSelect(sql,
198  asSet(asImmutableList("sales"),
199  asImmutableList("reports"),
200  asImmutableList("marketing")));
201 
202  sql = "SELECT * FROM sales UNION SELECT * FROM reports UNION SELECT * FROM marketing";
203  testSelect(sql,
204  asSet(asImmutableList("sales"),
205  asImmutableList("reports"),
206  asImmutableList("marketing")));
207 
208  sql = "SELECT COUNT(*) AS n, str FROM query_rewrite_test WHERE str IN ('str2', 'str99') GROUP BY str HAVING n > 0 ORDER BY n DESC";
209  testSelect(sql, asSet(asImmutableList("query_rewrite_test")));
210 
211  sql = "SELECT str, SUM(y) as total_y FROM test GROUP BY str ORDER BY total_y DESC, str LIMIT 1";
212  testSelect(sql, asSet(asImmutableList("test")));
213 
214  sql = "SELECT str FROM (SELECT str, SUM(y) as total_y FROM test GROUP BY str ORDER BY total_y DESC, str LIMIT 1)";
215  testSelect(sql, asSet(asImmutableList("test")));
216 
217  sql = "SELECT deptno, dname FROM (SELECT * from dept) AS view_name LIMIT 10";
218  testSelect(sql, asSet(asImmutableList("dept")));
219 
220  sql = "WITH d1 AS (SELECT deptno, dname FROM dept LIMIT 10) SELECT ename, dname FROM emp, d1 WHERE emp.deptno = d1.deptno ORDER BY ename ASC LIMIT 10";
221  testSelect(sql, asSet(asImmutableList("emp"), asImmutableList("dept")));
222  }
void testSelect(String sql, Set< ImmutableList< String >> expectedSelects)

+ Here is the call graph for this function:

void com.mapd.parser.server.test.SqlIdentifierCapturerTest.testSelectsWithSchema ( ) throws Exception
inline

Definition at line 225 of file SqlIdentifierCapturerTest.java.

References com.mapd.parser.server.test.SqlIdentifierCapturerTest.asImmutableList(), com.mapd.parser.server.test.SqlIdentifierCapturerTest.asSet(), and com.mapd.parser.server.test.SqlIdentifierCapturerTest.testSelect().

225  {
226  String sql = "SELECT * FROM mapd.sales";
227  testSelect(sql, asSet(asImmutableList("sales", "mapd")));
228 
229  sql = "SELECT * FROM mapd.sales AS s";
230  testSelect(sql, asSet(asImmutableList("sales", "mapd")));
231 
232  sql = "SELECT * FROM mapd.sales AS s, mapd.reports AS r WHERE s.id = r.id";
233  testSelect(sql,
234  asSet(asImmutableList("sales", "mapd"), asImmutableList("reports", "mapd")));
235 
236  sql = "SELECT * FROM mapd.sales AS s left outer join mapd.reports AS r on s.id = r.id";
237  testSelect(sql,
238  asSet(asImmutableList("sales", "mapd"), asImmutableList("reports", "mapd")));
239 
240  sql = "SELECT *, (SELECT sum(val) FROM mapd.marketing m WHERE m.id=a.id) FROM mapd.sales AS s left outer join mapd.reports AS r on s.id = r.id";
241  testSelect(sql,
242  asSet(asImmutableList("sales", "mapd"),
243  asImmutableList("reports", "mapd"),
244  asImmutableList("marketing", "mapd")));
245 
246  sql = "SELECT * FROM mapd.sales UNION SELECT * FROM mapd.reports UNION SELECT * FROM mapd.marketing";
247  testSelect(sql,
248  asSet(asImmutableList("sales", "mapd"),
249  asImmutableList("reports", "mapd"),
250  asImmutableList("marketing", "mapd")));
251 
252  sql = "SELECT COUNT(*) AS n, str FROM mapd.query_rewrite_test WHERE str IN ('str2', 'str99') GROUP BY str HAVING n > 0 ORDER BY n DESC";
253  testSelect(sql, asSet(asImmutableList("query_rewrite_test", "mapd")));
254 
255  sql = "SELECT str, SUM(y) as total_y FROM mapd.test GROUP BY str ORDER BY total_y DESC, str LIMIT 1";
256  testSelect(sql, asSet(asImmutableList("test", "mapd")));
257 
258  sql = "SELECT str FROM (SELECT str, SUM(y) as total_y FROM mapd.test GROUP BY str ORDER BY total_y DESC, str LIMIT 1)";
259  testSelect(sql, asSet(asImmutableList("test", "mapd")));
260 
261  sql = "SELECT deptno, dname FROM (SELECT * from mapd.dept) AS view_name LIMIT 10";
262  testSelect(sql, asSet(asImmutableList("dept", "mapd")));
263 
264  sql = "WITH d1 AS (SELECT deptno, dname FROM mapd.dept LIMIT 10) SELECT ename, dname FROM mapd.emp, d1 WHERE emp.deptno = d1.deptno ORDER BY ename ASC LIMIT 10";
265  testSelect(
266  sql, asSet(asImmutableList("emp", "mapd"), asImmutableList("dept", "mapd")));
267  }
void testSelect(String sql, Set< ImmutableList< String >> expectedSelects)

+ Here is the call graph for this function:

void com.mapd.parser.server.test.SqlIdentifierCapturerTest.testUpdate ( String  sql,
Set< ImmutableList< String >>  expectedUpdates,
Set< ImmutableList< String >>  expectedSelects 
) throws Exception
inline

Definition at line 146 of file SqlIdentifierCapturerTest.java.

References com.mapd.parser.server.test.SqlIdentifierCapturerTest.asSet(), org.apache.calcite.prepare.SqlIdentifierCapturer.deletes, com.mapd.parser.server.test.SqlIdentifierCapturerTest.getPlanner(), org.apache.calcite.prepare.SqlIdentifierCapturer.inserts, org.apache.calcite.prepare.SqlIdentifierCapturer.selects, and org.apache.calcite.prepare.SqlIdentifierCapturer.updates.

Referenced by com.mapd.parser.server.test.SqlIdentifierCapturerTest.testUpdates(), and com.mapd.parser.server.test.SqlIdentifierCapturerTest.testUpdatesWithSchema().

148  {
149  SqlIdentifierCapturer capturer = new SqlIdentifierCapturer();
150  capturer.scan(getPlanner().parse(sql));
151 
152  assertEquals("selects", expectedSelects, capturer.selects);
153  assertEquals("inserts", asSet(), capturer.inserts);
154  assertEquals("updates", expectedUpdates, capturer.updates);
155  assertEquals("deletes", asSet(), capturer.deletes);
156  }

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void com.mapd.parser.server.test.SqlIdentifierCapturerTest.testUpdates ( ) throws Exception
inline

Definition at line 307 of file SqlIdentifierCapturerTest.java.

References com.mapd.parser.server.test.SqlIdentifierCapturerTest.asImmutableList(), com.mapd.parser.server.test.SqlIdentifierCapturerTest.asSet(), and com.mapd.parser.server.test.SqlIdentifierCapturerTest.testUpdate().

307  {
308  String sql = "UPDATE sales SET id=10";
309  testUpdate(sql, asSet(asImmutableList("sales")), asSet());
310 
311  sql = "UPDATE sales SET id=10 WHERE id=1";
312  testUpdate(sql, asSet(asImmutableList("sales")), asSet());
313 
314  sql = "UPDATE sales SET id=(SELECT max(r.val) FROM reports AS r)";
315  testUpdate(sql, asSet(asImmutableList("sales")), asSet(asImmutableList("reports")));
316 
317  sql = "UPDATE sales SET id=(SELECT max(r.val) FROM reports AS r) WHERE id=(SELECT max(m.val) FROM marketing AS m)";
318  testUpdate(sql,
319  asSet(asImmutableList("sales")),
320  asSet(asImmutableList("reports"), asImmutableList("marketing")));
321 
322  sql = "UPDATE shardkey SET y=99 WHERE x=(SELECT max(id) from v2 LIMIT 1)";
323  testUpdate(sql, asSet(asImmutableList("shardkey")), asSet(asImmutableList("v2")));
324  }
void testUpdate(String sql, Set< ImmutableList< String >> expectedUpdates, Set< ImmutableList< String >> expectedSelects)

+ Here is the call graph for this function:

void com.mapd.parser.server.test.SqlIdentifierCapturerTest.testUpdatesWithSchema ( ) throws Exception
inline

Definition at line 327 of file SqlIdentifierCapturerTest.java.

References com.mapd.parser.server.test.SqlIdentifierCapturerTest.asImmutableList(), com.mapd.parser.server.test.SqlIdentifierCapturerTest.asSet(), and com.mapd.parser.server.test.SqlIdentifierCapturerTest.testUpdate().

327  {
328  String sql = "UPDATE mapd.sales SET id=10";
329  testUpdate(sql, asSet(asImmutableList("sales", "mapd")), asSet());
330 
331  sql = "UPDATE mapd.sales SET id=10 WHERE id=1";
332  testUpdate(sql, asSet(asImmutableList("sales", "mapd")), asSet());
333 
334  sql = "UPDATE mapd.sales SET id=(SELECT max(r.val) FROM mapd.reports AS r)";
335  testUpdate(sql,
336  asSet(asImmutableList("sales", "mapd")),
337  asSet(asImmutableList("reports", "mapd")));
338 
339  sql = "UPDATE mapd.sales SET id=(SELECT max(r.val) FROM mapd.reports AS r) WHERE id=(SELECT max(m.val) FROM mapd.marketing AS m)";
340  testUpdate(sql,
341  asSet(asImmutableList("sales", "mapd")),
342  asSet(asImmutableList("reports", "mapd"),
343  asImmutableList("marketing", "mapd")));
344 
345  sql = "UPDATE mapd.shardkey SET y=99 WHERE x=(SELECT max(id) from mapd.v2 LIMIT 1)";
346  testUpdate(sql,
347  asSet(asImmutableList("shardkey", "mapd")),
348  asSet(asImmutableList("v2", "mapd")));
349  }
void testUpdate(String sql, Set< ImmutableList< String >> expectedUpdates, Set< ImmutableList< String >> expectedSelects)

+ Here is the call graph for this function:


The documentation for this class was generated from the following file: