[Groonga-commit] groonga/groonga [master] Add a test for binary operation for Int16 type

Back to archive index

Kouhei Sutou null+****@clear*****
Mon Mar 4 15:16:48 JST 2013


Kouhei Sutou	2013-03-04 15:16:48 +0900 (Mon, 04 Mar 2013)

  New Revision: b99ef3e0d1b2fb08ac0cfa1815e254f8ffdec15a
  https://github.com/groonga/groonga/commit/b99ef3e0d1b2fb08ac0cfa1815e254f8ffdec15a

  Log:
    Add a test for binary operation for Int16 type
    
    Operation: X / Y

  Added files:
    test/command/suite/select/filter/arithmetic_operation/slash/int16.expected
    test/command/suite/select/filter/arithmetic_operation/slash/int16.test

  Added: test/command/suite/select/filter/arithmetic_operation/slash/int16.expected (+45 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/filter/arithmetic_operation/slash/int16.expected    2013-03-04 15:16:48 +0900 (dc05da5)
@@ -0,0 +1,45 @@
+table_create Values TABLE_NO_KEY
+[[0,0.0,0.0],true]
+column_create Values value1 COLUMN_SCALAR Int16
+[[0,0.0,0.0],true]
+column_create Values value2 COLUMN_SCALAR Int16
+[[0,0.0,0.0],true]
+load --table Values
+[
+{"value1": 10, "value2": 5}
+]
+[[0,0.0,0.0],1]
+select Values   --filter true   --scorer '_score = value1 / value2'   --output_columns 'value1, value2, _score'
+[
+  [
+    0,
+    0.0,
+    0.0
+  ],
+  [
+    [
+      [
+        1
+      ],
+      [
+        [
+          "value1",
+          "Int16"
+        ],
+        [
+          "value2",
+          "Int16"
+        ],
+        [
+          "_score",
+          "Int32"
+        ]
+      ],
+      [
+        10,
+        5,
+        2
+      ]
+    ]
+  ]
+]

  Added: test/command/suite/select/filter/arithmetic_operation/slash/int16.test (+13 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/filter/arithmetic_operation/slash/int16.test    2013-03-04 15:16:48 +0900 (cf27154)
@@ -0,0 +1,13 @@
+table_create Values TABLE_NO_KEY
+column_create Values value1 COLUMN_SCALAR Int16
+column_create Values value2 COLUMN_SCALAR Int16
+
+load --table Values
+[
+{"value1": 10, "value2": 5}
+]
+
+select Values \
+  --filter true \
+  --scorer '_score = value1 / value2' \
+  --output_columns 'value1, value2, _score'
-------------- next part --------------
HTML����������������������������...
下载 



More information about the Groonga-commit mailing list
Back to archive index