ASTERIX allows user to give additional information in form of hints.
The syntax for providing hints supports a comma separated set of key value pairs with key as hint name and value being the actual value. The value can be a string also, in which case it must be surrounded with double quotes.
To begin with we support only one kind of hint (cardinality). If any other hint is given appropriate error message is provided.
Example of a create dataset statement:
create dataset X(TypeY)
partitioned by key id
hints (CARDINALITY=2500);
This fixes issue 251
git-svn-id: https://asterixdb.googlecode.com/svn/branches/asterix_stabilization@1175 eaa15691-b419-025a-1212-ee371bd00084
diff --git a/asterix-app/src/test/resources/runtimets/queries/dml/drop-empty-secondary-indexes.aql b/asterix-app/src/test/resources/runtimets/queries/dml/drop-empty-secondary-indexes.aql
new file mode 100644
index 0000000..2534e51
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/dml/drop-empty-secondary-indexes.aql
@@ -0,0 +1,37 @@
+/*
+ * Description : Drop empty secondary index.
+ * Expected Result : Success
+ * Date : 8th Feb 2013
+ *
+ */
+
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+create type TestType as open {
+id : int32,
+name : string,
+locn : point,
+zip : string
+}
+
+write output to nc1:"rttest/dml_drop-empty-secondary-indexes.adm";
+
+create dataset t1(TestType) partitioned by key id;
+
+create index rtree_index_point on t1(locn) type rtree;
+
+create index keyWD_indx on t1(name) type keyword;
+
+create index secndIndx on t1(zip);
+
+drop index t1.rtree_index_point;
+
+drop index t1.keyWD_indx;
+
+drop index t1.secndIndx;
+
+for $l in dataset('Metadata.Index')
+where $l.IsPrimary=false
+return $l;
diff --git a/asterix-app/src/test/resources/runtimets/results/dml/drop-empty-secondary-indexes.adm b/asterix-app/src/test/resources/runtimets/results/dml/drop-empty-secondary-indexes.adm
new file mode 100644
index 0000000..9b49756
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/dml/drop-empty-secondary-indexes.adm
@@ -0,0 +1,3 @@
+{ "DataverseName": "Metadata", "DatasetName": "Dataset", "IndexName": "DatatypeName", "IndexStructure": "BTREE", "SearchKey": [ "DataverseName", "DatatypeName", "DatasetName" ], "IsPrimary": false, "Timestamp": "Fri Feb 08 17:57:01 PST 2013" }
+{ "DataverseName": "Metadata", "DatasetName": "Dataset", "IndexName": "GroupName", "IndexStructure": "BTREE", "SearchKey": [ "GroupName", "DataverseName", "DatasetName" ], "IsPrimary": false, "Timestamp": "Fri Feb 08 17:57:01 PST 2013" }
+{ "DataverseName": "Metadata", "DatasetName": "Datatype", "IndexName": "DatatypeName", "IndexStructure": "BTREE", "SearchKey": [ "DataverseName", "NestedDatatypeName", "TopDatatypeName" ], "IsPrimary": false, "Timestamp": "Fri Feb 08 17:57:01 PST 2013" }
diff --git a/asterix-app/src/test/resources/runtimets/testsuite.xml b/asterix-app/src/test/resources/runtimets/testsuite.xml
index f547aab..e305220 100644
--- a/asterix-app/src/test/resources/runtimets/testsuite.xml
+++ b/asterix-app/src/test/resources/runtimets/testsuite.xml
@@ -754,8 +754,8 @@
</compilation-unit>
</test-case>
<test-case FilePath="dml">
- <compilation-unit name="drop-index">
- <output-file compare="Text">drop-index.adm</output-file>
+ <compilation-unit name="drop-empty-secondary-indexes">
+ <output-file compare="Text">drop-empty-secondary-indexes.adm</output-file>
</compilation-unit>
</test-case>
<test-case FilePath="dml">