[Groonga-commit] groonga/groonga at 751923c [master] row_number() -> record_number()

Back to archive index

Kouhei Sutou null+****@clear*****
Wed May 18 00:30:06 JST 2016


Kouhei Sutou	2016-05-18 00:30:06 +0900 (Wed, 18 May 2016)

  New Revision: 751923c83385cdcef571a46043cbebed893e1820
  https://github.com/groonga/groonga/commit/751923c83385cdcef571a46043cbebed893e1820

  Message:
    row_number() -> record_number()

  Modified files:
    lib/window_functions.c
  Renamed files:
    test/command/suite/select/column/window_function/record_number/ascending.expected
      (from test/command/suite/select/column/window_function/row_number/ascending.expected)
    test/command/suite/select/column/window_function/record_number/ascending.test
      (from test/command/suite/select/column/window_function/row_number/ascending.test)
    test/command/suite/select/column/window_function/record_number/descending.expected
      (from test/command/suite/select/column/window_function/row_number/descending.expected)
    test/command/suite/select/column/window_function/record_number/descending.test
      (from test/command/suite/select/column/window_function/row_number/descending.test)

  Modified: lib/window_functions.c (+7 -7)
===================================================================
--- lib/window_functions.c    2016-05-18 00:22:11 +0900 (6ef478a)
+++ lib/window_functions.c    2016-05-18 00:30:06 +0900 (40ed42b)
@@ -20,11 +20,11 @@
 #include "grn_window_functions.h"
 
 static grn_rc
-window_function_row_number(grn_ctx *ctx,
-                           grn_obj *output_column,
-                           grn_window *window,
-                           grn_obj *args,
-                           int n_args)
+window_function_record_number(grn_ctx *ctx,
+                              grn_obj *output_column,
+                              grn_window *window,
+                              grn_obj *args,
+                              int n_args)
 {
   grn_id id;
   uint32_t i = 1;
@@ -45,7 +45,7 @@ grn_rc
 grn_db_init_builtin_window_functions(grn_ctx *ctx)
 {
   grn_window_function_create(ctx,
-                             "row_number", -1,
-                             window_function_row_number);
+                             "record_number", -1,
+                             window_function_record_number);
   return GRN_SUCCESS;
 }

  Renamed: test/command/suite/select/column/window_function/record_number/ascending.expected (+2 -2) 79%
===================================================================
--- test/command/suite/select/column/window_function/row_number/ascending.expected    2016-05-18 00:22:11 +0900 (363631d)
+++ test/command/suite/select/column/window_function/record_number/ascending.expected    2016-05-18 00:30:06 +0900 (31354a6)
@@ -12,7 +12,7 @@ load --table Items
 {"_key": "item6", "price": 222}
 ]
 [[0,0.0,0.0],6]
-select Items   --column[nth_row].stage initial   --column[nth_row].value 'row_number()'   --column[nth_row].type UInt32   --column[nth_row].window.sort_keys price   --output_columns '_key, price, nth_row'
+select Items   --column[nth_record].stage initial   --column[nth_record].value 'record_number()'   --column[nth_record].type UInt32   --column[nth_record].window.sort_keys price   --output_columns '_key, price, nth_record'
 [
   [
     0,
@@ -34,7 +34,7 @@ select Items   --column[nth_row].stage initial   --column[nth_row].value 'row_nu
           "UInt32"
         ],
         [
-          "nth_row",
+          "nth_record",
           "UInt32"
         ]
       ],

  Renamed: test/command/suite/select/column/window_function/record_number/ascending.test (+5 -5) 60%
===================================================================
--- test/command/suite/select/column/window_function/row_number/ascending.test    2016-05-18 00:22:11 +0900 (98075ba)
+++ test/command/suite/select/column/window_function/record_number/ascending.test    2016-05-18 00:30:06 +0900 (1449ffb)
@@ -12,8 +12,8 @@ load --table Items
 ]
 
 select Items \
-  --column[nth_row].stage initial \
-  --column[nth_row].value 'row_number()' \
-  --column[nth_row].type UInt32 \
-  --column[nth_row].window.sort_keys price \
-  --output_columns '_key, price, nth_row'
+  --column[nth_record].stage initial \
+  --column[nth_record].value 'record_number()' \
+  --column[nth_record].type UInt32 \
+  --column[nth_record].window.sort_keys price \
+  --output_columns '_key, price, nth_record'

  Renamed: test/command/suite/select/column/window_function/record_number/descending.expected (+2 -2) 79%
===================================================================
--- test/command/suite/select/column/window_function/row_number/descending.expected    2016-05-18 00:22:11 +0900 (f7209e5)
+++ test/command/suite/select/column/window_function/record_number/descending.expected    2016-05-18 00:30:06 +0900 (86c9912)
@@ -12,7 +12,7 @@ load --table Items
 {"_key": "item6", "price": 222}
 ]
 [[0,0.0,0.0],6]
-select Items   --column[nth_row].stage initial   --column[nth_row].value 'row_number()'   --column[nth_row].type UInt32   --column[nth_row].window.sort_keys -price   --output_columns '_key, price, nth_row'
+select Items   --column[nth_record].stage initial   --column[nth_record].value 'record_number()'   --column[nth_record].type UInt32   --column[nth_record].window.sort_keys -price   --output_columns '_key, price, nth_record'
 [
   [
     0,
@@ -34,7 +34,7 @@ select Items   --column[nth_row].stage initial   --column[nth_row].value 'row_nu
           "UInt32"
         ],
         [
-          "nth_row",
+          "nth_record",
           "UInt32"
         ]
       ],

  Renamed: test/command/suite/select/column/window_function/record_number/descending.test (+5 -5) 59%
===================================================================
--- test/command/suite/select/column/window_function/row_number/descending.test    2016-05-18 00:22:11 +0900 (071702f)
+++ test/command/suite/select/column/window_function/record_number/descending.test    2016-05-18 00:30:06 +0900 (19a0595)
@@ -12,8 +12,8 @@ load --table Items
 ]
 
 select Items \
-  --column[nth_row].stage initial \
-  --column[nth_row].value 'row_number()' \
-  --column[nth_row].type UInt32 \
-  --column[nth_row].window.sort_keys -price \
-  --output_columns '_key, price, nth_row'
+  --column[nth_record].stage initial \
+  --column[nth_record].value 'record_number()' \
+  --column[nth_record].type UInt32 \
+  --column[nth_record].window.sort_keys -price \
+  --output_columns '_key, price, nth_record'
-------------- next part --------------
HTML����������������������������...
Download 



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