Open sofiazxy opened 5 years ago
Here's the problem diagnosis: The Temporary schema gets created in SelectQueryCoordinator and problem is here:
// create scratchpad schema if not exists
if (!conn.getSchemas().contains(scratchpadSchema)) {
log.info(
String.format(
"The schema for temporary tables (%s) does not exist; so we create it.",
scratchpadSchema));
CreateSchemaQuery createSchema = new CreateSchemaQuery(scratchpadSchema);
conn.execute(createSchema);
}```
so for Spark, 1) the check in the if statement is not working correctly; and 2) createSchema does not use `IF NOT EXISTS` hence causing the error
When attempting to execute the following 2 VerdictDB queries back to back: VerdictSingleResult result = verdict.sql("select count() from mydefault.lineitem_scramble"); VerdictSingleResult result1 = verdict.sql("select count() from mydefault.lineitem_scramble where l_linenumber>2");
Encountered the following error:
rg.verdictdb.exception.VerdictDBDbmsException: Issued the following query: create schema verdictdbtemp org.apache.hadoop.hive.metastore.api.AlreadyExistsException: Database verdictdbtemp already exists;