I'm seeing a funny issue where issuing SELECT statements through the JDBC driver is fine, but when I prepend them with CREATE TABLE AS, I start getting parse errors. If I copy+paste the query string into sqlline the CTAS works. When the thing breaks, it gives me an exception with message like:
SQL Query SELECT * FROM (CREATE TABLE foo ... ) LIMIT 0 And complains about a parse error at the CREATE TABLE step. Now this is weird to me, because it seems like the driver is automatically wrapping the CTAS with a "SELECT * FROM ... LIMIT 0"? An additional complication is that this isn't straight up JDBC. This is Python calling out to the JDBC driver, so admittedly I might be throwing a wrench in there somewhere. But it doesn't make sense to me that either the Python layer or JDBC would modify the query in that way. I've checked the Python wrapper source and there I couldn't find anything to indicate it might be changing the query. I also briefly sifted through the JDBC code and couldn't find anything as well. Any clues as to what might be going on? Wes
