[Groonga-commit] groonga/groonga [master] test function: add a case for "A &! (B && C)"

Back to archive index

null+****@clear***** null+****@clear*****
2012年 5月 18日 (金) 09:38:51 JST


Kouhei Sutou	2012-05-18 09:38:51 +0900 (Fri, 18 May 2012)

  New Revision: 679610ca80a72ce6b5e9fd9711e3163346187a78

  Log:
    test function: add a case for "A &! (B && C)"
    
    It's not worked well yet! We should fix it before the next release.

  Added files:
    test/function/suite/select/filter/set_operation/not_and.expected
    test/function/suite/select/filter/set_operation/not_and.test

  Added: test/function/suite/select/filter/set_operation/not_and.expected (+63 -0) 100644
===================================================================
--- /dev/null
+++ test/function/suite/select/filter/set_operation/not_and.expected    2012-05-18 09:38:51 +0900 (81d358d)
@@ -0,0 +1,63 @@
+table_create Tags TABLE_HASH_KEY ShortText
+[[0,0.0,0.0],true]
+table_create Movies TABLE_HASH_KEY ShortText
+[[0,0.0,0.0],true]
+column_create Movies tags COLUMN_VECTOR Tags
+[[0,0.0,0.0],true]
+column_create Tags index COLUMN_INDEX Movies tags
+[[0,0.0,0.0],true]
+load --table Movies
+[
+{"_key": "Seven Samurai", tags: ["Samurai", "Japanese", "Kurosawa Akira"]},
+{"_key": "The Last Samurai", tags: ["Samurai", "English", "Tom Cruise"]},
+{"_key": "The Matrix", tags: ["Keanu Reeves", "SF", "English"]},
+{"_key": "Star Wars", tags: ["George Lucas", "SF", "English"]}
+]
+[[0,0.0,0.0],4]
+select Movies   --filter 'tags @ "English" &! (tags @ "Keanu Reeves" && tags @ "SF")'
+[
+  [
+    0,
+    0.0,
+    0.0
+  ],
+  [
+    [
+      [
+        2
+      ],
+      [
+        [
+          "_id",
+          "UInt32"
+        ],
+        [
+          "_key",
+          "ShortText"
+        ],
+        [
+          "tags",
+          "Tags"
+        ]
+      ],
+      [
+        2,
+        "The Last Samurai",
+        [
+          "Samurai",
+          "English",
+          "Tom Cruise"
+        ]
+      ],
+      [
+        4,
+        "Star Wars",
+        [
+          "George Lucas",
+          "SF",
+          "English"
+        ]
+      ]
+    ]
+  ]
+]

  Added: test/function/suite/select/filter/set_operation/not_and.test (+17 -0) 100644
===================================================================
--- /dev/null
+++ test/function/suite/select/filter/set_operation/not_and.test    2012-05-18 09:38:51 +0900 (33e179d)
@@ -0,0 +1,17 @@
+table_create Tags TABLE_HASH_KEY ShortText
+
+table_create Movies TABLE_HASH_KEY ShortText
+column_create Movies tags COLUMN_VECTOR Tags
+
+column_create Tags index COLUMN_INDEX Movies tags
+
+load --table Movies
+[
+{"_key": "Seven Samurai", tags: ["Samurai", "Japanese", "Kurosawa Akira"]},
+{"_key": "The Last Samurai", tags: ["Samurai", "English", "Tom Cruise"]},
+{"_key": "The Matrix", tags: ["Keanu Reeves", "SF", "English"]},
+{"_key": "Star Wars", tags: ["George Lucas", "SF", "English"]}
+]
+
+select Movies \
+  --filter 'tags @ "English" &! (tags @ "Keanu Reeves" && tags @ "SF")'




Groonga-commit メーリングリストの案内
Back to archive index