Returns the TImpalaQueryOptions enum for the given "key". Input is case insensitive. Return -1 if the input is an invalid option.
| 209 | // Returns the TImpalaQueryOptions enum for the given "key". Input is case insensitive. |
| 210 | // Return -1 if the input is an invalid option. |
| 211 | static 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. |
| 223 | static bool IsRemovedQueryOption(const string& key) { |
no test coverage detected