Temp dataset support:
1. DDLs for creating a temporary dataset
2. Garbage collection for temporary dataset
3. Reading, inserting, and deleting data from (to) a temporary dataset is locking-free (except metadata locks) and logging-free (except flush/merge/job-commit logs).
Change-Id: Id0960acd1b4dfbfa7685dba227634572ca50b126
Reviewed-on: https://asterix-gerrit.ics.uci.edu/241
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Young-Seok Kim <kisskys@gmail.com>
diff --git a/asterix-aql/src/main/javacc/AQL.jj b/asterix-aql/src/main/javacc/AQL.jj
index 3e64da4..8150871 100644
--- a/asterix-aql/src/main/javacc/AQL.jj
+++ b/asterix-aql/src/main/javacc/AQL.jj
@@ -407,6 +407,7 @@
DatasetDecl dsetDecl = null;
boolean autogenerated = false;
String compactionPolicy = null;
+ boolean temp = false;
List<String> filterField = null;
}
{
@@ -434,7 +435,11 @@
ifNotExists);
}
- | ("internal")? <DATASET> nameComponents = QualifiedName()
+ | ("internal" | "temporary" {
+ temp = token.image.toLowerCase().equals("temporary");
+ }
+ )?
+ <DATASET> nameComponents = QualifiedName()
<LEFTPAREN> typeName = Identifier() <RIGHTPAREN>
ifNotExists = IfNotExists()
primaryKeyFields = PrimaryKey()
@@ -451,7 +456,8 @@
autogenerated,
compactionPolicy,
compactionPolicyProperties,
- filterField);
+ filterField,
+ temp);
dsetDecl = new DatasetDecl(nameComponents.first,
nameComponents.second,
new Identifier(typeName),