-
Notifications
You must be signed in to change notification settings - Fork 245
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE] include redshift adapter to support geolocation #141
base: master
Are you sure you want to change the base?
Conversation
POW(#{lng_degree_units}*(#{origin.lng}-#{qualified_lng_column_name}),2)) | ||
| | ||
end | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Layout/TrailingWhitespace: Trailing whitespace detected.
def flat_distance_sql(origin, lat_degree_units, lng_degree_units) | ||
%| | ||
SQRT(POW(#{lat_degree_units}*(#{origin.lat}-#{qualified_lat_column_name}),2)+ | ||
POW(#{lng_degree_units}*(#{origin.lng}-#{qualified_lng_column_name}),2)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Metrics/LineLength: Line is too long. [82/80]
|
||
def flat_distance_sql(origin, lat_degree_units, lng_degree_units) | ||
%| | ||
SQRT(POW(#{lat_degree_units}*(#{origin.lat}-#{qualified_lat_column_name}),2)+ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Metrics/LineLength: Line is too long. [87/80]
SIN(#{lat})*SIN(RADIANS(#{qualified_lat_column_name}))))*#{multiplier}) | ||
| | ||
end | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Layout/TrailingWhitespace: Trailing whitespace detected.
%| | ||
(ACOS(least(1,COS(#{lat})*COS(#{lng})*COS(RADIANS(#{qualified_lat_column_name}))*COS(RADIANS(#{qualified_lng_column_name}))+ | ||
COS(#{lat})*SIN(#{lng})*COS(RADIANS(#{qualified_lat_column_name}))*SIN(RADIANS(#{qualified_lng_column_name}))+ | ||
SIN(#{lat})*SIN(RADIANS(#{qualified_lat_column_name}))))*#{multiplier}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Metrics/LineLength: Line is too long. [81/80]
@@ -0,0 +1,22 @@ | |||
module Geokit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true.
OPTION_SYMBOLS = [ :distance_column_name, :default_units, | ||
:default_formula, :lat_column_name, | ||
:lng_column_name, :qualified_lat_column_name, | ||
:qualified_lng_column_name, :skip_loading ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Layout/SpaceInsideArrayLiteralBrackets: Do not use space inside array brackets.
OPTION_SYMBOLS = [ :distance_column_name, :default_units, :default_formula, :lat_column_name, :lng_column_name, :qualified_lat_column_name, :qualified_lng_column_name, :skip_loading ] | ||
OPTION_SYMBOLS = [ :distance_column_name, :default_units, | ||
:default_formula, :lat_column_name, | ||
:lng_column_name, :qualified_lat_column_name, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Layout/TrailingWhitespace: Trailing whitespace detected.
@@ -11,7 +11,10 @@ module Glue # :nodoc: | |||
extend ActiveSupport::Concern | |||
|
|||
module ClassMethods # :nodoc: | |||
OPTION_SYMBOLS = [ :distance_column_name, :default_units, :default_formula, :lat_column_name, :lng_column_name, :qualified_lat_column_name, :qualified_lng_column_name, :skip_loading ] | |||
OPTION_SYMBOLS = [ :distance_column_name, :default_units, | |||
:default_formula, :lat_column_name, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Layout/TrailingWhitespace: Trailing whitespace detected.
@@ -11,7 +11,10 @@ module Glue # :nodoc: | |||
extend ActiveSupport::Concern | |||
|
|||
module ClassMethods # :nodoc: | |||
OPTION_SYMBOLS = [ :distance_column_name, :default_units, :default_formula, :lat_column_name, :lng_column_name, :qualified_lat_column_name, :qualified_lng_column_name, :skip_loading ] | |||
OPTION_SYMBOLS = [ :distance_column_name, :default_units, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/MutableConstant: Freeze mutable objects assigned to constants.
Style/SymbolArray: Use %i or %I for an array of symbols.
Layout/SpaceInsideArrayLiteralBrackets: Do not use space inside array brackets.
Layout/TrailingWhitespace: Trailing whitespace detected.
Tests should be included with PR to consider merging. Please supply appropriate tests or this PR will be closed. I don't think there's quite enough demand for much time to be put on this PR unless such demand can be demonstrated, and so without tests this PR is likely to be denied as the requested features can be patched in easily with an initializer appropriate for your use case. |
I have some data stored on a Redshift cluster, I wasn't able to use the tool using that tool so I've integrated the adapter and the gem to support the connection