[ARVADOS] updated: 1.3.0-2122-g7a7447ac7
Git user
git at public.arvados.org
Tue Feb 18 19:12:00 UTC 2020
Summary of changes:
services/api/lib/record_filters.rb | 2 +-
services/api/test/fixtures/collections.yml | 2 +-
services/api/test/functional/arvados/v1/filters_test.rb | 2 ++
3 files changed, 4 insertions(+), 2 deletions(-)
via 7a7447ac706c78f3166f049b72a57296ad21054d (commit)
via eb228373fb2d801b167905367db128c76e885ef8 (commit)
from 8141f4c40e11415b0b37ef30f351364f50c7760e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 7a7447ac706c78f3166f049b72a57296ad21054d
Author: Lucas Di Pentima <lucas at di-pentima.com.ar>
Date: Tue Feb 18 16:10:49 2020 -0300
15781: Updates 'contains' filter operator to do case insensitive matching.
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas at di-pentima.com.ar>
diff --git a/services/api/lib/record_filters.rb b/services/api/lib/record_filters.rb
index 5688ca614..b3bf055d6 100644
--- a/services/api/lib/record_filters.rb
+++ b/services/api/lib/record_filters.rb
@@ -141,7 +141,7 @@ module RecordFilters
end
param_out << proppath
when 'contains'
- cond_out << "#{attr_table_name}.#{attr} @> ?::jsonb OR #{attr_table_name}.#{attr} @> ?::jsonb"
+ cond_out << "lower(#{attr_table_name}.#{attr}::text)::jsonb @> lower(?)::jsonb OR lower(#{attr_table_name}.#{attr}::text)::jsonb @> lower(?)::jsonb"
param_out << SafeJSON.dump({proppath => operand})
param_out << SafeJSON.dump({proppath => [operand]})
else
commit eb228373fb2d801b167905367db128c76e885ef8
Author: Lucas Di Pentima <lucas at di-pentima.com.ar>
Date: Tue Feb 18 16:09:39 2020 -0300
15781: Adds tests for case insensitive matching on 'contains' filter operator.
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas at di-pentima.com.ar>
diff --git a/services/api/test/fixtures/collections.yml b/services/api/test/fixtures/collections.yml
index 84c355993..1581039bb 100644
--- a/services/api/test/fixtures/collections.yml
+++ b/services/api/test/fixtures/collections.yml
@@ -1000,7 +1000,7 @@ collection_with_list_prop_even:
manifest_text: ". 37b51d194a7513e45b56f6524f2d51f2+3 0:3:bar\n"
name: collection with list property with even values
properties:
- listprop: [elem2, 4, elem6]
+ listprop: [elem2, 4, elem6, ELEM8]
collection_with_listprop_elem1:
uuid: zzzzz-4zz18-listpropelem1
diff --git a/services/api/test/functional/arvados/v1/filters_test.rb b/services/api/test/functional/arvados/v1/filters_test.rb
index 738c18080..adf5f1908 100644
--- a/services/api/test/functional/arvados/v1/filters_test.rb
+++ b/services/api/test/functional/arvados/v1/filters_test.rb
@@ -176,6 +176,8 @@ class Arvados::V1::FiltersTest < ActionController::TestCase
['listprop', '=', 'elem1', [:collection_with_listprop_elem1], [:collection_with_list_prop_odd]],
['listprop', 'contains', 5, [:collection_with_list_prop_odd], [:collection_with_list_prop_even, :collection_with_listprop_elem1]],
['listprop', 'contains', 'elem2', [:collection_with_list_prop_even], [:collection_with_list_prop_odd, :collection_with_listprop_elem1]],
+ ['listprop', 'contains', 'ELEM2', [:collection_with_list_prop_even], [:collection_with_list_prop_odd, :collection_with_listprop_elem1]],
+ ['listprop', 'contains', 'elem8', [:collection_with_list_prop_even], [:collection_with_list_prop_odd, :collection_with_listprop_elem1]],
['listprop', 'contains', 4, [:collection_with_list_prop_even], [:collection_with_list_prop_odd, :collection_with_listprop_elem1]],
].each do |prop, op, opr, inc, ex|
test "jsonb filter properties.#{prop} #{op} #{opr})" do
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list