sparkql 1.1.9 → 1.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/CHANGELOG.md +4 -0
- data/VERSION +1 -1
- data/lib/sparkql/function_resolver.rb +2 -2
- data/test/unit/parser_test.rb +10 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
!binary "U0hBMQ==":
|
|
3
3
|
metadata.gz: !binary |-
|
|
4
|
-
|
|
4
|
+
OWZlM2JjZmE5OWM2ZDNkMDcwOGI3NDM3YjNhMWY5YmI0MWZkYTU0NQ==
|
|
5
5
|
data.tar.gz: !binary |-
|
|
6
|
-
|
|
6
|
+
MzE2NzAxNGExYTVlNzZiMjQ5Yzk4YTBhMDdhNGUyNzJhMjc3M2FjMQ==
|
|
7
7
|
SHA512:
|
|
8
8
|
metadata.gz: !binary |-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
YjYyOTJlMzYxOTcwMjBhYzdmOGUyY2Q3NTFiZDViYzM4MTQzMDgwMDQwY2M1
|
|
10
|
+
NDM4NzE5MzA2MmMwMTZmYmI4ODlhODk5NzEwY2E2MWE5NjNmZWVhZjYxNWEx
|
|
11
|
+
YjVhODQxZjZjZGEwODNkNWMxMGEzMWVkZWJhZGU0NjA4YzdiYWI=
|
|
12
12
|
data.tar.gz: !binary |-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
Y2U3MTQyODlhNmQ1Y2FlYWJhMDEwODcyNjY1YjE1YjAzN2M2MDg1ZGU5Mjc0
|
|
14
|
+
YTQzOWQ3OTE3OGJhOTk0MWM1YjE5Y2Q1YTE5MzI4MzEwYTMyMzU5YzhhNmQ2
|
|
15
|
+
YTZjMWU5ZDA2M2Y1ZDhmNGU1NDZiZWY2ZjM1MjUzNzI0ZTFhOWM=
|
data/CHANGELOG.md
CHANGED
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.1.
|
|
1
|
+
1.1.10
|
|
@@ -24,7 +24,7 @@ class Sparkql::FunctionResolver
|
|
|
24
24
|
:return_type => :shape
|
|
25
25
|
},
|
|
26
26
|
:radius => {
|
|
27
|
-
:args => [:character, :decimal],
|
|
27
|
+
:args => [:character, [:decimal, :integer]],
|
|
28
28
|
:return_type => :shape
|
|
29
29
|
},
|
|
30
30
|
:regex => {
|
|
@@ -162,7 +162,7 @@ class Sparkql::FunctionResolver
|
|
|
162
162
|
:status => :fatal )
|
|
163
163
|
return
|
|
164
164
|
end
|
|
165
|
-
|
|
165
|
+
|
|
166
166
|
count = 0
|
|
167
167
|
@args.each do |arg|
|
|
168
168
|
unless Array(total_args[count]).include?(arg[:type])
|
data/test/unit/parser_test.rb
CHANGED
|
@@ -350,6 +350,16 @@ class ParserTest < Test::Unit::TestCase
|
|
|
350
350
|
assert_equal 1.0, expressions.first[:value].radius, "#{expressions.first[:value].inspect} "
|
|
351
351
|
end
|
|
352
352
|
|
|
353
|
+
test "Location Eq radius() accepts integer" do
|
|
354
|
+
filter = "Location Eq radius('35.12 -68.33',1)"
|
|
355
|
+
@parser = Parser.new
|
|
356
|
+
expressions = @parser.parse(filter)
|
|
357
|
+
assert !@parser.errors?, "errors #{@parser.errors.inspect}"
|
|
358
|
+
assert_equal :shape, expressions.first[:type]
|
|
359
|
+
assert_equal [-68.33, 35.12], expressions.first[:value].center.to_coordinates, "#{expressions.first[:value].inspect} "
|
|
360
|
+
assert_equal 1.0, expressions.first[:value].radius, "#{expressions.first[:value].inspect} "
|
|
361
|
+
end
|
|
362
|
+
|
|
353
363
|
test "Location eq radius() error on invalid syntax" do
|
|
354
364
|
filter = "Location Eq radius('35.12,-68.33',1.0)"
|
|
355
365
|
@parser = Parser.new
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sparkql
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.1.
|
|
4
|
+
version: 1.1.10
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Wade McEwen
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-01-
|
|
11
|
+
date: 2018-01-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: georuby
|