MCPcopy Create free account
hub / github.com/apache/impala / GetQueryOptionForKey

Function GetQueryOptionForKey

be/src/service/query-options.cc:211–220  ·  view source on GitHub ↗

Returns the TImpalaQueryOptions enum for the given "key". Input is case insensitive. Return -1 if the input is an invalid option.

Source from the content-addressed store, hash-verified

209// Returns the TImpalaQueryOptions enum for the given "key". Input is case insensitive.
210// Return -1 if the input is an invalid option.
211static int GetQueryOptionForKey(const string& key) {
212 std::map<int, const char*>::const_iterator itr =
213 _TImpalaQueryOptions_VALUES_TO_NAMES.begin();
214 for (; itr != _TImpalaQueryOptions_VALUES_TO_NAMES.end(); ++itr) {
215 if (iequals(key, (*itr).second)) {
216 return itr->first;
217 }
218 }
219 return -1;
220}
221
222// Return true if we can ignore a reference to this removed query option.
223static bool IsRemovedQueryOption(const string& key) {

Callers 1

SetQueryOptionMethod · 0.85

Calls 3

iequalsFunction · 0.85
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected