Mirror of Apache Impala Incubator
C++ Java Python JavaScript C Shell Other
Latest commit 637cc3e Feb 14, 2017 @michaelhkw michaelhkw committed with Impala Public Jenkins IMPALA-4821: Update AVG() for DECIMAL_V2
This change implements the DECIMAL_V2's behavior for AVG().
The differences with DECIMAL_V1 are:

1. The output type has a minimum scale of 6. This is similar
to MS SQL's behavior which takes the max of 6 and the input
type's scale. We deviate from MS SQL in the output's precision
which is always set to 38. We use the smallest precision which
can store the output. A key insight is that the output of AVG()
is no wider than the inputs. Precision only needs to be adjusted
when the scale is augmented. Using a smaller precision avoids
potential loss of precision in subsequent decimal operations
(e.g. division) if AVG() is a subexpression. Please note that
the output type is different from SUM()/COUNT() as the latter
can have a much larger scale.

2. Due to a minimum of 6 decimal places for the output,
AVG() for decimal values whose whole number part exceeds 32
decimal places (e.g. DECIMAL(38,4), DECIMAL(33,0)) will
always overflow as the scale is augmented to 6. Certain
decimal types which work with AVG() in DECIMAL_V1 no longer
work in DECIMAL_V2.

Change-Id: I28f5ef0370938440eb5b1c6d29b2f24e6f88499f
Reviewed-on: http://gerrit.cloudera.org:8080/6038
Reviewed-by: Dan Hecht <dhecht@cloudera.com>
Reviewed-by: Alex Behm <alex.behm@cloudera.com>
Tested-by: Impala Public Jenkins
Permalink
Failed to load latest commit information.
be IMPALA-4821: Update AVG() for DECIMAL_V2 Feb 22, 2017
bin IMPALA-4934: Disable Kudu OpenSSL initialization Feb 22, 2017
cmake_modules IMPALA-4652: Add crcutil to build Jan 12, 2017
common IMPALA-4729: Implement REPLACE() Feb 15, 2017
docs [DOCS] Major update to Impala + Kudu page Feb 17, 2017
ext-data-source Add all build targets to CMake and speed up builds Dec 14, 2016
fe IMPALA-4821: Update AVG() for DECIMAL_V2 Feb 22, 2017
infra IMPALA-4934: Disable Kudu OpenSSL initialization Feb 22, 2017
shell IMPALA-4570: shell tarball breaks with certain setuptools versions Dec 3, 2016
ssh_keys Move ssh keys from bin directory to fix packaging build break Jan 8, 2014
testdata IMPALA-4821: Update AVG() for DECIMAL_V2 Feb 22, 2017
tests IMPALA-4934: Disable Kudu OpenSSL initialization Feb 22, 2017
www IMPALA-4884: Add JVM heap and non-heap usage in metrics and UI Feb 11, 2017
.clang-format Match .clang-format more closely to actual practice. Oct 14, 2016
.clang-tidy IMPALA-3200: move bufferpool under runtime Nov 22, 2016
.gitignore IMPALA-4653: fix sticky config variable problem Jan 5, 2017
CMakeLists.txt build: don't look in system paths for kudu client Feb 22, 2017
DISCLAIMER IMPALA-3808: Add incubating DISCLAIMER from the Incubator Branding Guide Sep 2, 2016
EXPORT_CONTROL.md IMPALA-4406: Add cryptography export control notice Nov 4, 2016
LICENSE.txt IMPALA-4230: ASF policy issues from 2.7.0 rc3. Oct 19, 2016
LOGS.md Consolidate test and cluster logs under a single directory. Mar 28, 2016
NOTICE.txt Update copyright year to 2017 Jan 29, 2017
README.md IMPALA-4512: Add a script that builds Impala on stock Ubuntu 14.04. Nov 29, 2016
buildall.sh IMPALA-4904,IMPALA-4914: add targeted-stress to exhaustive tests Feb 21, 2017

README.md

Welcome to Impala

Lightning-fast, distributed SQL queries for petabytes of data stored in Apache Hadoop clusters.

Impala is a modern, massively-distributed, massively-parallel, C++ query engine that lets you analyze, transform and combine data from a variety of data sources:

  • Best of breed performance and scalability.
  • Support for data stored in HDFS, Apache HBase and Amazon S3.
  • Wide analytic SQL support, including window functions and subqueries.
  • On-the-fly code generation using LLVM to generate CPU-efficient code tailored specifically to each individual query.
  • Support for the most commonly-used Hadoop file formats, including the Apache Parquet (incubating) project.
  • Apache-licensed, 100% open source.

More about Impala

To learn more about Impala as a business user, or to try Impala live or in a VM, please visit the Impala homepage.

If you are interested in contributing to Impala as a developer, or learning more about Impala's internals and architecture, visit the Impala wiki.

Supported Platforms

Impala only supports Linux at the moment.

Build Instructions

See bin/bootstrap_build.sh.

Export Control Notice

This distribution uses cryptographic software and may be subject to export controls. Please refer to EXPORT_CONTROL.md for more information.