| 498 | // Force inlining - GCC does not always inline this into hot loops in Parquet scanner. |
| 499 | template <typename T> |
| 500 | ALWAYS_INLINE inline bool DictDecoder<T>::GetNextValue(T* value) { |
| 501 | // IMPALA-959: Use memcpy() instead of '=' to set *value: addresses are not always 16 |
| 502 | // byte aligned for Decimal16Values. |
| 503 | if (num_repeats_ > 0) { |
| 504 | --num_repeats_; |
| 505 | memcpy(value, &decoded_values_[0], sizeof(T)); |
| 506 | return true; |
| 507 | } else if (next_literal_idx_ < num_literal_values_) { |
| 508 | int idx = next_literal_idx_++; |
| 509 | memcpy(value, &decoded_values_[idx], sizeof(T)); |
| 510 | return true; |
| 511 | } |
| 512 | // No decoded values left - need to decode some more. |
| 513 | return DecodeNextValue(value); |
| 514 | } |
| 515 | |
| 516 | template <typename T> |
| 517 | ALWAYS_INLINE inline bool DictDecoder<T>::GetNextValues( |
no outgoing calls