mirror of
https://github.com/apache/impala.git
synced 2026-01-29 03:00:27 -05:00
It turns out that Impala has a somewhat Baroque way to represent the value of a numeric 0. NumericLiteral.toSql() uses the Java BigDecimal class to convert a numeric value to a string for use in explained plans and in verifying expression rewrites. The default Java behavior is to consider scale when rendering numbers, including 0. Thus, depending on precision and scale, you may get: 0 0.0 0.00 0.000 ... 0E-38 However, mathematically, zero is zero. Plans attach no special meaning to the extra decimal points or trailing zeros. To make testing easier, changed the behavior to always emit "0" when the value is zero, regardless of precision or scale. Testing: Reran the planner tests and modified captured plans that had the 0.0, 0.00 variations of zero. Since this change affects only EXPLAIN output, it cannot affect the operation of queries. If may impact other tests that compare EXPLAIN output to a "golden" copy. Change-Id: I0b2f2f34fe5e6003de407301310ccf433841b9f1 Reviewed-on: http://gerrit.cloudera.org:8080/11878 Reviewed-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com> Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
This directory contains Impala test workloads. The directory layout for the workloads should follow: workloads/ <data set name>/<data set name>_dimensions.csv <- The test dimension file <data set name>/<data set name>_core.csv <- A test vector file <data set name>/<data set name>_pairwise.csv <data set name>/<data set name>_exhaustive.csv <data set name>/queries/<query test>.test <- The queries for this workload