Skip to content

Commit

Permalink
Revert stats_histogram.q test
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangbutao committed Oct 18, 2024
1 parent 1275b7e commit ef2bd14
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion ql/src/java/org/apache/hadoop/hive/ql/ddl/ShowUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import org.apache.commons.lang3.StringUtils;
import org.apache.datasketches.kll.KllFloatsSketch;
import org.apache.datasketches.memory.Memory;
import org.apache.datasketches.quantilescommon.QuantileSearchCriteria;
import org.apache.hadoop.fs.FSDataOutputStream;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
Expand Down Expand Up @@ -257,7 +258,7 @@ private static String convertHistogram(byte[] buffer, ColumnStatisticsData._Fiel
final KllFloatsSketch kll = KllFloatsSketch.heapify(Memory.wrap(buffer));
// to keep the visualization compact, we print only the quartiles (Q1, Q2 and Q3),
// as min and max are displayed as separate statistics already
final float[] quantiles = kll.getQuantiles(new double[]{ 0.25, 0.5, 0.75 });
final float[] quantiles = kll.getQuantiles(new double[]{ 0.25, 0.5, 0.75 }, QuantileSearchCriteria.EXCLUSIVE);

Function<Float, Object> converter;

Expand Down
6 changes: 3 additions & 3 deletions ql/src/test/results/clientpositive/llap/stats_histogram.q.out
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ max_col_len
num_trues
num_falses
bit_vector HL
histogram Q1: 2.1, Q2: 4.1, Q3: 6.1
histogram Q1: 3.1, Q2: 5.1, Q3: 9.1
comment from deserializer
COLUMN_STATS_ACCURATE {\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"a\":\"true\",\"b\":\"true\",\"c\":\"true\",\"d\":\"true\",\"e\":\"true\",\"f\":\"true\",\"g\":\"true\"}}
PREHOOK: query: DESCRIBE FORMATTED test_stats d
Expand All @@ -350,7 +350,7 @@ max_col_len
num_trues
num_falses
bit_vector HL
histogram Q1: 14.2, Q2: 17.2, Q3: 55.2
histogram Q1: 15.2, Q2: 20.2, Q3: 57.2
comment from deserializer
COLUMN_STATS_ACCURATE {\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"a\":\"true\",\"b\":\"true\",\"c\":\"true\",\"d\":\"true\",\"e\":\"true\",\"f\":\"true\",\"g\":\"true\"}}
PREHOOK: query: DESCRIBE FORMATTED test_stats e
Expand All @@ -370,7 +370,7 @@ max_col_len
num_trues
num_falses
bit_vector HL
histogram Q1: -1.2, Q2: 1.2, Q3: 10.2
histogram Q1: -1.2, Q2: 1.3, Q3: 10.2
comment from deserializer
COLUMN_STATS_ACCURATE {\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"a\":\"true\",\"b\":\"true\",\"c\":\"true\",\"d\":\"true\",\"e\":\"true\",\"f\":\"true\",\"g\":\"true\"}}
PREHOOK: query: DESCRIBE FORMATTED test_stats f
Expand Down

0 comments on commit ef2bd14

Please sign in to comment.