title: Generate CROSS JOIN queries with dbplyr
body: <p>Given 2 remote tables (simulated with <code>tbl_lazy</code> for this example)</p>
  
  <pre class="lang-r prettyprint-override"><code>library("dplyr")
  library("dbplyr")
  
  t1 &lt;- tbl_lazy(df = iris, src = dbplyr::simulate_mysql())
  t2 &lt;- tbl_lazy(df = mtcars, src = dbplyr::simulate_mysql())
  </code></pre>
  
  <p>How can I perform an <em>actual</em>* cross join between t1 and t2 using <strong>R</strong> and <strong>dbplyr</strong>? </p>
  
  <p>* i.e. using <code>CROSS JOIN</code> in the translated SQL query</p>
  
  <p>Note that I know how to perform all the other types of joins, this is precisely about CROSS joins.</p>
  
  <p>I am aware of the following trick:</p>
  
  <pre class="lang-r prettyprint-override"><code>joined &lt;- t1 %&gt;%
    mutate(tmp = 1) %&gt;%
    full_join(mutate(t2, tmp = 1), by = "tmp") %&gt;%
    select(-tmp)
  </code></pre>
  
  <p>However </p>
  
  <ol>
  <li>This is ugly (even if it could be hidden in a function)</li>
  <li>I would like to take advantage of the highly optimised join capabilities of the DB, so I'd like to pass a real SQL <code>CROSS JOIN</code>. Using <code>show_query(joined)</code> shows that the generated SQL query uses <code>LEFT JOIN</code>.</li>
  </ol>
  
  <p>Sadly, there is no <code>cross_join</code> operator in <code>dplyr</code> and <code>sql_join(t1, t2, type = "cross")</code> does not work either (not implemented for <code>tbl</code>s, works only on DB connections).</p>
  
  <p>How can I generate an SQL <code>CROSS JOIN</code> with dbplyr?</p>