lib/mondrian/olap/schema_element.rb in mondrian-olap-1.1.0 vs lib/mondrian/olap/schema_element.rb in mondrian-olap-1.2.0
- old
+ new
@@ -138,19 +138,22 @@
private
def xmlized_attributes(options)
# data dictionary values should be in uppercase if schema defined with :upcase_data_dictionary => true
- # or by default when using Oracle or LucidDB driver (can be overridden by :upcase_data_dictionary => false)
- upcase_attributes = if options[:upcase_data_dictionary].nil? && %w(oracle luciddb snowflake).include?(options[:driver]) ||
+ # or by default when using Oracle or Snowflake driver (can be overridden by :upcase_data_dictionary => false)
+ upcase_attributes = if options[:upcase_data_dictionary].nil? && %w(oracle snowflake).include?(options[:driver]) ||
options[:upcase_data_dictionary]
self.class.data_dictionary_names
else
[]
end
hash = {}
@attributes.each do |attr, value|
- value = value.upcase if upcase_attributes.include?(attr)
+ # Support value calculation in parallel threads.
+ # value could be either Thread or a future object from concurrent-ruby
+ value = value.value if value.respond_to?(:value)
+ value = value.upcase if upcase_attributes.include?(attr) && value.is_a?(String)
hash[
# camelcase attribute name
attr.to_s.gsub(/_([^_]+)/){|m| $1.capitalize}
] = value
end