Navigation Menu

Skip to content

Commit

Permalink
logical_select: close static arguments code
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Feb 19, 2018
1 parent 36174b1 commit 4f1a7ba
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions plugins/sharding/logical_select.rb
Expand Up @@ -88,6 +88,7 @@ def cache_key(input)
key << "#{input[:drilldown_calc_types]}\0"
key << "#{input[:drilldown_calc_target]}\0"
key << "#{input[:drilldown_filter]}\0"
key << "#{input[:post_filter]}\0"
labeled_drilldowns = LabeledDrilldowns.parse(input).sort_by(&:label)
labeled_drilldowns.each do |drilldown|
key << "#{drilldown.label}\0"
Expand All @@ -100,7 +101,6 @@ def cache_key(input)
key << "#{drilldown.filter}\0"
key << drilldown.dynamic_columns.cache_key
end
key << "#{input[:post_filter]}\0"
dynamic_columns = DynamicColumns.parse(input)
key << dynamic_columns.cache_key
key
Expand Down Expand Up @@ -273,14 +273,14 @@ class ExecuteContext
attr_reader :limit
attr_reader :sort_keys
attr_reader :output_columns
attr_reader :post_filter
attr_reader :dynamic_columns
attr_reader :result_sets
attr_reader :unsorted_result_sets
attr_reader :plain_drilldown
attr_reader :labeled_drilldowns
attr_reader :temporary_tables
attr_reader :expressions
attr_reader :post_filter
def initialize(input)
@input = input
@enumerator = LogicalEnumerator.new("logical_select", @input)
Expand All @@ -291,6 +291,7 @@ def initialize(input)
@limit = (@input[:limit] || 10).to_i
@sort_keys = parse_keys(@input[:sort_keys] || @input[:sortby])
@output_columns = @input[:output_columns] || "_id, _key, *"
@post_filter = @input[:post_filter]

@dynamic_columns = DynamicColumns.parse(@input)

Expand All @@ -303,8 +304,6 @@ def initialize(input)
@temporary_tables = []

@expressions = []

@post_filter = @input[:post_filter]
end

def close
Expand Down

0 comments on commit 4f1a7ba

Please sign in to comment.