From 212cd5c69ade728a3235331ff724c870b7a76169 Mon Sep 17 00:00:00 2001 From: Piotr Findeisen Date: Mon, 26 Mar 2018 15:27:39 +0200 Subject: [PATCH 01/13] Fix assertion messages in Tpch, Tpcds stat tests Before the change, the tests would report something like java.lang.AssertionError: distinctValuesCount-s differ expected [false] but found [true] Expected :false Actual :true which is not clear -- `distinctValuesCount` is not a boolean. --- .../presto/tpcds/EstimateAssertion.java | 21 +++++++++------- .../tpcds/TestTpcdsMetadataStatistics.java | 24 ++++--------------- .../presto/tpch/EstimateAssertion.java | 22 +++++++++-------- .../presto/tpch/TestTpchMetadata.java | 10 ++++---- 4 files changed, 33 insertions(+), 44 deletions(-) diff --git a/presto-tpcds/src/test/java/com/facebook/presto/tpcds/EstimateAssertion.java b/presto-tpcds/src/test/java/com/facebook/presto/tpcds/EstimateAssertion.java index d6f03304ce492..7374ad1634692 100644 --- a/presto-tpcds/src/test/java/com/facebook/presto/tpcds/EstimateAssertion.java +++ b/presto-tpcds/src/test/java/com/facebook/presto/tpcds/EstimateAssertion.java @@ -32,9 +32,9 @@ public EstimateAssertion(double tolerance) this.tolerance = tolerance; } - public void assertClose(Estimate actual, Estimate expected, String message) + public void assertClose(Estimate actual, Estimate expected, String comparedValue) { - assertClose(toOptional(actual), toOptional(expected), message); + assertClose(toOptional(actual), toOptional(expected), comparedValue); } private Optional toOptional(Estimate estimate) @@ -42,26 +42,29 @@ private Optional toOptional(Estimate estimate) return estimate.isValueUnknown() ? empty() : Optional.of(estimate.getValue()); } - public void assertClose(Optional actual, Optional expected, String message) + public void assertClose(Optional actual, Optional expected, String comparedValue) { - assertEquals(actual.isPresent(), expected.isPresent(), message); + if (actual.isPresent() != expected.isPresent()) { + // Trigger exception message that includes compared values + assertEquals(actual, expected, comparedValue); + } if (actual.isPresent()) { Object actualValue = actual.get(); Object expectedValue = expected.get(); - assertClose(actualValue, expectedValue, message); + assertClose(actualValue, expectedValue, comparedValue); } } - private void assertClose(Object actual, Object expected, String message) + private void assertClose(Object actual, Object expected, String comparedValue) { if (actual instanceof Slice) { - assertEquals(actual.getClass(), expected.getClass(), message); + assertEquals(actual.getClass(), expected.getClass(), comparedValue); assertEquals(((Slice) actual).toStringUtf8(), ((Slice) expected).toStringUtf8()); } else { double actualDouble = toDouble(actual); double expectedDouble = toDouble(expected); - assertEquals(actualDouble, expectedDouble, expectedDouble * tolerance, message); + assertEquals(actualDouble, expectedDouble, expectedDouble * tolerance, comparedValue); } } @@ -72,7 +75,7 @@ private double toDouble(Object object) } else { String message = "Can't compare with tolerance objects of class %s. Use assertEquals."; - throw new UnsupportedOperationException(format(message, object.getClass())); + throw new UnsupportedOperationException(format("Can't compare with tolerance objects of class %s. Use assertEquals.", object.getClass())); } } } diff --git a/presto-tpcds/src/test/java/com/facebook/presto/tpcds/TestTpcdsMetadataStatistics.java b/presto-tpcds/src/test/java/com/facebook/presto/tpcds/TestTpcdsMetadataStatistics.java index 315202f324eac..44bcbe49cd903 100644 --- a/presto-tpcds/src/test/java/com/facebook/presto/tpcds/TestTpcdsMetadataStatistics.java +++ b/presto-tpcds/src/test/java/com/facebook/presto/tpcds/TestTpcdsMetadataStatistics.java @@ -206,28 +206,12 @@ public void testNullFraction() private void assertColumnStatistics(ColumnStatistics actual, ColumnStatistics expected) { - estimateAssertion.assertClose(actual.getNullsFraction(), expected.getNullsFraction(), "Null fraction does not match"); - + estimateAssertion.assertClose(actual.getNullsFraction(), expected.getNullsFraction(), "Nulls fraction"); RangeColumnStatistics actualRange = actual.getOnlyRangeColumnStatistics(); RangeColumnStatistics expectedRange = expected.getOnlyRangeColumnStatistics(); - if (expectedRange.getFraction().isValueUnknown()) { - assertTrue(actualRange.getFraction().isValueUnknown()); - } - else { - estimateAssertion.assertClose(actualRange.getFraction(), expectedRange.getFraction(), "Fraction does not match"); - } - if (expectedRange.getDataSize().isValueUnknown()) { - assertTrue(actualRange.getDataSize().isValueUnknown()); - } - else { - estimateAssertion.assertClose(actualRange.getDataSize(), expectedRange.getDataSize(), "Data size does not match"); - } - if (expectedRange.getDistinctValuesCount().isValueUnknown()) { - assertTrue(actualRange.getDistinctValuesCount().isValueUnknown()); - } - else { - estimateAssertion.assertClose(actualRange.getDistinctValuesCount(), expectedRange.getDistinctValuesCount(), "Distinct values count does not match"); - } + estimateAssertion.assertClose(actualRange.getFraction(), expectedRange.getFraction(), "Fraction"); + estimateAssertion.assertClose(actualRange.getDataSize(), expectedRange.getDataSize(), "Data size"); + estimateAssertion.assertClose(actualRange.getDistinctValuesCount(), expectedRange.getDistinctValuesCount(), "Distinct values count"); assertEquals(actualRange.getLowValue(), expectedRange.getLowValue()); assertEquals(actualRange.getHighValue(), expectedRange.getHighValue()); } diff --git a/presto-tpch/src/test/java/com/facebook/presto/tpch/EstimateAssertion.java b/presto-tpch/src/test/java/com/facebook/presto/tpch/EstimateAssertion.java index fe68a372f4ea2..35905ee29f6ae 100644 --- a/presto-tpch/src/test/java/com/facebook/presto/tpch/EstimateAssertion.java +++ b/presto-tpch/src/test/java/com/facebook/presto/tpch/EstimateAssertion.java @@ -31,9 +31,9 @@ public EstimateAssertion(double tolerance) this.tolerance = tolerance; } - public void assertClose(Estimate actual, Estimate expected, String message) + public void assertClose(Estimate actual, Estimate expected, String comparedValue) { - assertClose(toOptional(actual), toOptional(expected), message); + assertClose(toOptional(actual), toOptional(expected), comparedValue); } private Optional toOptional(Estimate estimate) @@ -41,26 +41,29 @@ private Optional toOptional(Estimate estimate) return estimate.isValueUnknown() ? empty() : Optional.of(estimate.getValue()); } - public void assertClose(Optional actual, Optional expected, String message) + public void assertClose(Optional actual, Optional expected, String comparedValue) { - assertEquals(actual.isPresent(), expected.isPresent(), message); + if (actual.isPresent() != expected.isPresent()) { + // Trigger exception message that includes compared values + assertEquals(actual, expected, comparedValue); + } if (actual.isPresent()) { Object actualValue = actual.get(); Object expectedValue = expected.get(); - assertClose(actualValue, expectedValue, message); + assertClose(actualValue, expectedValue, comparedValue); } } - private void assertClose(Object actual, Object expected, String message) + private void assertClose(Object actual, Object expected, String comparedValue) { if (actual instanceof Slice) { - assertEquals(actual.getClass(), expected.getClass(), message); + assertEquals(actual.getClass(), expected.getClass(), comparedValue); assertEquals(((Slice) actual).toStringUtf8(), ((Slice) expected).toStringUtf8()); } else { double actualDouble = toDouble(actual); double expectedDouble = toDouble(expected); - assertEquals(actualDouble, expectedDouble, expectedDouble * tolerance, message); + assertEquals(actualDouble, expectedDouble, expectedDouble * tolerance, comparedValue); } } @@ -70,8 +73,7 @@ private double toDouble(Object object) return ((Number) object).doubleValue(); } else { - String message = "Can't compare with tolerance objects of class %s. Use assertEquals."; - throw new UnsupportedOperationException(format(message, object.getClass())); + throw new UnsupportedOperationException(format("Can't compare with tolerance objects of class %s. Use assertEquals.", object.getClass())); } } } diff --git a/presto-tpch/src/test/java/com/facebook/presto/tpch/TestTpchMetadata.java b/presto-tpch/src/test/java/com/facebook/presto/tpch/TestTpchMetadata.java index 615d58bdc6665..b0fc55b4a8aa1 100644 --- a/presto-tpch/src/test/java/com/facebook/presto/tpch/TestTpchMetadata.java +++ b/presto-tpch/src/test/java/com/facebook/presto/tpch/TestTpchMetadata.java @@ -249,23 +249,23 @@ private void testColumnStats(String schema, TpchTable table, TpchColumn co estimateAssertion.assertClose( actual.getOnlyRangeColumnStatistics().getDistinctValuesCount(), expected.getOnlyRangeColumnStatistics().getDistinctValuesCount(), - "distinctValuesCount-s differ"); + "distinctValuesCount"); estimateAssertion.assertClose( actual.getOnlyRangeColumnStatistics().getDataSize(), expected.getOnlyRangeColumnStatistics().getDataSize(), - "dataSize-s differ"); + "dataSize"); estimateAssertion.assertClose( actual.getNullsFraction(), expected.getNullsFraction(), - "nullsFraction-s differ"); + "nullsFraction"); estimateAssertion.assertClose( actual.getOnlyRangeColumnStatistics().getLowValue(), expected.getOnlyRangeColumnStatistics().getLowValue(), - "lowValue-s differ"); + "lowValue"); estimateAssertion.assertClose( actual.getOnlyRangeColumnStatistics().getHighValue(), expected.getOnlyRangeColumnStatistics().getHighValue(), - "highValue-s differ"); + "highValue"); } @Test From daff49aeccb7cd351f5f7057f54cbabe65946f99 Mon Sep 17 00:00:00 2001 From: Piotr Findeisen Date: Mon, 26 Mar 2018 15:27:41 +0200 Subject: [PATCH 02/13] Extract variable --- .../presto/tpch/TestTpchMetadata.java | 30 ++++++------------- 1 file changed, 9 insertions(+), 21 deletions(-) diff --git a/presto-tpch/src/test/java/com/facebook/presto/tpch/TestTpchMetadata.java b/presto-tpch/src/test/java/com/facebook/presto/tpch/TestTpchMetadata.java index b0fc55b4a8aa1..1fef4d8b2b232 100644 --- a/presto-tpch/src/test/java/com/facebook/presto/tpch/TestTpchMetadata.java +++ b/presto-tpch/src/test/java/com/facebook/presto/tpch/TestTpchMetadata.java @@ -23,6 +23,7 @@ import com.facebook.presto.spi.predicate.TupleDomain; import com.facebook.presto.spi.statistics.ColumnStatistics; import com.facebook.presto.spi.statistics.Estimate; +import com.facebook.presto.spi.statistics.RangeColumnStatistics; import com.facebook.presto.spi.statistics.TableStatistics; import com.facebook.presto.tpch.util.PredicateUtils; import com.google.common.base.Preconditions; @@ -245,27 +246,14 @@ private void testColumnStats(String schema, TpchTable table, TpchColumn co ColumnStatistics actual = tableStatistics.getColumnStatistics().get(columnHandle); EstimateAssertion estimateAssertion = new EstimateAssertion(TOLERANCE); - - estimateAssertion.assertClose( - actual.getOnlyRangeColumnStatistics().getDistinctValuesCount(), - expected.getOnlyRangeColumnStatistics().getDistinctValuesCount(), - "distinctValuesCount"); - estimateAssertion.assertClose( - actual.getOnlyRangeColumnStatistics().getDataSize(), - expected.getOnlyRangeColumnStatistics().getDataSize(), - "dataSize"); - estimateAssertion.assertClose( - actual.getNullsFraction(), - expected.getNullsFraction(), - "nullsFraction"); - estimateAssertion.assertClose( - actual.getOnlyRangeColumnStatistics().getLowValue(), - expected.getOnlyRangeColumnStatistics().getLowValue(), - "lowValue"); - estimateAssertion.assertClose( - actual.getOnlyRangeColumnStatistics().getHighValue(), - expected.getOnlyRangeColumnStatistics().getHighValue(), - "highValue"); + RangeColumnStatistics actualRange = actual.getOnlyRangeColumnStatistics(); + RangeColumnStatistics expectedRange = expected.getOnlyRangeColumnStatistics(); + + estimateAssertion.assertClose(actualRange.getDistinctValuesCount(), expectedRange.getDistinctValuesCount(), "distinctValuesCount"); + estimateAssertion.assertClose(actualRange.getDataSize(), expectedRange.getDataSize(), "dataSize"); + estimateAssertion.assertClose(actual.getNullsFraction(), expected.getNullsFraction(), "nullsFraction"); + estimateAssertion.assertClose(actualRange.getLowValue(), expectedRange.getLowValue(), "lowValue"); + estimateAssertion.assertClose(actualRange.getHighValue(), expectedRange.getHighValue(), "highValue"); } @Test From e907dbe391122f632a974c54bb0ff79d04c1bd2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Osipiuk?= Date: Mon, 26 Mar 2018 15:27:42 +0200 Subject: [PATCH 03/13] Fix NATION_PARTITIONED_BY_REGIONKEY data files --- .../presto/tests/hive/TestHiveTableStatistics.java | 10 +++++----- .../data/partitioned_nation/nation_region_1.textfile | 10 +++++----- .../data/partitioned_nation/nation_region_2.textfile | 10 +++++----- .../data/partitioned_nation/nation_region_3.textfile | 10 +++++----- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/presto-product-tests/src/main/java/com/facebook/presto/tests/hive/TestHiveTableStatistics.java b/presto-product-tests/src/main/java/com/facebook/presto/tests/hive/TestHiveTableStatistics.java index 1c1cb5f340787..107e3bae42013 100644 --- a/presto-product-tests/src/main/java/com/facebook/presto/tests/hive/TestHiveTableStatistics.java +++ b/presto-product-tests/src/main/java/com/facebook/presto/tests/hive/TestHiveTableStatistics.java @@ -282,14 +282,14 @@ public void testStatisticsForPartitionedTable() row("p_nationkey", null, 5.0, 0.0, null, "1", "24"), row("p_name", null, 6.0, 0.0, null, null, null), row("p_regionkey", null, 3.0, 0.0, null, "1", "3"), - row("p_comment", null, 1.0, 0.0, null, null, null), + row("p_comment", null, 7.0, 0.0, null, null, null), row(null, null, null, null, 15.0, null, null)); assertThat(query(showStatsPartitionOne)).containsOnly( row("p_nationkey", null, 5.0, 0.0, null, "1", "24"), row("p_name", null, 6.0, 0.0, null, null, null), row("p_regionkey", null, 1.0, 0.0, null, "1", "1"), - row("p_comment", null, 1.0, 0.0, null, null, null), + row("p_comment", null, 7.0, 0.0, null, null, null), row(null, null, null, null, 5.0, null, null)); assertThat(query(showStatsPartitionTwo)).containsOnly( @@ -307,21 +307,21 @@ public void testStatisticsForPartitionedTable() row("p_nationkey", null, 5.0, 0.0, null, "1", "24"), row("p_name", null, 6.0, 0.0, null, null, null), row("p_regionkey", null, 3.0, 0.0, null, "1", "3"), - row("p_comment", null, 1.0, 0.0, null, null, null), + row("p_comment", null, 7.0, 0.0, null, null, null), row(null, null, null, null, 15.0, null, null)); assertThat(query(showStatsPartitionOne)).containsOnly( row("p_nationkey", null, 5.0, 0.0, null, "1", "24"), row("p_name", null, 6.0, 0.0, null, null, null), row("p_regionkey", null, 1.0, 0.0, null, "1", "1"), - row("p_comment", null, 1.0, 0.0, null, null, null), + row("p_comment", null, 7.0, 0.0, null, null, null), row(null, null, null, null, 5.0, null, null)); assertThat(query(showStatsPartitionTwo)).containsOnly( row("p_nationkey", null, 4.0, 0.0, null, "8", "21"), row("p_name", null, 6.0, 0.0, null, null, null), row("p_regionkey", null, 1.0, 0.0, null, "2", "2"), - row("p_comment", null, 1.0, 0.0, null, null, null), + row("p_comment", null, 5.0, 0.0, null, null, null), row(null, null, null, null, 5.0, null, null)); } diff --git a/presto-product-tests/src/main/resources/com/facebook/presto/tests/hive/data/partitioned_nation/nation_region_1.textfile b/presto-product-tests/src/main/resources/com/facebook/presto/tests/hive/data/partitioned_nation/nation_region_1.textfile index 6e5535f587bf4..7fd3d7b5ae4b5 100644 --- a/presto-product-tests/src/main/resources/com/facebook/presto/tests/hive/data/partitioned_nation/nation_region_1.textfile +++ b/presto-product-tests/src/main/resources/com/facebook/presto/tests/hive/data/partitioned_nation/nation_region_1.textfile @@ -1,5 +1,5 @@ -1|ARGENTINA|1|al foxes promise slyly according to the regular accounts. bold requests alon -2|BRAZIL|1|y alongside of the pending deposits. carefully special packages are about the ironic forges. slyly special -3|CANADA|1|eas hang ironic, silent packages. slyly regular packages are furiously over the tithes. fluffily bold -17|PERU|1|platelets. blithely pending dependencies use fluffily across the even pinto beans. carefully silent accoun -24|UNITED STATES|1|y final packages. slow foxes cajole quickly. quickly silent platelets breach ironic accounts. unusual pinto be +1|ARGENTINA|al foxes promise slyly according to the regular accounts. bold requests alon +2|BRAZIL|y alongside of the pending deposits. carefully special packages are about the ironic forges. slyly special +3|CANADA|eas hang ironic, silent packages. slyly regular packages are furiously over the tithes. fluffily bold +17|PERU|platelets. blithely pending dependencies use fluffily across the even pinto beans. carefully silent accoun +24|UNITED STATES|y final packages. slow foxes cajole quickly. quickly silent platelets breach ironic accounts. unusual pinto be diff --git a/presto-product-tests/src/main/resources/com/facebook/presto/tests/hive/data/partitioned_nation/nation_region_2.textfile b/presto-product-tests/src/main/resources/com/facebook/presto/tests/hive/data/partitioned_nation/nation_region_2.textfile index ea97d414345e3..fdaf6c062c7cd 100644 --- a/presto-product-tests/src/main/resources/com/facebook/presto/tests/hive/data/partitioned_nation/nation_region_2.textfile +++ b/presto-product-tests/src/main/resources/com/facebook/presto/tests/hive/data/partitioned_nation/nation_region_2.textfile @@ -1,5 +1,5 @@ -8|INDIA|2|ss excuses cajole slyly across the packages. deposits print aroun -9|INDONESIA|2| slyly express asymptotes. regular deposits haggle slyly. carefully ironic hockey players sleep blithely. carefull -12|JAPAN|2|ously. final, express gifts cajole a -18|CHINA|2|c dependencies. furiously express notornis sleep slyly regular accounts. ideas sleep. depos -21|VIETNAM|2|hely enticingly express accounts. even, final +8|INDIA|ss excuses cajole slyly across the packages. deposits print aroun +9|INDONESIA| slyly express asymptotes. regular deposits haggle slyly. carefully ironic hockey players sleep blithely. carefull +12|JAPAN|ously. final, express gifts cajole a +18|CHINA|c dependencies. furiously express notornis sleep slyly regular accounts. ideas sleep. depos +21|VIETNAM|hely enticingly express accounts. even, final diff --git a/presto-product-tests/src/main/resources/com/facebook/presto/tests/hive/data/partitioned_nation/nation_region_3.textfile b/presto-product-tests/src/main/resources/com/facebook/presto/tests/hive/data/partitioned_nation/nation_region_3.textfile index 9b1d6870fa796..7c8e05e996ccd 100644 --- a/presto-product-tests/src/main/resources/com/facebook/presto/tests/hive/data/partitioned_nation/nation_region_3.textfile +++ b/presto-product-tests/src/main/resources/com/facebook/presto/tests/hive/data/partitioned_nation/nation_region_3.textfile @@ -1,5 +1,5 @@ -6|FRANCE|3|refully final requests. regular, ironi -7|GERMANY|3|l platelets. regular accounts x-ray: unusual, regular acco -19|ROMANIA|3|ular asymptotes are about the furious multipliers. express dependencies nag above the ironically ironic account -22|RUSSIA|3| requests against the platelets use never according to the quickly regular pint -23|UNITED KINGDOM|3|eans boost carefully special requests. accounts are. carefull +6|FRANCE|refully final requests. regular, ironi +7|GERMANY|l platelets. regular accounts x-ray: unusual, regular acco +19|ROMANIA|ular asymptotes are about the furious multipliers. express dependencies nag above the ironically ironic account +22|RUSSIA| requests against the platelets use never according to the quickly regular pint +23|UNITED KINGDOM|eans boost carefully special requests. accounts are. carefull From 899d6a608b567a390c4f3772e4de5bb2d9d4b3c6 Mon Sep 17 00:00:00 2001 From: Piotr Findeisen Date: Mon, 26 Mar 2018 15:27:43 +0200 Subject: [PATCH 04/13] Remove unnecessary condition --- .../MetastoreHiveStatisticsProvider.java | 31 ++++++++++--------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/presto-hive/src/main/java/com/facebook/presto/hive/statistics/MetastoreHiveStatisticsProvider.java b/presto-hive/src/main/java/com/facebook/presto/hive/statistics/MetastoreHiveStatisticsProvider.java index 53d53d3829de8..030844c428d7f 100644 --- a/presto-hive/src/main/java/com/facebook/presto/hive/statistics/MetastoreHiveStatisticsProvider.java +++ b/presto-hive/src/main/java/com/facebook/presto/hive/statistics/MetastoreHiveStatisticsProvider.java @@ -63,6 +63,7 @@ import static com.facebook.presto.spi.type.TimestampType.TIMESTAMP; import static com.facebook.presto.spi.type.TinyintType.TINYINT; import static com.google.common.base.Preconditions.checkArgument; +import static com.google.common.base.Verify.verify; import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableSet.toImmutableSet; import static com.google.common.collect.Maps.immutableEntry; @@ -354,25 +355,25 @@ static List getPartitionsSample(List partitions, i int samplesLeft = sampleSize; - if (samplesLeft > 0) { - HivePartition min = partitions.get(0); - HivePartition max = partitions.get(0); - for (HivePartition partition : partitions) { - if (partition.getPartitionId().compareTo(min.getPartitionId()) < 0) { - min = partition; - } - else if (partition.getPartitionId().compareTo(max.getPartitionId()) > 0) { - max = partition; - } + HivePartition min = partitions.get(0); + HivePartition max = partitions.get(0); + for (HivePartition partition : partitions) { + if (partition.getPartitionId().compareTo(min.getPartitionId()) < 0) { + min = partition; } - result.add(min); - samplesLeft--; - if (samplesLeft > 0) { - result.add(max); - samplesLeft--; + else if (partition.getPartitionId().compareTo(max.getPartitionId()) > 0) { + max = partition; } } + verify(samplesLeft > 0); + result.add(min); + samplesLeft--; + if (samplesLeft > 0) { + result.add(max); + samplesLeft--; + } + if (samplesLeft > 0) { HashFunction hashFunction = goodFastHash(32); Comparator> hashComparator = Comparator From 5817e55193497256e920ec2ef48808a7ed5d2e08 Mon Sep 17 00:00:00 2001 From: Piotr Findeisen Date: Mon, 26 Mar 2018 15:27:44 +0200 Subject: [PATCH 05/13] Check value is known as early as possible --- .../MetastoreHiveStatisticsProvider.java | 13 ++++--- .../tests/hive/TestHiveTableStatistics.java | 38 +++++++++---------- 2 files changed, 27 insertions(+), 24 deletions(-) diff --git a/presto-hive/src/main/java/com/facebook/presto/hive/statistics/MetastoreHiveStatisticsProvider.java b/presto-hive/src/main/java/com/facebook/presto/hive/statistics/MetastoreHiveStatisticsProvider.java index 030844c428d7f..fa7e584e305c7 100644 --- a/presto-hive/src/main/java/com/facebook/presto/hive/statistics/MetastoreHiveStatisticsProvider.java +++ b/presto-hive/src/main/java/com/facebook/presto/hive/statistics/MetastoreHiveStatisticsProvider.java @@ -225,6 +225,13 @@ private Estimate calculateDistinctValuesCount(Map s private Estimate calculateNullsFraction(Map statisticsSample, int totalPartitionsCount, String column, Estimate totalRowsCount) { + if (totalRowsCount.isValueUnknown()) { + return Estimate.unknownValue(); + } + if (totalRowsCount.getValue() == 0.0) { + return Estimate.zeroValue(); + } + Estimate totalNullsCount = summarizePartitionStatistics( statisticsSample.values(), column, @@ -252,13 +259,9 @@ private Estimate calculateNullsFraction(Map statist } }); - if (totalNullsCount.isValueUnknown() || totalRowsCount.isValueUnknown()) { + if (totalNullsCount.isValueUnknown()) { return Estimate.unknownValue(); } - if (totalRowsCount.getValue() == 0.0) { - return Estimate.zeroValue(); - } - return new Estimate(totalNullsCount.getValue() / totalRowsCount.getValue()); } diff --git a/presto-product-tests/src/main/java/com/facebook/presto/tests/hive/TestHiveTableStatistics.java b/presto-product-tests/src/main/java/com/facebook/presto/tests/hive/TestHiveTableStatistics.java index 107e3bae42013..e9291980fba2e 100644 --- a/presto-product-tests/src/main/java/com/facebook/presto/tests/hive/TestHiveTableStatistics.java +++ b/presto-product-tests/src/main/java/com/facebook/presto/tests/hive/TestHiveTableStatistics.java @@ -169,10 +169,10 @@ public void testStatisticsForUnpartitionedTable() // table not analyzed assertThat(query(showStatsWholeTable)).containsOnly( - row("n_nationkey", null, null, null, null, null, null), - row("n_name", null, null, null, null, null, null), - row("n_regionkey", null, null, null, null, null, null), - row("n_comment", null, null, null, null, null, null), + row("n_nationkey", null, null, anyOf(null, 0.0), null, null, null), + row("n_name", null, null, anyOf(null, 0.0), null, null, null), + row("n_regionkey", null, null, anyOf(null, 0.0), null, null, null), + row("n_comment", null, null, anyOf(null, 0.0), null, null, null), row(null, null, null, null, anyOf(null, 0.0), null, null)); // anyOf because of different behaviour on HDP (hive 1.2) and CDH (hive 1.1) // basic analysis @@ -383,21 +383,21 @@ public void testStatisticsForAllDataTypesNoData() onHive().executeQuery("ANALYZE TABLE " + tableNameInDatabase + " COMPUTE STATISTICS"); assertThat(query("SHOW STATS FOR " + tableNameInDatabase)).containsOnly( - row("c_tinyint", null, null, null, null, null, null), - row("c_smallint", null, null, null, null, null, null), - row("c_int", null, null, null, null, null, null), - row("c_bigint", null, null, null, null, null, null), - row("c_float", null, null, null, null, null, null), - row("c_double", null, null, null, null, null, null), - row("c_decimal", null, null, null, null, null, null), - row("c_decimal_w_params", null, null, null, null, null, null), - row("c_timestamp", null, null, null, null, null, null), - row("c_date", null, null, null, null, null, null), - row("c_string", null, null, null, null, null, null), - row("c_varchar", null, null, null, null, null, null), - row("c_char", null, null, null, null, null, null), - row("c_boolean", null, null, null, null, null, null), - row("c_binary", null, null, null, null, null, null), + row("c_tinyint", null, null, 0.0, null, null, null), + row("c_smallint", null, null, 0.0, null, null, null), + row("c_int", null, null, 0.0, null, null, null), + row("c_bigint", null, null, 0.0, null, null, null), + row("c_float", null, null, 0.0, null, null, null), + row("c_double", null, null, 0.0, null, null, null), + row("c_decimal", null, null, 0.0, null, null, null), + row("c_decimal_w_params", null, null, 0.0, null, null, null), + row("c_timestamp", null, null, 0.0, null, null, null), + row("c_date", null, null, 0.0, null, null, null), + row("c_string", null, null, 0.0, null, null, null), + row("c_varchar", null, null, 0.0, null, null, null), + row("c_char", null, null, 0.0, null, null, null), + row("c_boolean", null, null, 0.0, null, null, null), + row("c_binary", null, null, 0.0, null, null, null), row(null, null, null, null, 0.0, null, null)); onHive().executeQuery("ANALYZE TABLE " + tableNameInDatabase + " COMPUTE STATISTICS FOR COLUMNS"); From d694edc99e029c160f7515f9c3ce4a4cecf63365 Mon Sep 17 00:00:00 2001 From: Piotr Findeisen Date: Mon, 26 Mar 2018 15:27:46 +0200 Subject: [PATCH 06/13] Remove redundant else --- .../MetastoreHiveStatisticsProvider.java | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/presto-hive/src/main/java/com/facebook/presto/hive/statistics/MetastoreHiveStatisticsProvider.java b/presto-hive/src/main/java/com/facebook/presto/hive/statistics/MetastoreHiveStatisticsProvider.java index fa7e584e305c7..b5d0f19683c01 100644 --- a/presto-hive/src/main/java/com/facebook/presto/hive/statistics/MetastoreHiveStatisticsProvider.java +++ b/presto-hive/src/main/java/com/facebook/presto/hive/statistics/MetastoreHiveStatisticsProvider.java @@ -236,12 +236,10 @@ private Estimate calculateNullsFraction(Map statist statisticsSample.values(), column, columnStatistics -> { - if (columnStatistics.getNullsCount().isPresent()) { - return OptionalDouble.of(columnStatistics.getNullsCount().getAsLong()); - } - else { + if (!columnStatistics.getNullsCount().isPresent()) { return OptionalDouble.empty(); } + return OptionalDouble.of(columnStatistics.getNullsCount().getAsLong()); }, nullsCountStream -> { double nullsCount = 0; @@ -254,9 +252,7 @@ private Estimate calculateNullsFraction(Map statist if (partitionsWithStatisticsCount == 0) { return OptionalDouble.empty(); } - else { - return OptionalDouble.of(totalPartitionsCount / partitionsWithStatisticsCount * nullsCount); - } + return OptionalDouble.of(totalPartitionsCount / partitionsWithStatisticsCount * nullsCount); }); if (totalNullsCount.isValueUnknown()) { @@ -314,12 +310,10 @@ private Estimate summarizePartitionStatistics( OptionalDouble statisticsValue = valueAggregateFunction.apply(intermediateStream); - if (statisticsValue.isPresent()) { - return new Estimate(statisticsValue.getAsDouble()); - } - else { + if (!statisticsValue.isPresent()) { return Estimate.unknownValue(); } + return new Estimate(statisticsValue.getAsDouble()); } private Map getPartitionsStatistics(HiveTableHandle tableHandle, List hivePartitions) From f673abd13a238b7620528ff692e77ccfbc53aac2 Mon Sep 17 00:00:00 2001 From: Piotr Findeisen Date: Mon, 26 Mar 2018 15:27:47 +0200 Subject: [PATCH 07/13] Rename parameter to match meaning --- .../hive/statistics/MetastoreHiveStatisticsProvider.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/presto-hive/src/main/java/com/facebook/presto/hive/statistics/MetastoreHiveStatisticsProvider.java b/presto-hive/src/main/java/com/facebook/presto/hive/statistics/MetastoreHiveStatisticsProvider.java index b5d0f19683c01..bf94e46a940ed 100644 --- a/presto-hive/src/main/java/com/facebook/presto/hive/statistics/MetastoreHiveStatisticsProvider.java +++ b/presto-hive/src/main/java/com/facebook/presto/hive/statistics/MetastoreHiveStatisticsProvider.java @@ -270,7 +270,10 @@ private Estimate countDistinctPartitionKeys(HiveColumnHandle partitionColumn, Li .count()); } - private Estimate calculateNullsFractionForPartitioningKey(HiveColumnHandle partitionColumn, List partitions, Map statisticsSample) + private Estimate calculateNullsFractionForPartitioningKey( + HiveColumnHandle partitionColumn, + List queriedPartitions, + Map statisticsSample) { OptionalDouble rowsPerPartition = statisticsSample.values().stream() .map(stats -> stats.getBasicStatistics().getRowCount()) @@ -282,11 +285,11 @@ private Estimate calculateNullsFractionForPartitioningKey(HiveColumnHandle parti return Estimate.unknownValue(); } - double estimatedTotalRowsCount = rowsPerPartition.getAsDouble() * partitions.size(); + double estimatedTotalRowsCount = rowsPerPartition.getAsDouble() * queriedPartitions.size(); if (estimatedTotalRowsCount == 0.0) { return Estimate.zeroValue(); } - double estimatedNullsCount = partitions.stream() + double estimatedNullsCount = queriedPartitions.stream() .filter(partition -> partition.getKeys().get(partitionColumn).isNull()) .map(HivePartition::getPartitionId) .mapToLong(partitionId -> statisticsSample.get(partitionId).getBasicStatistics().getRowCount().orElse((long) rowsPerPartition.getAsDouble())) From 9011742cb82b701798d27cde0d9f9b718d03fdb9 Mon Sep 17 00:00:00 2001 From: Piotr Findeisen Date: Mon, 26 Mar 2018 15:27:48 +0200 Subject: [PATCH 08/13] Extract rowsPerPartition calculation --- .../MetastoreHiveStatisticsProvider.java | 67 +++++++++++-------- 1 file changed, 38 insertions(+), 29 deletions(-) diff --git a/presto-hive/src/main/java/com/facebook/presto/hive/statistics/MetastoreHiveStatisticsProvider.java b/presto-hive/src/main/java/com/facebook/presto/hive/statistics/MetastoreHiveStatisticsProvider.java index bf94e46a940ed..f120250a5bae9 100644 --- a/presto-hive/src/main/java/com/facebook/presto/hive/statistics/MetastoreHiveStatisticsProvider.java +++ b/presto-hive/src/main/java/com/facebook/presto/hive/statistics/MetastoreHiveStatisticsProvider.java @@ -14,6 +14,7 @@ package com.facebook.presto.hive.statistics; +import com.facebook.presto.hive.HiveBasicStatistics; import com.facebook.presto.hive.HiveColumnHandle; import com.facebook.presto.hive.HivePartition; import com.facebook.presto.hive.HiveTableHandle; @@ -99,7 +100,8 @@ public TableStatistics getTableStatistics(ConnectorSession session, ConnectorTab Map statisticsSample = getPartitionsStatistics((HiveTableHandle) tableHandle, samplePartitions); TableStatistics.Builder tableStatistics = TableStatistics.builder(); - Estimate rowCount = calculateRowsCount(statisticsSample, queriedPartitionsCount); + OptionalDouble rowsPerPartition = calculateRowsPerPartition(statisticsSample); + Estimate rowCount = calculateRowsCount(rowsPerPartition, queriedPartitionsCount); tableStatistics.setRowCount(rowCount); for (Map.Entry columnEntry : tableColumns.entrySet()) { String columnName = columnEntry.getKey(); @@ -113,7 +115,7 @@ public TableStatistics getTableStatistics(ConnectorSession session, ConnectorTab Estimate nullsFraction; if (hiveColumnHandle.isPartitionKey()) { rangeStatistics.setDistinctValuesCount(countDistinctPartitionKeys(hiveColumnHandle, queriedPartitions)); - nullsFraction = calculateNullsFractionForPartitioningKey(hiveColumnHandle, queriedPartitions, statisticsSample); + nullsFraction = calculateNullsFractionForPartitioningKey(hiveColumnHandle, queriedPartitions, statisticsSample, rowCount, rowsPerPartition); if (isLowHighSupportedForType(prestoType)) { lowValueCandidates = queriedPartitions.stream() .map(HivePartition::getKeys) @@ -185,21 +187,22 @@ private boolean isLowHighSupportedForType(Type type) return false; } - private Estimate calculateRowsCount(Map statisticsSample, int queriedPartitionsCount) + private OptionalDouble calculateRowsPerPartition(Map statisticsSample) { - List knownPartitionRowCounts = statisticsSample.values().stream() - .map(stats -> stats.getBasicStatistics().getRowCount()) + return statisticsSample.values().stream() + .map(PartitionStatistics::getBasicStatistics) + .map(HiveBasicStatistics::getRowCount) .filter(OptionalLong::isPresent) - .map(OptionalLong::getAsLong) - .collect(toImmutableList()); - - long knownPartitionRowCountsSum = knownPartitionRowCounts.stream().mapToLong(a -> a).sum(); - long partitionsWithStatsCount = knownPartitionRowCounts.size(); + .mapToLong(OptionalLong::getAsLong) + .average(); + } - if (partitionsWithStatsCount == 0) { + private Estimate calculateRowsCount(OptionalDouble rowsPerPartition, int queriedPartitionsCount) + { + if (!rowsPerPartition.isPresent()) { return Estimate.unknownValue(); } - return new Estimate(1.0 * knownPartitionRowCountsSum / partitionsWithStatsCount * queriedPartitionsCount); + return new Estimate(rowsPerPartition.getAsDouble() * queriedPartitionsCount); } private Estimate calculateDistinctValuesCount(Map statisticsSample, String column) @@ -223,12 +226,12 @@ private Estimate calculateDistinctValuesCount(Map s DoubleStream::max); } - private Estimate calculateNullsFraction(Map statisticsSample, int totalPartitionsCount, String column, Estimate totalRowsCount) + private Estimate calculateNullsFraction(Map statisticsSample, int totalPartitionsCount, String column, Estimate rowCount) { - if (totalRowsCount.isValueUnknown()) { + if (rowCount.isValueUnknown()) { return Estimate.unknownValue(); } - if (totalRowsCount.getValue() == 0.0) { + if (rowCount.getValue() == 0.0) { return Estimate.zeroValue(); } @@ -258,7 +261,7 @@ private Estimate calculateNullsFraction(Map statist if (totalNullsCount.isValueUnknown()) { return Estimate.unknownValue(); } - return new Estimate(totalNullsCount.getValue() / totalRowsCount.getValue()); + return new Estimate(totalNullsCount.getValue() / rowCount.getValue()); } private Estimate countDistinctPartitionKeys(HiveColumnHandle partitionColumn, List partitions) @@ -273,28 +276,26 @@ private Estimate countDistinctPartitionKeys(HiveColumnHandle partitionColumn, Li private Estimate calculateNullsFractionForPartitioningKey( HiveColumnHandle partitionColumn, List queriedPartitions, - Map statisticsSample) + Map statisticsSample, + Estimate rowCount, + OptionalDouble rowsPerPartition) { - OptionalDouble rowsPerPartition = statisticsSample.values().stream() - .map(stats -> stats.getBasicStatistics().getRowCount()) - .filter(OptionalLong::isPresent) - .mapToLong(OptionalLong::getAsLong) - .average(); - - if (!rowsPerPartition.isPresent()) { + if (rowCount.isValueUnknown()) { return Estimate.unknownValue(); } - - double estimatedTotalRowsCount = rowsPerPartition.getAsDouble() * queriedPartitions.size(); - if (estimatedTotalRowsCount == 0.0) { + if (rowCount.getValue() == 0.0) { return Estimate.zeroValue(); } + if (!rowsPerPartition.isPresent()) { + return Estimate.unknownValue(); + } + double estimatedNullsCount = queriedPartitions.stream() .filter(partition -> partition.getKeys().get(partitionColumn).isNull()) .map(HivePartition::getPartitionId) - .mapToLong(partitionId -> statisticsSample.get(partitionId).getBasicStatistics().getRowCount().orElse((long) rowsPerPartition.getAsDouble())) + .mapToDouble(partitionId -> orElse(statisticsSample.get(partitionId).getBasicStatistics().getRowCount(), rowsPerPartition.getAsDouble())) .sum(); - return new Estimate(estimatedNullsCount / estimatedTotalRowsCount); + return new Estimate(estimatedNullsCount / rowCount.getValue()); } private Estimate summarizePartitionStatistics( @@ -389,4 +390,12 @@ else if (partition.getPartitionId().compareTo(max.getPartitionId()) > 0) { return unmodifiableList(result); } + + private static double orElse(OptionalLong value, double other) + { + if (value.isPresent()) { + return value.getAsLong(); + } + return other; + } } From 122015c7c319abce12d33699afaa32bb9decd97b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Osipiuk?= Date: Mon, 26 Mar 2018 15:27:49 +0200 Subject: [PATCH 09/13] Pull dataSize statistics from Hive for VARCHAR columns --- .../MetastoreHiveStatisticsProvider.java | 96 ++++++++++++ .../presto/hive/AbstractTestHiveClient.java | 15 ++ .../hive/TestHiveIntegrationSmokeTest.java | 8 +- .../tests/hive/TestHiveTableStatistics.java | 148 +++++++++--------- 4 files changed, 189 insertions(+), 78 deletions(-) diff --git a/presto-hive/src/main/java/com/facebook/presto/hive/statistics/MetastoreHiveStatisticsProvider.java b/presto-hive/src/main/java/com/facebook/presto/hive/statistics/MetastoreHiveStatisticsProvider.java index f120250a5bae9..4a5b50028c14c 100644 --- a/presto-hive/src/main/java/com/facebook/presto/hive/statistics/MetastoreHiveStatisticsProvider.java +++ b/presto-hive/src/main/java/com/facebook/presto/hive/statistics/MetastoreHiveStatisticsProvider.java @@ -38,6 +38,8 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.hash.HashFunction; +import io.airlift.log.Logger; +import io.airlift.slice.Slice; import org.joda.time.DateTimeZone; import java.util.ArrayList; @@ -45,6 +47,7 @@ import java.util.Comparator; import java.util.List; import java.util.Map; +import java.util.Optional; import java.util.OptionalDouble; import java.util.OptionalLong; import java.util.PrimitiveIterator; @@ -61,6 +64,8 @@ import static com.facebook.presto.spi.type.IntegerType.INTEGER; import static com.facebook.presto.spi.type.RealType.REAL; import static com.facebook.presto.spi.type.SmallintType.SMALLINT; +import static com.facebook.presto.spi.type.StandardTypes.CHAR; +import static com.facebook.presto.spi.type.StandardTypes.VARCHAR; import static com.facebook.presto.spi.type.TimestampType.TIMESTAMP; import static com.facebook.presto.spi.type.TinyintType.TINYINT; import static com.google.common.base.Preconditions.checkArgument; @@ -75,6 +80,8 @@ public class MetastoreHiveStatisticsProvider implements HiveStatisticsProvider { + private static final Logger log = Logger.get(MetastoreHiveStatisticsProvider.class); + private final TypeManager typeManager; private final SemiTransactionalHiveMetastore metastore; private final DateTimeZone timeZone; @@ -113,6 +120,7 @@ public TableStatistics getTableStatistics(ConnectorSession session, ConnectorTab Type prestoType = typeManager.getType(hiveColumnHandle.getTypeSignature()); Estimate nullsFraction; + Estimate dataSize; if (hiveColumnHandle.isPartitionKey()) { rangeStatistics.setDistinctValuesCount(countDistinctPartitionKeys(hiveColumnHandle, queriedPartitions)); nullsFraction = calculateNullsFractionForPartitioningKey(hiveColumnHandle, queriedPartitions, statisticsSample, rowCount, rowsPerPartition); @@ -125,6 +133,7 @@ public TableStatistics getTableStatistics(ConnectorSession session, ConnectorTab .collect(toImmutableList()); highValueCandidates = lowValueCandidates; } + dataSize = calculateDataSizeForPartitioningKey(hiveColumnHandle, queriedPartitions, statisticsSample, rowCount, rowsPerPartition); } else { rangeStatistics.setDistinctValuesCount(calculateDistinctValuesCount(statisticsSample, columnName)); @@ -150,6 +159,7 @@ public TableStatistics getTableStatistics(ConnectorSession session, ConnectorTab .map(range -> range.getMax().get()) .collect(toImmutableList()); } + dataSize = calculateDataSize(statisticsSample, columnName, rowCount); } rangeStatistics.setFraction(nullsFraction.map(value -> 1.0 - value)); @@ -160,6 +170,7 @@ public TableStatistics getTableStatistics(ConnectorSession session, ConnectorTab }; rangeStatistics.setLowValue(lowValueCandidates.stream().min(comparator)); rangeStatistics.setHighValue(highValueCandidates.stream().max(comparator)); + rangeStatistics.setDataSize(dataSize); ColumnStatistics.Builder columnStatistics = ColumnStatistics.builder(); columnStatistics.setNullsFraction(nullsFraction); @@ -264,6 +275,50 @@ private Estimate calculateNullsFraction(Map statist return new Estimate(totalNullsCount.getValue() / rowCount.getValue()); } + private Estimate calculateDataSize(Map statisticsSample, String columnName, Estimate rowCount) + { + if (rowCount.isValueUnknown()) { + return Estimate.unknownValue(); + } + + int knownPartitionCount = 0; + double knownRowCount = 0; + double knownDataSize = 0; + + for (PartitionStatistics statistics : statisticsSample.values()) { + if (!statistics.getBasicStatistics().getRowCount().isPresent()) { + continue; + } + double partitionRowCount = statistics.getBasicStatistics().getRowCount().getAsLong(); + + HiveColumnStatistics partitionColumnStatistics = statistics.getColumnStatistics().get(columnName); + if (partitionColumnStatistics == null || !partitionColumnStatistics.getAverageColumnLength().isPresent()) { + continue; + } + + double partitionNonNullCount = partitionRowCount - partitionColumnStatistics.getNullsCount().orElse(0); + if (partitionNonNullCount < 0) { + log.debug("null count bigger than row count in partition stats"); + continue; + } + knownPartitionCount++; + knownRowCount += partitionRowCount; + // Note: average column length from Hive might not translate directly into internal data size + knownDataSize += partitionColumnStatistics.getAverageColumnLength().getAsDouble() * partitionNonNullCount; + } + + if (knownPartitionCount == 0) { + return Estimate.unknownValue(); + } + + if (knownDataSize == 0) { + return Estimate.zeroValue(); + } + + verify(knownRowCount > 0); + return new Estimate(knownDataSize / knownRowCount * rowCount.getValue()); + } + private Estimate countDistinctPartitionKeys(HiveColumnHandle partitionColumn, List partitions) { return new Estimate(partitions.stream() @@ -298,6 +353,47 @@ private Estimate calculateNullsFractionForPartitioningKey( return new Estimate(estimatedNullsCount / rowCount.getValue()); } + private Estimate calculateDataSizeForPartitioningKey( + HiveColumnHandle partitionColumn, + List queriedPartitions, + Map statisticsSample, + Estimate rowCount, + OptionalDouble rowsPerPartition) + { + if (rowCount.isValueUnknown() || !rowsPerPartition.isPresent()) { + return Estimate.unknownValue(); + } + + String baseType = partitionColumn.getTypeSignature().getBase(); + if (!VARCHAR.equals(baseType) && !CHAR.equalsIgnoreCase(baseType)) { + // TODO support VARBINARY + return Estimate.unknownValue(); + } + + double knownRowCount = 0; + double knownDataSize = 0; + + for (HivePartition partition : queriedPartitions) { + NullableValue value = partition.getKeys().get(partitionColumn); + int length = value.isNull() ? 0 : ((Slice) value.getValue()).length(); + + double partitionRowCount = orElse( + Optional.ofNullable(statisticsSample.get(partition.getPartitionId())) + .orElseGet(PartitionStatistics::empty) + .getBasicStatistics() + .getRowCount(), + rowsPerPartition.getAsDouble()); + knownRowCount += partitionRowCount; + knownDataSize += length * partitionRowCount; + } + + if (knownRowCount == 0) { + return Estimate.unknownValue(); + } + + return new Estimate(knownDataSize / knownRowCount * rowCount.getValue()); + } + private Estimate summarizePartitionStatistics( Collection partitionStatistics, String column, diff --git a/presto-hive/src/test/java/com/facebook/presto/hive/AbstractTestHiveClient.java b/presto-hive/src/test/java/com/facebook/presto/hive/AbstractTestHiveClient.java index c457f77b9007a..03b4a6918b758 100644 --- a/presto-hive/src/test/java/com/facebook/presto/hive/AbstractTestHiveClient.java +++ b/presto-hive/src/test/java/com/facebook/presto/hive/AbstractTestHiveClient.java @@ -1322,7 +1322,11 @@ private void assertTableStatsComputed( assertEquals(columnsStatistics.keySet(), expectedColumnStatsColumns, "columns with statistics"); + Map columnHandles = metadata.getColumnHandles(session, tableHandle); columnsStatistics.forEach((columnName, columnStatistics) -> { + ColumnHandle columnHandle = columnHandles.get(columnName); + Type columnType = metadata.getColumnMetadata(session, tableHandle, columnHandle).getType(); + assertFalse( columnStatistics.getNullsFraction().isValueUnknown(), "unknown nulls fraction for " + columnName); @@ -1334,6 +1338,17 @@ private void assertTableStatsComputed( assertFalse( rangeColumnStatistics.getFraction().isValueUnknown(), "unknown range non-null fraction for " + columnName); + + if (isVarcharType(columnType)) { + assertFalse( + rangeColumnStatistics.getDataSize().isValueUnknown(), + "unknown range data size for " + columnName); + } + else { + assertTrue( + rangeColumnStatistics.getDataSize().isValueUnknown(), + "known range data size for" + columnName); + } }); } } diff --git a/presto-hive/src/test/java/com/facebook/presto/hive/TestHiveIntegrationSmokeTest.java b/presto-hive/src/test/java/com/facebook/presto/hive/TestHiveIntegrationSmokeTest.java index 4109033f52197..d33031e0e8733 100644 --- a/presto-hive/src/test/java/com/facebook/presto/hive/TestHiveIntegrationSmokeTest.java +++ b/presto-hive/src/test/java/com/facebook/presto/hive/TestHiveIntegrationSmokeTest.java @@ -2589,7 +2589,7 @@ public void testCollectColumnStatisticsOnCreateTable() "('c_timestamp', null, 2.0E0, 0.5E0, null, '2012-08-08 00:00:00.000', '2012-08-08 01:00:00.000'), " + "('c_varchar', null, 2.0E0, 0.5E0, null, null, null), " + "('c_varbinary', null, null, 0.5E0, null, null, null), " + - "('p_varchar', null, 1.0E0, 0.0E0, null, null, null), " + + "('p_varchar', 8.0E0, 1.0E0, 0.0E0, null, null, null), " + "(null, null, null, null, 4.0E0, null, null)"); assertQuery(format("SHOW STATS FOR (SELECT * FROM %s WHERE p_varchar = 'p2')", tableName), "SELECT * FROM VALUES " + @@ -2599,7 +2599,7 @@ public void testCollectColumnStatisticsOnCreateTable() "('c_timestamp', null, 2.0E0, 0.5E0, null, '2012-09-09 00:00:00.000', '2012-09-09 01:00:00.000'), " + "('c_varchar', null, 2.0E0, 0.5E0, null, null, null), " + "('c_varbinary', null, null, 0.5E0, null, null, null), " + - "('p_varchar', null, 1.0E0, 0.0E0, null, null, null), " + + "('p_varchar', 8.0E0, 1.0E0, 0.0E0, null, null, null), " + "(null, null, null, null, 4.0E0, null, null)"); assertUpdate(format("DROP TABLE %s", tableName)); @@ -2646,7 +2646,7 @@ public void testCollectColumnStatisticsOnInsert() "('c_timestamp', null, 2.0E0, 0.5E0, null, '2012-08-08 00:00:00.000', '2012-08-08 01:00:00.000'), " + "('c_varchar', null, 2.0E0, 0.5E0, null, null, null), " + "('c_varbinary', null, null, 0.5E0, null, null, null), " + - "('p_varchar', null, 1.0E0, 0.0E0, null, null, null), " + + "('p_varchar', 8.0E0, 1.0E0, 0.0E0, null, null, null), " + "(null, null, null, null, 4.0E0, null, null)"); assertQuery(format("SHOW STATS FOR (SELECT * FROM %s WHERE p_varchar = 'p2')", tableName), "SELECT * FROM VALUES " + @@ -2656,7 +2656,7 @@ public void testCollectColumnStatisticsOnInsert() "('c_timestamp', null, 2.0E0, 0.5E0, null, '2012-09-09 00:00:00.000', '2012-09-09 01:00:00.000'), " + "('c_varchar', null, 2.0E0, 0.5E0, null, null, null), " + "('c_varbinary', null, null, 0.5E0, null, null, null), " + - "('p_varchar', null, 1.0E0, 0.0E0, null, null, null), " + + "('p_varchar', 8.0E0, 1.0E0, 0.0E0, null, null, null), " + "(null, null, null, null, 4.0E0, null, null)"); assertUpdate(format("DROP TABLE %s", tableName)); diff --git a/presto-product-tests/src/main/java/com/facebook/presto/tests/hive/TestHiveTableStatistics.java b/presto-product-tests/src/main/java/com/facebook/presto/tests/hive/TestHiveTableStatistics.java index e9291980fba2e..949f0dac17135 100644 --- a/presto-product-tests/src/main/java/com/facebook/presto/tests/hive/TestHiveTableStatistics.java +++ b/presto-product-tests/src/main/java/com/facebook/presto/tests/hive/TestHiveTableStatistics.java @@ -102,11 +102,11 @@ public Requirement getRequirements(Configuration configuration) row("c_decimal_w_params", null, 2.0, 0.0, null, "345.67100", "345.67800"), row("c_timestamp", null, 2.0, 0.0, null, "2015-05-10 12:15:31.000", "2015-05-10 12:15:35.000"), row("c_date", null, 2.0, 0.0, null, "2015-05-09", "2015-06-10"), - row("c_string", null, 2.0, 0.0, null, null, null), - row("c_varchar", null, 2.0, 0.0, null, null, null), - row("c_char", null, 2.0, 0.0, null, null, null), + row("c_string", 0.0, 2.0, 0.0, null, null, null), + row("c_varchar", 0.0, 2.0, 0.0, null, null, null), + row("c_char", 0.0, 2.0, 0.0, null, null, null), row("c_boolean", null, 2.0, 0.0, null, null, null), - row("c_binary", null, null, 0.0, null, null, null), + row("c_binary", 0.0, null, 0.0, null, null, null), row(null, null, null, null, 2.0, null, null)); private static final List ALL_TYPES_ALL_NULL_TABLE_STATISTICS = ImmutableList.of( @@ -120,11 +120,11 @@ public Requirement getRequirements(Configuration configuration) row("c_decimal_w_params", null, 0.0, 1.0, null, null, null), row("c_timestamp", null, 0.0, 1.0, null, null, null), row("c_date", null, 0.0, 1.0, null, null, null), - row("c_string", null, 0.0, 1.0, null, null, null), - row("c_varchar", null, 0.0, 1.0, null, null, null), - row("c_char", null, 0.0, 1.0, null, null, null), + row("c_string", 0.0, 0.0, 1.0, null, null, null), + row("c_varchar", 0.0, 0.0, 1.0, null, null, null), + row("c_char", 0.0, 0.0, 1.0, null, null, null), row("c_boolean", null, 0.0, 1.0, null, null, null), - row("c_binary", null, null, 1.0, null, null, null), + row("c_binary", 0.0, null, 1.0, null, null, null), row(null, null, null, null, 1.0, null, null)); private static final List ALL_TYPES_EMPTY_TABLE_STATISTICS = ImmutableList.of( @@ -138,11 +138,11 @@ public Requirement getRequirements(Configuration configuration) row("c_decimal_w_params", null, 0.0, 0.0, null, null, null), row("c_timestamp", null, 0.0, 0.0, null, null, null), row("c_date", null, 0.0, 0.0, null, null, null), - row("c_string", null, 0.0, 0.0, null, null, null), - row("c_varchar", null, 0.0, 0.0, null, null, null), - row("c_char", null, 0.0, 0.0, null, null, null), + row("c_string", 0.0, 0.0, 0.0, null, null, null), + row("c_varchar", 0.0, 0.0, 0.0, null, null, null), + row("c_char", 0.0, 0.0, 0.0, null, null, null), row("c_boolean", null, 0.0, 0.0, null, null, null), - row("c_binary", null, null, 0.0, null, null, null), + row("c_binary", 0.0, null, 0.0, null, null, null), row(null, null, null, null, 0.0, null, null)); private static final class AllTypesTable @@ -192,9 +192,9 @@ public void testStatisticsForUnpartitionedTable() assertThat(query(showStatsWholeTable)).containsOnly( row("n_nationkey", null, 19.0, 0.0, null, "0", "24"), - row("n_name", null, 24.0, 0.0, null, null, null), + row("n_name", 177.0, 24.0, 0.0, null, null, null), row("n_regionkey", null, 5.0, 0.0, null, "0", "4"), - row("n_comment", null, 31.0, 0.0, null, null, null), + row("n_comment", 1857.0, 31.0, 0.0, null, null, null), row(null, null, null, null, 25.0, null, null)); } @@ -280,16 +280,16 @@ public void testStatisticsForPartitionedTable() assertThat(query(showStatsWholeTable)).containsOnly( row("p_nationkey", null, 5.0, 0.0, null, "1", "24"), - row("p_name", null, 6.0, 0.0, null, null, null), + row("p_name", 114.0, 6.0, 0.0, null, null, null), row("p_regionkey", null, 3.0, 0.0, null, "1", "3"), - row("p_comment", null, 7.0, 0.0, null, null, null), + row("p_comment", 1497.0, 7.0, 0.0, null, null, null), row(null, null, null, null, 15.0, null, null)); assertThat(query(showStatsPartitionOne)).containsOnly( row("p_nationkey", null, 5.0, 0.0, null, "1", "24"), - row("p_name", null, 6.0, 0.0, null, null, null), + row("p_name", 38.0, 6.0, 0.0, null, null, null), row("p_regionkey", null, 1.0, 0.0, null, "1", "1"), - row("p_comment", null, 7.0, 0.0, null, null, null), + row("p_comment", 499.0, 7.0, 0.0, null, null, null), row(null, null, null, null, 5.0, null, null)); assertThat(query(showStatsPartitionTwo)).containsOnly( @@ -305,23 +305,23 @@ public void testStatisticsForPartitionedTable() assertThat(query(showStatsWholeTable)).containsOnly( row("p_nationkey", null, 5.0, 0.0, null, "1", "24"), - row("p_name", null, 6.0, 0.0, null, null, null), + row("p_name", 109.0, 6.0, 0.0, null, null, null), row("p_regionkey", null, 3.0, 0.0, null, "1", "3"), - row("p_comment", null, 7.0, 0.0, null, null, null), + row("p_comment", 1197.0, 7.0, 0.0, null, null, null), row(null, null, null, null, 15.0, null, null)); assertThat(query(showStatsPartitionOne)).containsOnly( row("p_nationkey", null, 5.0, 0.0, null, "1", "24"), - row("p_name", null, 6.0, 0.0, null, null, null), + row("p_name", 38.0, 6.0, 0.0, null, null, null), row("p_regionkey", null, 1.0, 0.0, null, "1", "1"), - row("p_comment", null, 7.0, 0.0, null, null, null), + row("p_comment", 499.0, 7.0, 0.0, null, null, null), row(null, null, null, null, 5.0, null, null)); assertThat(query(showStatsPartitionTwo)).containsOnly( row("p_nationkey", null, 4.0, 0.0, null, "8", "21"), - row("p_name", null, 6.0, 0.0, null, null, null), + row("p_name", 31.0, 6.0, 0.0, null, null, null), row("p_regionkey", null, 1.0, 0.0, null, "2", "2"), - row("p_comment", null, 5.0, 0.0, null, null, null), + row("p_comment", 351.0, 5.0, 0.0, null, null, null), row(null, null, null, null, 5.0, null, null)); } @@ -366,11 +366,11 @@ public void testStatisticsForAllDataTypes() row("c_decimal_w_params", null, 2.0, 0.0, null, "345.67100", "345.67800"), row("c_timestamp", null, 2.0, 0.0, null, "2015-05-10 06:30:31.000", "2015-05-10 06:30:35.000"), // timestamp is shifted by hive.time-zone on read row("c_date", null, 2.0, 0.0, null, "2015-05-09", "2015-06-10"), - row("c_string", null, 2.0, 0.0, null, null, null), - row("c_varchar", null, 2.0, 0.0, null, null, null), - row("c_char", null, 2.0, 0.0, null, null, null), + row("c_string", 22.0, 2.0, 0.0, null, null, null), + row("c_varchar", 20.0, 2.0, 0.0, null, null, null), + row("c_char", 12.0, 2.0, 0.0, null, null, null), row("c_boolean", null, 2.0, 0.0, null, null, null), - row("c_binary", null, null, 0.0, null, null, null), + row("c_binary", 23.0, null, 0.0, null, null, null), row(null, null, null, null, 2.0, null, null)); } @@ -413,11 +413,11 @@ public void testStatisticsForAllDataTypesNoData() row("c_decimal_w_params", null, 0.0, 0.0, null, null, null), row("c_timestamp", null, 0.0, 0.0, null, null, null), row("c_date", null, 0.0, 0.0, null, null, null), - row("c_string", null, 0.0, 0.0, null, null, null), - row("c_varchar", null, 0.0, 0.0, null, null, null), - row("c_char", null, 0.0, 0.0, null, null, null), + row("c_string", 0.0, 0.0, 0.0, null, null, null), + row("c_varchar", 0.0, 0.0, 0.0, null, null, null), + row("c_char", 0.0, 0.0, 0.0, null, null, null), row("c_boolean", null, 0.0, 0.0, null, null, null), - row("c_binary", null, null, 0.0, null, null, null), + row("c_binary", 0.0, null, 0.0, null, null, null), row(null, null, null, null, 0.0, null, null)); } @@ -461,11 +461,11 @@ public void testStatisticsForAllDataTypesOnlyNulls() row("c_decimal_w_params", null, 0.0, 1.0, null, null, null), row("c_timestamp", null, 0.0, 1.0, null, null, null), row("c_date", null, 0.0, 1.0, null, null, null), - row("c_string", null, 0.0, 1.0, null, null, null), - row("c_varchar", null, 0.0, 1.0, null, null, null), - row("c_char", null, 0.0, 1.0, null, null, null), + row("c_string", 0.0, 0.0, 1.0, null, null, null), + row("c_varchar", 0.0, 0.0, 1.0, null, null, null), + row("c_char", 0.0, 0.0, 1.0, null, null, null), row("c_boolean", null, 0.0, 1.0, null, null, null), - row("c_binary", null, null, 1.0, null, null, null), + row("c_binary", 0.0, null, 1.0, null, null, null), row(null, null, null, null, 1.0, null, null)); } @@ -512,11 +512,11 @@ public void testComputeTableStatisticsOnInsert() row("c_decimal_w_params", null, 2.0, 0.5, null, "345.67100", "345.67800"), row("c_timestamp", null, 2.0, 0.5, null, "2015-05-10 12:15:31.000", "2015-05-10 12:15:35.000"), row("c_date", null, 2.0, 0.5, null, "2015-05-09", "2015-06-10"), - row("c_string", null, 2.0, 0.5, null, null, null), - row("c_varchar", null, 2.0, 0.5, null, null, null), - row("c_char", null, 2.0, 0.5, null, null, null), + row("c_string", 0.0, 2.0, 0.5, null, null, null), + row("c_varchar", 0.0, 2.0, 0.5, null, null, null), + row("c_char", 0.0, 2.0, 0.5, null, null, null), row("c_boolean", null, 2.0, 0.5, null, null, null), - row("c_binary", null, null, 0.5, null, null, null), + row("c_binary", 0.0, null, 0.5, null, null, null), row(null, null, null, null, 4.0, null, null)); query(format("INSERT INTO %s VALUES( " + @@ -547,11 +547,11 @@ public void testComputeTableStatisticsOnInsert() row("c_decimal_w_params", null, 2.0, 0.4, null, "345.67000", "345.67800"), row("c_timestamp", null, 2.0, 0.4, null, "2015-05-10 12:15:30.000", "2015-05-10 12:15:35.000"), row("c_date", null, 2.0, 0.4, null, "2015-05-08", "2015-06-10"), - row("c_string", null, 2.0, 0.4, null, null, null), - row("c_varchar", null, 2.0, 0.4, null, null, null), - row("c_char", null, 2.0, 0.4, null, null, null), + row("c_string", 0.0, 2.0, 0.4, null, null, null), + row("c_varchar", 0.0, 2.0, 0.4, null, null, null), + row("c_char", 0.0, 2.0, 0.4, null, null, null), row("c_boolean", null, 2.0, 0.4, null, null, null), - row("c_binary", null, null, 0.4, null, null, null), + row("c_binary", 0.0, null, 0.4, null, null, null), row(null, null, null, null, 5.0, null, null))); } finally { @@ -623,13 +623,13 @@ public void testComputePartitionStatisticsOnCreateTable() row("c_decimal_w_params", null, 1.0, 0.5, null, "345.67000", "345.67000"), row("c_timestamp", null, 1.0, 0.5, null, "2015-05-10 12:15:30.000", "2015-05-10 12:15:30.000"), row("c_date", null, 1.0, 0.5, null, "2015-05-08", "2015-05-08"), - row("c_string", null, 1.0, 0.5, null, null, null), - row("c_varchar", null, 1.0, 0.5, null, null, null), - row("c_char", null, 1.0, 0.5, null, null, null), + row("c_string", 0.0, 1.0, 0.5, null, null, null), + row("c_varchar", 0.0, 1.0, 0.5, null, null, null), + row("c_char", 0.0, 1.0, 0.5, null, null, null), row("c_boolean", null, 1.0, 0.5, null, null, null), - row("c_binary", null, null, 0.5, null, null, null), + row("c_binary", 0.0, null, 0.5, null, null, null), row("p_bigint", null, 1.0, 0.0, null, "1", "1"), - row("p_varchar", null, 1.0, 0.0, null, null, null), + row("p_varchar", 20.0, 1.0, 0.0, null, null, null), row(null, null, null, null, 2.0, null, null))); assertThat(query(format("SHOW STATS FOR (SELECT * FROM %s WHERE p_bigint = 2 AND p_varchar = 'partition2')", tableName))).containsOnly(ImmutableList.of( @@ -643,13 +643,13 @@ public void testComputePartitionStatisticsOnCreateTable() row("c_decimal_w_params", null, 1.0, 0.5, null, "999.67000", "999.67000"), row("c_timestamp", null, 1.0, 0.5, null, "2015-05-10 12:45:30.000", "2015-05-10 12:45:30.000"), row("c_date", null, 1.0, 0.5, null, "2015-05-09", "2015-05-09"), - row("c_string", null, 1.0, 0.5, null, null, null), - row("c_varchar", null, 1.0, 0.5, null, null, null), - row("c_char", null, 1.0, 0.5, null, null, null), + row("c_string", 0.0, 1.0, 0.5, null, null, null), + row("c_varchar", 0.0, 1.0, 0.5, null, null, null), + row("c_char", 0.0, 1.0, 0.5, null, null, null), row("c_boolean", null, 1.0, 0.5, null, null, null), - row("c_binary", null, null, 0.5, null, null, null), + row("c_binary", 0.0, null, 0.5, null, null, null), row("p_bigint", null, 1.0, 0.0, null, "2", "2"), - row("p_varchar", null, 1.0, 0.0, null, null, null), + row("p_varchar", 20.0, 1.0, 0.0, null, null, null), row(null, null, null, null, 2.0, null, null))); } finally { @@ -709,13 +709,13 @@ public void testComputePartitionStatisticsOnInsert() row("c_decimal_w_params", null, 1.0, 0.5, null, "345.67000", "345.67000"), row("c_timestamp", null, 1.0, 0.5, null, "2015-05-10 12:15:30.000", "2015-05-10 12:15:30.000"), row("c_date", null, 1.0, 0.5, null, "2015-05-08", "2015-05-08"), - row("c_string", null, 1.0, 0.5, null, null, null), - row("c_varchar", null, 1.0, 0.5, null, null, null), - row("c_char", null, 1.0, 0.5, null, null, null), + row("c_string", 0.0, 1.0, 0.5, null, null, null), + row("c_varchar", 0.0, 1.0, 0.5, null, null, null), + row("c_char", 0.0, 1.0, 0.5, null, null, null), row("c_boolean", null, 1.0, 0.5, null, null, null), - row("c_binary", null, null, 0.5, null, null, null), + row("c_binary", 0.0, null, 0.5, null, null, null), row("p_bigint", null, 1.0, 0.0, null, "1", "1"), - row("p_varchar", null, 1.0, 0.0, null, null, null), + row("p_varchar", 20.0, 1.0, 0.0, null, null, null), row(null, null, null, null, 2.0, null, null))); assertThat(query(showStatsPartitionTwo)).containsOnly(ImmutableList.of( @@ -729,13 +729,13 @@ public void testComputePartitionStatisticsOnInsert() row("c_decimal_w_params", null, 1.0, 0.5, null, "999.67000", "999.67000"), row("c_timestamp", null, 1.0, 0.5, null, "2015-05-10 12:45:30.000", "2015-05-10 12:45:30.000"), row("c_date", null, 1.0, 0.5, null, "2015-05-09", "2015-05-09"), - row("c_string", null, 1.0, 0.5, null, null, null), - row("c_varchar", null, 1.0, 0.5, null, null, null), - row("c_char", null, 1.0, 0.5, null, null, null), + row("c_string", 0.0, 1.0, 0.5, null, null, null), + row("c_varchar", 0.0, 1.0, 0.5, null, null, null), + row("c_char", 0.0, 1.0, 0.5, null, null, null), row("c_boolean", null, 1.0, 0.5, null, null, null), - row("c_binary", null, null, 0.5, null, null, null), + row("c_binary", 0.0, null, 0.5, null, null, null), row("p_bigint", null, 1.0, 0.0, null, "2", "2"), - row("p_varchar", null, 1.0, 0.0, null, null, null), + row("p_varchar", 20.0, 1.0, 0.0, null, null, null), row(null, null, null, null, 2.0, null, null))); query(format("INSERT INTO %s VALUES( TINYINT '119', SMALLINT '32759', INTEGER '2147483639', BIGINT '9223372036854775799', REAL '122.340', DOUBLE '233.560', CAST(342.0 AS DECIMAL(10, 0)), CAST(344.670 AS DECIMAL(10, 5)), TIMESTAMP '2015-05-10 12:15:29', DATE '2015-05-07', 'p1 varchar', CAST('p1 varchar10' AS VARCHAR(10)), CAST('p1 char10' AS CHAR(10)), true, CAST('p1 binary' as VARBINARY), BIGINT '1', 'partition1')", tableName)); @@ -752,13 +752,13 @@ public void testComputePartitionStatisticsOnInsert() row("c_decimal_w_params", null, 1.0, 0.5, null, "344.67000", "345.67000"), row("c_timestamp", null, 1.0, 0.5, null, "2015-05-10 12:15:29.000", "2015-05-10 12:15:30.000"), row("c_date", null, 1.0, 0.5, null, "2015-05-07", "2015-05-08"), - row("c_string", null, 1.0, 0.5, null, null, null), - row("c_varchar", null, 1.0, 0.5, null, null, null), - row("c_char", null, 1.0, 0.5, null, null, null), + row("c_string", 0.0, 1.0, 0.5, null, null, null), + row("c_varchar", 0.0, 1.0, 0.5, null, null, null), + row("c_char", 0.0, 1.0, 0.5, null, null, null), row("c_boolean", null, 2.0, 0.5, null, null, null), - row("c_binary", null, null, 0.5, null, null, null), + row("c_binary", 0.0, null, 0.5, null, null, null), row("p_bigint", null, 1.0, 0.0, null, "1", "1"), - row("p_varchar", null, 1.0, 0.0, null, null, null), + row("p_varchar", 40.0, 1.0, 0.0, null, null, null), row(null, null, null, null, 4.0, null, null))); query(format("INSERT INTO %s VALUES( TINYINT '100', SMALLINT '334', INTEGER '445', BIGINT '556', REAL '667.340', DOUBLE '778.560', CAST(889.0 AS DECIMAL(10, 0)), CAST(1000.670 AS DECIMAL(10, 5)), TIMESTAMP '2015-05-10 12:45:31', DATE '2015-05-10', CAST('p2 varchar' AS VARCHAR), CAST('p2 varchar10' AS VARCHAR(10)), CAST('p2 char10' AS CHAR(10)), true, CAST('p2 binary' as VARBINARY), BIGINT '2', 'partition2')", tableName)); @@ -775,13 +775,13 @@ public void testComputePartitionStatisticsOnInsert() row("c_decimal_w_params", null, 1.0, 0.5, null, "999.67000", "1000.67000"), row("c_timestamp", null, 1.0, 0.5, null, "2015-05-10 12:45:30.000", "2015-05-10 12:45:31.000"), row("c_date", null, 1.0, 0.5, null, "2015-05-09", "2015-05-10"), - row("c_string", null, 1.0, 0.5, null, null, null), - row("c_varchar", null, 1.0, 0.5, null, null, null), - row("c_char", null, 1.0, 0.5, null, null, null), + row("c_string", 0.0, 1.0, 0.5, null, null, null), + row("c_varchar", 0.0, 1.0, 0.5, null, null, null), + row("c_char", 0.0, 1.0, 0.5, null, null, null), row("c_boolean", null, 1.0, 0.5, null, null, null), - row("c_binary", null, null, 0.5, null, null, null), + row("c_binary", 0.0, null, 0.5, null, null, null), row("p_bigint", null, 1.0, 0.0, null, "2", "2"), - row("p_varchar", null, 1.0, 0.0, null, null, null), + row("p_varchar", 40.0, 1.0, 0.0, null, null, null), row(null, null, null, null, 4.0, null, null))); } finally { From d817709ea346ad72a3205f128bfc1b8a64996a62 Mon Sep 17 00:00:00 2001 From: Piotr Findeisen Date: Mon, 26 Mar 2018 15:27:51 +0200 Subject: [PATCH 10/13] Inline StatisticsEstimator#addPartitionStats's overload --- .../tpch/statistics/StatisticsEstimator.java | 25 ++++++++----------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/presto-tpch/src/main/java/com/facebook/presto/tpch/statistics/StatisticsEstimator.java b/presto-tpch/src/main/java/com/facebook/presto/tpch/statistics/StatisticsEstimator.java index a23eb4d5978a5..451f5a486cfb9 100644 --- a/presto-tpch/src/main/java/com/facebook/presto/tpch/statistics/StatisticsEstimator.java +++ b/presto-tpch/src/main/java/com/facebook/presto/tpch/statistics/StatisticsEstimator.java @@ -67,27 +67,24 @@ else if (columnValuesRestrictions.values().stream().allMatch(List::isEmpty)) { private TableStatisticsData addPartitionStats(TableStatisticsData left, TableStatisticsData right, TpchColumn partitionColumn) { - return new TableStatisticsData( - left.getRowCount() + right.getRowCount(), - addPartitionStats(left.getColumns(), right.getColumns(), partitionColumn)); - } - - private Map addPartitionStats(Map leftColumns, Map rightColumns, TpchColumn partitionColumn) - { - return leftColumns.entrySet().stream().collect(toImmutableMap( + Map combinedColumnStats = left.getColumns().entrySet().stream().collect(toImmutableMap( Map.Entry::getKey, entry -> { String columnName = entry.getKey(); ColumnStatisticsData leftStats = entry.getValue(); - ColumnStatisticsData rightStats = rightColumns.get(columnName); - return new ColumnStatisticsData( - addUniqueValuesCount(partitionColumn, columnName, leftStats, rightStats), - combine(leftStats.getMin(), rightStats.getMin(), this::min), - combine(leftStats.getMax(), rightStats.getMax(), this::max)); + ColumnStatisticsData rightStats = right.getColumns().get(columnName); + Optional ndv = addDistinctValuesCount(partitionColumn, columnName, leftStats, rightStats); + Optional min = combine(leftStats.getMin(), rightStats.getMin(), this::min); + Optional max = combine(leftStats.getMax(), rightStats.getMax(), this::max); + return new ColumnStatisticsData(ndv, min, max); })); + + return new TableStatisticsData( + left.getRowCount() + right.getRowCount(), + combinedColumnStats); } - private Optional addUniqueValuesCount(TpchColumn partitionColumn, String columnName, ColumnStatisticsData leftStats, ColumnStatisticsData rightStats) + private Optional addDistinctValuesCount(TpchColumn partitionColumn, String columnName, ColumnStatisticsData leftStats, ColumnStatisticsData rightStats) { //unique values count can't be added between different partitions //for columns other than the partition column (because almost certainly there are duplicates) From fc5419dab599cad91111eba474bbed8bda9db815 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Osipiuk?= Date: Mon, 26 Mar 2018 15:27:52 +0200 Subject: [PATCH 11/13] Update TPC-H statistics with data size --- .../presto/tests/TestLocalQueries.java | 4 +- .../facebook/presto/tpch/TpchMetadata.java | 1 + .../tpch/statistics/ColumnStatisticsData.java | 14 +- .../tpch/statistics/StatisticsEstimator.java | 5 +- .../tpch/statistics/sf0.01/customer.json | 24 ++- .../tpch/statistics/sf0.01/lineitem.json | 48 ++++-- .../tpch/statistics/sf0.01/nation.json | 12 +- .../tpch/statistics/sf0.01/orders.json | 27 ++-- .../sf0.01/orders.o_orderstatus.F.json | 27 ++-- .../sf0.01/orders.o_orderstatus.O.json | 27 ++-- .../sf0.01/orders.o_orderstatus.P.json | 27 ++-- .../tpch/statistics/sf0.01/part.json | 27 ++-- .../tpch/statistics/sf0.01/partsupp.json | 15 +- .../tpch/statistics/sf0.01/region.json | 9 +- .../tpch/statistics/sf0.01/supplier.json | 21 ++- .../tpch/statistics/sf1.0/customer.json | 24 ++- .../tpch/statistics/sf1.0/lineitem.json | 48 ++++-- .../tpch/statistics/sf1.0/nation.json | 12 +- .../tpch/statistics/sf1.0/orders.json | 27 ++-- .../sf1.0/orders.o_orderstatus.F.json | 27 ++-- .../sf1.0/orders.o_orderstatus.O.json | 27 ++-- .../sf1.0/orders.o_orderstatus.P.json | 27 ++-- .../resources/tpch/statistics/sf1.0/part.json | 27 ++-- .../tpch/statistics/sf1.0/partsupp.json | 15 +- .../tpch/statistics/sf1.0/region.json | 9 +- .../tpch/statistics/sf1.0/supplier.json | 21 ++- .../tpch/statistics/sf3000.0/customer.json | 71 ++++---- .../tpch/statistics/sf3000.0/lineitem.json | 151 +++++++++--------- .../tpch/statistics/sf3000.0/nation.json | 40 ++--- .../tpch/statistics/sf3000.0/orders.json | 86 +++++----- .../tpch/statistics/sf3000.0/part.json | 80 +++++----- .../tpch/statistics/sf3000.0/partsupp.json | 53 +++--- .../tpch/statistics/sf3000.0/region.json | 34 ++-- .../tpch/statistics/sf3000.0/supplier.json | 64 ++++---- .../presto/tpch/TestTpchMetadata.java | 51 +++--- .../statistics/ColumnStatisticsRecorder.java | 24 ++- .../statistics/TableStatisticsRecorder.java | 2 +- 37 files changed, 723 insertions(+), 485 deletions(-) diff --git a/presto-tests/src/test/java/com/facebook/presto/tests/TestLocalQueries.java b/presto-tests/src/test/java/com/facebook/presto/tests/TestLocalQueries.java index 1e0b28da17ee4..db31a691bc825 100644 --- a/presto-tests/src/test/java/com/facebook/presto/tests/TestLocalQueries.java +++ b/presto-tests/src/test/java/com/facebook/presto/tests/TestLocalQueries.java @@ -74,8 +74,8 @@ public void testShowColumnStats() MaterializedResult expectedStatistics = resultBuilder(getSession(), VARCHAR, DOUBLE, DOUBLE, DOUBLE, DOUBLE, VARCHAR, VARCHAR) .row("regionkey", null, 5.0, 0.0, null, "0", "4") - .row("name", null, 25.0, 0.0, null, "ALGERIA", "VIETNAM") - .row("comment", null, 25.0, 0.0, null, " haggle. carefully final deposit...", "y final packages. slow foxes caj...") + .row("name", 177.0, 25.0, 0.0, null, "ALGERIA", "VIETNAM") + .row("comment", 1857.0, 25.0, 0.0, null, " haggle. carefully final deposit...", "y final packages. slow foxes caj...") .row("nationkey", null, 25.0, 0.0, null, "0", "24") .row(null, null, null, null, 25.0, null, null) .build(); diff --git a/presto-tpch/src/main/java/com/facebook/presto/tpch/TpchMetadata.java b/presto-tpch/src/main/java/com/facebook/presto/tpch/TpchMetadata.java index 88580352c2802..4356920c38706 100644 --- a/presto-tpch/src/main/java/com/facebook/presto/tpch/TpchMetadata.java +++ b/presto-tpch/src/main/java/com/facebook/presto/tpch/TpchMetadata.java @@ -374,6 +374,7 @@ private ColumnStatistics toColumnStatistics(ColumnStatisticsData stats, Type col return ColumnStatistics.builder() .addRange(rangeBuilder -> rangeBuilder .setDistinctValuesCount(stats.getDistinctValuesCount().map(Estimate::new).orElse(Estimate.unknownValue())) + .setDataSize(stats.getDataSize().map(Estimate::new).orElse(Estimate.unknownValue())) .setLowValue(stats.getMin().map(value -> toPrestoValue(value, columnType))) .setHighValue(stats.getMax().map(value -> toPrestoValue(value, columnType))) .setFraction(new Estimate((1)))) diff --git a/presto-tpch/src/main/java/com/facebook/presto/tpch/statistics/ColumnStatisticsData.java b/presto-tpch/src/main/java/com/facebook/presto/tpch/statistics/ColumnStatisticsData.java index 0bc7ec309179d..d35792f485c8e 100644 --- a/presto-tpch/src/main/java/com/facebook/presto/tpch/statistics/ColumnStatisticsData.java +++ b/presto-tpch/src/main/java/com/facebook/presto/tpch/statistics/ColumnStatisticsData.java @@ -25,26 +25,29 @@ public class ColumnStatisticsData private final Optional distinctValuesCount; private final Optional min; private final Optional max; + private final Optional dataSize; @JsonCreator public ColumnStatisticsData( @JsonProperty("distinctValuesCount") Optional distinctValuesCount, @JsonProperty("min") Optional min, - @JsonProperty("max") Optional max) + @JsonProperty("max") Optional max, + @JsonProperty("dataSize") Optional dataSize) { this.distinctValuesCount = requireNonNull(distinctValuesCount, "distinctValuesCount is null"); this.min = requireNonNull(min); this.max = requireNonNull(max); + this.dataSize = requireNonNull(dataSize, "dataSize is null"); } public static ColumnStatisticsData empty() { - return new ColumnStatisticsData(Optional.empty(), Optional.empty(), Optional.empty()); + return new ColumnStatisticsData(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); } public static ColumnStatisticsData zero() { - return new ColumnStatisticsData(Optional.of(0L), Optional.empty(), Optional.empty()); + return new ColumnStatisticsData(Optional.of(0L), Optional.empty(), Optional.empty(), Optional.of(0L)); } public Optional getDistinctValuesCount() @@ -61,4 +64,9 @@ public Optional getMax() { return max; } + + public Optional getDataSize() + { + return dataSize; + } } diff --git a/presto-tpch/src/main/java/com/facebook/presto/tpch/statistics/StatisticsEstimator.java b/presto-tpch/src/main/java/com/facebook/presto/tpch/statistics/StatisticsEstimator.java index 451f5a486cfb9..d45a1df5d6186 100644 --- a/presto-tpch/src/main/java/com/facebook/presto/tpch/statistics/StatisticsEstimator.java +++ b/presto-tpch/src/main/java/com/facebook/presto/tpch/statistics/StatisticsEstimator.java @@ -76,7 +76,10 @@ private TableStatisticsData addPartitionStats(TableStatisticsData left, TableSta Optional ndv = addDistinctValuesCount(partitionColumn, columnName, leftStats, rightStats); Optional min = combine(leftStats.getMin(), rightStats.getMin(), this::min); Optional max = combine(leftStats.getMax(), rightStats.getMax(), this::max); - return new ColumnStatisticsData(ndv, min, max); + // Sum data sizes only if both known + Optional dataSize = leftStats.getDataSize() + .flatMap(leftDataSize -> rightStats.getDataSize().map(rightDataSize -> leftDataSize + rightDataSize)); + return new ColumnStatisticsData(ndv, min, max, dataSize); })); return new TableStatisticsData( diff --git a/presto-tpch/src/main/resources/tpch/statistics/sf0.01/customer.json b/presto-tpch/src/main/resources/tpch/statistics/sf0.01/customer.json index 63d3f174e8dfd..2a3a1a6df8593 100644 --- a/presto-tpch/src/main/resources/tpch/statistics/sf0.01/customer.json +++ b/presto-tpch/src/main/resources/tpch/statistics/sf0.01/customer.json @@ -4,42 +4,50 @@ "c_custkey" : { "distinctValuesCount" : 1500, "min" : 1, - "max" : 1500 + "max" : 1500, + "dataSize" : null }, "c_name" : { "distinctValuesCount" : 1500, "min" : "Customer#000000001", - "max" : "Customer#000001500" + "max" : "Customer#000001500", + "dataSize" : 27000 }, "c_address" : { "distinctValuesCount" : 1500, "min" : " ,cIZ,06Kg", - "max" : "zyWvi,SGc,tXTls" + "max" : "zyWvi,SGc,tXTls", + "dataSize" : 37090 }, "c_nationkey" : { "distinctValuesCount" : 25, "min" : 0, - "max" : 24 + "max" : 24, + "dataSize" : null }, "c_phone" : { "distinctValuesCount" : 1500, "min" : "10-109-430-5638", - "max" : "34-992-529-2023" + "max" : "34-992-529-2023", + "dataSize" : 22500 }, "c_acctbal" : { "distinctValuesCount" : 1499, "min" : -994.79, - "max" : 9987.71 + "max" : 9987.71, + "dataSize" : null }, "c_mktsegment" : { "distinctValuesCount" : 5, "min" : "AUTOMOBILE", - "max" : "MACHINERY" + "max" : "MACHINERY", + "dataSize" : 45 }, "c_comment" : { "distinctValuesCount" : 1500, "min" : " about the carefully ironic pinto beans. accoun", - "max" : "ymptotes. ironic, unusual notornis wake after the ironic, special deposits. blithely fina" + "max" : "ymptotes. ironic, unusual notornis wake after the ironic, special deposits. blithely fina", + "dataSize" : 109800 } } } diff --git a/presto-tpch/src/main/resources/tpch/statistics/sf0.01/lineitem.json b/presto-tpch/src/main/resources/tpch/statistics/sf0.01/lineitem.json index 5a9dce0f815bf..528819f6066f5 100644 --- a/presto-tpch/src/main/resources/tpch/statistics/sf0.01/lineitem.json +++ b/presto-tpch/src/main/resources/tpch/statistics/sf0.01/lineitem.json @@ -4,82 +4,98 @@ "l_orderkey" : { "distinctValuesCount" : 15000, "min" : 1, - "max" : 60000 + "max" : 60000, + "dataSize" : null }, "l_partkey" : { "distinctValuesCount" : 2000, "min" : 1, - "max" : 2000 + "max" : 2000, + "dataSize" : null }, "l_suppkey" : { "distinctValuesCount" : 100, "min" : 1, - "max" : 100 + "max" : 100, + "dataSize" : null }, "l_linenumber" : { "distinctValuesCount" : 7, "min" : 1, - "max" : 7 + "max" : 7, + "dataSize" : null }, "l_quantity" : { "distinctValuesCount" : 50, "min" : 1.0, - "max" : 50.0 + "max" : 50.0, + "dataSize" : null }, "l_extendedprice" : { "distinctValuesCount" : 35921, "min" : 904.0, - "max" : 94949.5 + "max" : 94949.5, + "dataSize" : null }, "l_discount" : { "distinctValuesCount" : 11, "min" : 0.0, - "max" : 0.1 + "max" : 0.1, + "dataSize" : null }, "l_tax" : { "distinctValuesCount" : 9, "min" : 0.0, - "max" : 0.08 + "max" : 0.08, + "dataSize" : null }, "l_returnflag" : { "distinctValuesCount" : 3, "min" : "A", - "max" : "R" + "max" : "R", + "dataSize" : 3 }, "l_linestatus" : { "distinctValuesCount" : 2, "min" : "F", - "max" : "O" + "max" : "O", + "dataSize" : 2 }, "l_shipdate" : { "distinctValuesCount" : 2518, "min" : 8038, - "max" : 10559 + "max" : 10559, + "dataSize" : null }, "l_commitdate" : { "distinctValuesCount" : 2460, "min" : 8067, - "max" : 10527 + "max" : 10527, + "dataSize" : null }, "l_receiptdate" : { "distinctValuesCount" : 2529, "min" : 8043, - "max" : 10585 + "max" : 10585, + "dataSize" : null }, "l_shipinstruct" : { "distinctValuesCount" : 4, "min" : "COLLECT COD", - "max" : "TAKE BACK RETURN" + "max" : "TAKE BACK RETURN", + "dataSize" : 48 }, "l_shipmode" : { "distinctValuesCount" : 7, "min" : "AIR", - "max" : "TRUCK" + "max" : "TRUCK", + "dataSize" : 30 }, "l_comment" : { "distinctValuesCount" : 58616, "min" : " Tiresias ", - "max" : "zzle: pending i" + "max" : "zzle: pending i", + "dataSize" : 1578058 } } } diff --git a/presto-tpch/src/main/resources/tpch/statistics/sf0.01/nation.json b/presto-tpch/src/main/resources/tpch/statistics/sf0.01/nation.json index 69b02b9c4c1d0..a67a6d164ff2a 100644 --- a/presto-tpch/src/main/resources/tpch/statistics/sf0.01/nation.json +++ b/presto-tpch/src/main/resources/tpch/statistics/sf0.01/nation.json @@ -4,22 +4,26 @@ "n_nationkey" : { "distinctValuesCount" : 25, "min" : 0, - "max" : 24 + "max" : 24, + "dataSize" : null }, "n_name" : { "distinctValuesCount" : 25, "min" : "ALGERIA", - "max" : "VIETNAM" + "max" : "VIETNAM", + "dataSize" : 177 }, "n_regionkey" : { "distinctValuesCount" : 5, "min" : 0, - "max" : 4 + "max" : 4, + "dataSize" : null }, "n_comment" : { "distinctValuesCount" : 25, "min" : " haggle. carefully final deposits detect slyly agai", - "max" : "y final packages. slow foxes cajole quickly. quickly silent platelets breach ironic accounts. unusual pinto be" + "max" : "y final packages. slow foxes cajole quickly. quickly silent platelets breach ironic accounts. unusual pinto be", + "dataSize" : 1857 } } } diff --git a/presto-tpch/src/main/resources/tpch/statistics/sf0.01/orders.json b/presto-tpch/src/main/resources/tpch/statistics/sf0.01/orders.json index 33e36711a02c5..7bef0bba26a75 100644 --- a/presto-tpch/src/main/resources/tpch/statistics/sf0.01/orders.json +++ b/presto-tpch/src/main/resources/tpch/statistics/sf0.01/orders.json @@ -4,47 +4,56 @@ "o_orderkey" : { "distinctValuesCount" : 15000, "min" : 1, - "max" : 60000 + "max" : 60000, + "dataSize" : null }, "o_custkey" : { "distinctValuesCount" : 1000, "min" : 1, - "max" : 1499 + "max" : 1499, + "dataSize" : null }, "o_orderstatus" : { "distinctValuesCount" : 3, "min" : "F", - "max" : "P" + "max" : "P", + "dataSize" : 3 }, "o_totalprice" : { "distinctValuesCount" : 14996, "min" : 874.89, - "max" : 466001.28 + "max" : 466001.28, + "dataSize" : null }, "o_orderdate" : { "distinctValuesCount" : 2401, "min" : 8035, - "max" : 10440 + "max" : 10440, + "dataSize" : null }, "o_orderpriority" : { "distinctValuesCount" : 5, "min" : "1-URGENT", - "max" : "5-LOW" + "max" : "5-LOW", + "dataSize" : 42 }, "o_clerk" : { "distinctValuesCount" : 1000, "min" : "Clerk#000000001", - "max" : "Clerk#000001000" + "max" : "Clerk#000001000", + "dataSize" : 15000 }, "o_shippriority" : { "distinctValuesCount" : 1, "min" : 0, - "max" : 0 + "max" : 0, + "dataSize" : null }, "o_comment" : { "distinctValuesCount" : 14995, "min" : " about the accounts. slyly express accounts wa", - "max" : "zzle. carefully enticing deposits nag furio" + "max" : "zzle. carefully enticing deposits nag furio", + "dataSize" : 727249 } } } diff --git a/presto-tpch/src/main/resources/tpch/statistics/sf0.01/orders.o_orderstatus.F.json b/presto-tpch/src/main/resources/tpch/statistics/sf0.01/orders.o_orderstatus.F.json index b4ffb5839e079..fa5fea3907cb6 100644 --- a/presto-tpch/src/main/resources/tpch/statistics/sf0.01/orders.o_orderstatus.F.json +++ b/presto-tpch/src/main/resources/tpch/statistics/sf0.01/orders.o_orderstatus.F.json @@ -4,47 +4,56 @@ "o_orderkey" : { "distinctValuesCount" : 7304, "min" : 3, - "max" : 59975 + "max" : 59975, + "dataSize" : null }, "o_custkey" : { "distinctValuesCount" : 996, "min" : 1, - "max" : 1499 + "max" : 1499, + "dataSize" : null }, "o_orderstatus" : { "distinctValuesCount" : 1, "min" : "F", - "max" : "F" + "max" : "F", + "dataSize" : 1 }, "o_totalprice" : { "distinctValuesCount" : 7303, "min" : 874.89, - "max" : 408345.74 + "max" : 408345.74, + "dataSize" : null }, "o_orderdate" : { "distinctValuesCount" : 1213, "min" : 8035, - "max" : 9277 + "max" : 9277, + "dataSize" : null }, "o_orderpriority" : { "distinctValuesCount" : 5, "min" : "1-URGENT", - "max" : "5-LOW" + "max" : "5-LOW", + "dataSize" : 42 }, "o_clerk" : { "distinctValuesCount" : 1000, "min" : "Clerk#000000001", - "max" : "Clerk#000001000" + "max" : "Clerk#000001000", + "dataSize" : 15000 }, "o_shippriority" : { "distinctValuesCount" : 1, "min" : 0, - "max" : 0 + "max" : 0, + "dataSize" : null }, "o_comment" : { "distinctValuesCount" : 7303, "min" : " about the blithely ironic requests. fluffily ironic ", - "max" : "zzle final, final dependencies. final, final accounts are blith" + "max" : "zzle final, final dependencies. final, final accounts are blith", + "dataSize" : 354862 } } } diff --git a/presto-tpch/src/main/resources/tpch/statistics/sf0.01/orders.o_orderstatus.O.json b/presto-tpch/src/main/resources/tpch/statistics/sf0.01/orders.o_orderstatus.O.json index 7b9ba1fd3a923..ae93908684bc6 100644 --- a/presto-tpch/src/main/resources/tpch/statistics/sf0.01/orders.o_orderstatus.O.json +++ b/presto-tpch/src/main/resources/tpch/statistics/sf0.01/orders.o_orderstatus.O.json @@ -4,47 +4,56 @@ "o_orderkey" : { "distinctValuesCount" : 7333, "min" : 1, - "max" : 59974 + "max" : 59974, + "dataSize" : null }, "o_custkey" : { "distinctValuesCount" : 998, "min" : 1, - "max" : 1499 + "max" : 1499, + "dataSize" : null }, "o_orderstatus" : { "distinctValuesCount" : 1, "min" : "O", - "max" : "O" + "max" : "O", + "dataSize" : 1 }, "o_totalprice" : { "distinctValuesCount" : 7331, "min" : 974.04, - "max" : 466001.28 + "max" : 466001.28, + "dataSize" : null }, "o_orderdate" : { "distinctValuesCount" : 1213, "min" : 9197, - "max" : 10440 + "max" : 10440, + "dataSize" : null }, "o_orderpriority" : { "distinctValuesCount" : 5, "min" : "1-URGENT", - "max" : "5-LOW" + "max" : "5-LOW", + "dataSize" : 42 }, "o_clerk" : { "distinctValuesCount" : 1000, "min" : "Clerk#000000001", - "max" : "Clerk#000001000" + "max" : "Clerk#000001000", + "dataSize" : 15000 }, "o_shippriority" : { "distinctValuesCount" : 1, "min" : 0, - "max" : 0 + "max" : 0, + "dataSize" : null }, "o_comment" : { "distinctValuesCount" : 7333, "min" : " about the accounts. slyly express accounts wa", - "max" : "zzle. carefully enticing deposits nag furio" + "max" : "zzle. carefully enticing deposits nag furio", + "dataSize" : 354754 } } } diff --git a/presto-tpch/src/main/resources/tpch/statistics/sf0.01/orders.o_orderstatus.P.json b/presto-tpch/src/main/resources/tpch/statistics/sf0.01/orders.o_orderstatus.P.json index e0e9d2a2f30fc..17b8f7d6808f7 100644 --- a/presto-tpch/src/main/resources/tpch/statistics/sf0.01/orders.o_orderstatus.P.json +++ b/presto-tpch/src/main/resources/tpch/statistics/sf0.01/orders.o_orderstatus.P.json @@ -4,47 +4,56 @@ "o_orderkey" : { "distinctValuesCount" : 363, "min" : 65, - "max" : 60000 + "max" : 60000, + "dataSize" : null }, "o_custkey" : { "distinctValuesCount" : 304, "min" : 16, - "max" : 1499 + "max" : 1499, + "dataSize" : null }, "o_orderstatus" : { "distinctValuesCount" : 1, "min" : "P", - "max" : "P" + "max" : "P", + "dataSize" : 1 }, "o_totalprice" : { "distinctValuesCount" : 363, "min" : 16145.49, - "max" : 376904.18 + "max" : 376904.18, + "dataSize" : null }, "o_orderdate" : { "distinctValuesCount" : 107, "min" : 9182, - "max" : 9292 + "max" : 9292, + "dataSize" : null }, "o_orderpriority" : { "distinctValuesCount" : 5, "min" : "1-URGENT", - "max" : "5-LOW" + "max" : "5-LOW", + "dataSize" : 42 }, "o_clerk" : { "distinctValuesCount" : 310, "min" : "Clerk#000000001", - "max" : "Clerk#000001000" + "max" : "Clerk#000001000", + "dataSize" : 4650 }, "o_shippriority" : { "distinctValuesCount" : 1, "min" : 0, - "max" : 0 + "max" : 0, + "dataSize" : null }, "o_comment" : { "distinctValuesCount" : 363, "min" : " according to the final asymptotes. carefully silent de", - "max" : "yly pending platelets sleep c" + "max" : "yly pending platelets sleep c", + "dataSize" : 17725 } } } diff --git a/presto-tpch/src/main/resources/tpch/statistics/sf0.01/part.json b/presto-tpch/src/main/resources/tpch/statistics/sf0.01/part.json index 899031737c46d..24b80efea5efd 100644 --- a/presto-tpch/src/main/resources/tpch/statistics/sf0.01/part.json +++ b/presto-tpch/src/main/resources/tpch/statistics/sf0.01/part.json @@ -4,47 +4,56 @@ "p_partkey" : { "distinctValuesCount" : 2000, "min" : 1, - "max" : 2000 + "max" : 2000, + "dataSize" : null }, "p_name" : { "distinctValuesCount" : 2000, "min" : "almond aquamarine mint misty red", - "max" : "yellow white puff orange rosy" + "max" : "yellow white puff orange rosy", + "dataSize" : 65314 }, "p_mfgr" : { "distinctValuesCount" : 5, "min" : "Manufacturer#1", - "max" : "Manufacturer#5" + "max" : "Manufacturer#5", + "dataSize" : 70 }, "p_brand" : { "distinctValuesCount" : 25, "min" : "Brand#11", - "max" : "Brand#55" + "max" : "Brand#55", + "dataSize" : 200 }, "p_type" : { "distinctValuesCount" : 150, "min" : "ECONOMY ANODIZED BRASS", - "max" : "STANDARD POLISHED TIN" + "max" : "STANDARD POLISHED TIN", + "dataSize" : 3090 }, "p_size" : { "distinctValuesCount" : 50, "min" : 1, - "max" : 50 + "max" : 50, + "dataSize" : null }, "p_container" : { "distinctValuesCount" : 40, "min" : "JUMBO BAG", - "max" : "WRAP PKG" + "max" : "WRAP PKG", + "dataSize" : 303 }, "p_retailprice" : { "distinctValuesCount" : 1099, "min" : 901.0, - "max" : 1900.99 + "max" : 1900.99, + "dataSize" : null }, "p_comment" : { "distinctValuesCount" : 1959, "min" : " about the furio", - "max" : "zzle among t" + "max" : "zzle among t", + "dataSize" : 26839 } } } diff --git a/presto-tpch/src/main/resources/tpch/statistics/sf0.01/partsupp.json b/presto-tpch/src/main/resources/tpch/statistics/sf0.01/partsupp.json index 1b8a4d4ae0902..599e45c7c57f6 100644 --- a/presto-tpch/src/main/resources/tpch/statistics/sf0.01/partsupp.json +++ b/presto-tpch/src/main/resources/tpch/statistics/sf0.01/partsupp.json @@ -4,27 +4,32 @@ "ps_partkey" : { "distinctValuesCount" : 2000, "min" : 1, - "max" : 2000 + "max" : 2000, + "dataSize" : null }, "ps_suppkey" : { "distinctValuesCount" : 100, "min" : 1, - "max" : 100 + "max" : 100, + "dataSize" : null }, "ps_availqty" : { "distinctValuesCount" : 5497, "min" : 3, - "max" : 9998 + "max" : 9998, + "dataSize" : null }, "ps_supplycost" : { "distinctValuesCount" : 7665, "min" : 1.05, - "max" : 999.99 + "max" : 999.99, + "dataSize" : null }, "ps_comment" : { "distinctValuesCount" : 8000, "min" : " about the instructions. carefully final platelets cajole carefully furiously regular requests. carefully regular theodolites along the carefully regular pinto beans haggle about ", - "max" : "zzle blithely about the furiously final foxes. pen" + "max" : "zzle blithely about the furiously final foxes. pen", + "dataSize" : 992530 } } } diff --git a/presto-tpch/src/main/resources/tpch/statistics/sf0.01/region.json b/presto-tpch/src/main/resources/tpch/statistics/sf0.01/region.json index affdb8a3ef65a..217aaf4d92550 100644 --- a/presto-tpch/src/main/resources/tpch/statistics/sf0.01/region.json +++ b/presto-tpch/src/main/resources/tpch/statistics/sf0.01/region.json @@ -4,17 +4,20 @@ "r_regionkey" : { "distinctValuesCount" : 5, "min" : 0, - "max" : 4 + "max" : 4, + "dataSize" : null }, "r_name" : { "distinctValuesCount" : 5, "min" : "AFRICA", - "max" : "MIDDLE EAST" + "max" : "MIDDLE EAST", + "dataSize" : 34 }, "r_comment" : { "distinctValuesCount" : 5, "min" : "ges. thinly even pinto beans ca", - "max" : "uickly special accounts cajole carefully blithely close requests. carefully final asymptotes haggle furiousl" + "max" : "uickly special accounts cajole carefully blithely close requests. carefully final asymptotes haggle furiousl", + "dataSize" : 330 } } } diff --git a/presto-tpch/src/main/resources/tpch/statistics/sf0.01/supplier.json b/presto-tpch/src/main/resources/tpch/statistics/sf0.01/supplier.json index b202094d2b1cb..d072a606fe175 100644 --- a/presto-tpch/src/main/resources/tpch/statistics/sf0.01/supplier.json +++ b/presto-tpch/src/main/resources/tpch/statistics/sf0.01/supplier.json @@ -4,37 +4,44 @@ "s_suppkey" : { "distinctValuesCount" : 100, "min" : 1, - "max" : 100 + "max" : 100, + "dataSize" : null }, "s_name" : { "distinctValuesCount" : 100, "min" : "Supplier#000000001", - "max" : "Supplier#000000100" + "max" : "Supplier#000000100", + "dataSize" : 1800 }, "s_address" : { "distinctValuesCount" : 100, "min" : " N kD4on9OM Ipw3,gf0JBoQDd7tgrzrddZ", - "max" : "zyIeWzbbpkTV37vm1nmSGBxSgd2Kp" + "max" : "zyIeWzbbpkTV37vm1nmSGBxSgd2Kp", + "dataSize" : 2537 }, "s_nationkey" : { "distinctValuesCount" : 25, "min" : 0, - "max" : 24 + "max" : 24, + "dataSize" : null }, "s_phone" : { "distinctValuesCount" : 100, "min" : "10-470-144-1330", - "max" : "34-876-912-6007" + "max" : "34-876-912-6007", + "dataSize" : 1500 }, "s_acctbal" : { "distinctValuesCount" : 100, "min" : -966.2, - "max" : 9915.24 + "max" : 9915.24, + "dataSize" : null }, "s_comment" : { "distinctValuesCount" : 100, "min" : " across the furiously regular platelets wake even deposits. quickly express she", - "max" : "yly final accounts could are carefully. fluffily ironic instruct" + "max" : "yly final accounts could are carefully. fluffily ironic instruct", + "dataSize" : 6115 } } } diff --git a/presto-tpch/src/main/resources/tpch/statistics/sf1.0/customer.json b/presto-tpch/src/main/resources/tpch/statistics/sf1.0/customer.json index 73bd8dfa91ff0..cfe677f813ee1 100644 --- a/presto-tpch/src/main/resources/tpch/statistics/sf1.0/customer.json +++ b/presto-tpch/src/main/resources/tpch/statistics/sf1.0/customer.json @@ -4,42 +4,50 @@ "c_custkey" : { "distinctValuesCount" : 150000, "min" : 1, - "max" : 150000 + "max" : 150000, + "dataSize" : null }, "c_name" : { "distinctValuesCount" : 150000, "min" : "Customer#000000001", - "max" : "Customer#000150000" + "max" : "Customer#000150000", + "dataSize" : 2700000 }, "c_address" : { "distinctValuesCount" : 150000, "min" : " 2uZwVhQvwA", - "max" : "zzxGktzXTMKS1BxZlgQ9nqQ" + "max" : "zzxGktzXTMKS1BxZlgQ9nqQ", + "dataSize" : 3758056 }, "c_nationkey" : { "distinctValuesCount" : 25, "min" : 0, - "max" : 24 + "max" : 24, + "dataSize" : null }, "c_phone" : { "distinctValuesCount" : 150000, "min" : "10-100-106-1617", - "max" : "34-999-618-6881" + "max" : "34-999-618-6881", + "dataSize" : 2250000 }, "c_acctbal" : { "distinctValuesCount" : 140187, "min" : -999.99, - "max" : 9999.99 + "max" : 9999.99, + "dataSize" : null }, "c_mktsegment" : { "distinctValuesCount" : 5, "min" : "AUTOMOBILE", - "max" : "MACHINERY" + "max" : "MACHINERY", + "dataSize" : 45 }, "c_comment" : { "distinctValuesCount" : 149968, "min" : " Tiresias according to the slyly blithe instructions detect quickly at the slyly express courts. express dinos wake ", - "max" : "zzle. blithely regular instructions cajol" + "max" : "zzle. blithely regular instructions cajol", + "dataSize" : 10873942 } } } diff --git a/presto-tpch/src/main/resources/tpch/statistics/sf1.0/lineitem.json b/presto-tpch/src/main/resources/tpch/statistics/sf1.0/lineitem.json index b259bf0e0216b..eb9d93aa2b00d 100644 --- a/presto-tpch/src/main/resources/tpch/statistics/sf1.0/lineitem.json +++ b/presto-tpch/src/main/resources/tpch/statistics/sf1.0/lineitem.json @@ -4,82 +4,98 @@ "l_orderkey" : { "distinctValuesCount" : 1500000, "min" : 1, - "max" : 6000000 + "max" : 6000000, + "dataSize" : null }, "l_partkey" : { "distinctValuesCount" : 200000, "min" : 1, - "max" : 200000 + "max" : 200000, + "dataSize" : null }, "l_suppkey" : { "distinctValuesCount" : 10000, "min" : 1, - "max" : 10000 + "max" : 10000, + "dataSize" : null }, "l_linenumber" : { "distinctValuesCount" : 7, "min" : 1, - "max" : 7 + "max" : 7, + "dataSize" : null }, "l_quantity" : { "distinctValuesCount" : 50, "min" : 1.0, - "max" : 50.0 + "max" : 50.0, + "dataSize" : null }, "l_extendedprice" : { "distinctValuesCount" : 933900, "min" : 901.0, - "max" : 104949.5 + "max" : 104949.5, + "dataSize" : null }, "l_discount" : { "distinctValuesCount" : 11, "min" : 0.0, - "max" : 0.1 + "max" : 0.1, + "dataSize" : null }, "l_tax" : { "distinctValuesCount" : 9, "min" : 0.0, - "max" : 0.08 + "max" : 0.08, + "dataSize" : null }, "l_returnflag" : { "distinctValuesCount" : 3, "min" : "A", - "max" : "R" + "max" : "R", + "dataSize" : 3 }, "l_linestatus" : { "distinctValuesCount" : 2, "min" : "F", - "max" : "O" + "max" : "O", + "dataSize" : 2 }, "l_shipdate" : { "distinctValuesCount" : 2526, "min" : 8036, - "max" : 10561 + "max" : 10561, + "dataSize" : null }, "l_commitdate" : { "distinctValuesCount" : 2466, "min" : 8065, - "max" : 10530 + "max" : 10530, + "dataSize" : null }, "l_receiptdate" : { "distinctValuesCount" : 2554, "min" : 8038, - "max" : 10591 + "max" : 10591, + "dataSize" : null }, "l_shipinstruct" : { "distinctValuesCount" : 4, "min" : "COLLECT COD", - "max" : "TAKE BACK RETURN" + "max" : "TAKE BACK RETURN", + "dataSize" : 48 }, "l_shipmode" : { "distinctValuesCount" : 7, "min" : "AIR", - "max" : "TRUCK" + "max" : "TRUCK", + "dataSize" : 30 }, "l_comment" : { "distinctValuesCount" : 4580667, "min" : " Tiresias ", - "max" : "zzle? slyly final platelets sleep quickly. " + "max" : "zzle? slyly final platelets sleep quickly. ", + "dataSize" : 135857609 } } } diff --git a/presto-tpch/src/main/resources/tpch/statistics/sf1.0/nation.json b/presto-tpch/src/main/resources/tpch/statistics/sf1.0/nation.json index 69b02b9c4c1d0..a67a6d164ff2a 100644 --- a/presto-tpch/src/main/resources/tpch/statistics/sf1.0/nation.json +++ b/presto-tpch/src/main/resources/tpch/statistics/sf1.0/nation.json @@ -4,22 +4,26 @@ "n_nationkey" : { "distinctValuesCount" : 25, "min" : 0, - "max" : 24 + "max" : 24, + "dataSize" : null }, "n_name" : { "distinctValuesCount" : 25, "min" : "ALGERIA", - "max" : "VIETNAM" + "max" : "VIETNAM", + "dataSize" : 177 }, "n_regionkey" : { "distinctValuesCount" : 5, "min" : 0, - "max" : 4 + "max" : 4, + "dataSize" : null }, "n_comment" : { "distinctValuesCount" : 25, "min" : " haggle. carefully final deposits detect slyly agai", - "max" : "y final packages. slow foxes cajole quickly. quickly silent platelets breach ironic accounts. unusual pinto be" + "max" : "y final packages. slow foxes cajole quickly. quickly silent platelets breach ironic accounts. unusual pinto be", + "dataSize" : 1857 } } } diff --git a/presto-tpch/src/main/resources/tpch/statistics/sf1.0/orders.json b/presto-tpch/src/main/resources/tpch/statistics/sf1.0/orders.json index 1ff2992c77486..cd2e06e8842f1 100644 --- a/presto-tpch/src/main/resources/tpch/statistics/sf1.0/orders.json +++ b/presto-tpch/src/main/resources/tpch/statistics/sf1.0/orders.json @@ -4,47 +4,56 @@ "o_orderkey" : { "distinctValuesCount" : 1500000, "min" : 1, - "max" : 6000000 + "max" : 6000000, + "dataSize" : null }, "o_custkey" : { "distinctValuesCount" : 99996, "min" : 1, - "max" : 149999 + "max" : 149999, + "dataSize" : null }, "o_orderstatus" : { "distinctValuesCount" : 3, "min" : "F", - "max" : "P" + "max" : "P", + "dataSize" : 3 }, "o_totalprice" : { "distinctValuesCount" : 1464556, "min" : 857.71, - "max" : 555285.16 + "max" : 555285.16, + "dataSize" : null }, "o_orderdate" : { "distinctValuesCount" : 2406, "min" : 8035, - "max" : 10440 + "max" : 10440, + "dataSize" : null }, "o_orderpriority" : { "distinctValuesCount" : 5, "min" : "1-URGENT", - "max" : "5-LOW" + "max" : "5-LOW", + "dataSize" : 42 }, "o_clerk" : { "distinctValuesCount" : 1000, "min" : "Clerk#000000001", - "max" : "Clerk#000001000" + "max" : "Clerk#000001000", + "dataSize" : 15000 }, "o_shippriority" : { "distinctValuesCount" : 1, "min" : 0, - "max" : 0 + "max" : 0, + "dataSize" : null }, "o_comment" : { "distinctValuesCount" : 1482071, "min" : " Tiresias about the blithely ironic a", - "max" : "zzle? furiously ironic instructions among the unusual t" + "max" : "zzle? furiously ironic instructions among the unusual t", + "dataSize" : 72292642 } } } diff --git a/presto-tpch/src/main/resources/tpch/statistics/sf1.0/orders.o_orderstatus.F.json b/presto-tpch/src/main/resources/tpch/statistics/sf1.0/orders.o_orderstatus.F.json index edf6beee8db95..8fb4ed2df2538 100644 --- a/presto-tpch/src/main/resources/tpch/statistics/sf1.0/orders.o_orderstatus.F.json +++ b/presto-tpch/src/main/resources/tpch/statistics/sf1.0/orders.o_orderstatus.F.json @@ -4,47 +4,56 @@ "o_orderkey" : { "distinctValuesCount" : 729413, "min" : 3, - "max" : 5999975 + "max" : 5999975, + "dataSize" : null }, "o_custkey" : { "distinctValuesCount" : 99609, "min" : 1, - "max" : 149999 + "max" : 149999, + "dataSize" : null }, "o_orderstatus" : { "distinctValuesCount" : 1, "min" : "F", - "max" : "F" + "max" : "F", + "dataSize" : 1 }, "o_totalprice" : { "distinctValuesCount" : 720822, "min" : 866.9, - "max" : 555285.16 + "max" : 555285.16, + "dataSize" : null }, "o_orderdate" : { "distinctValuesCount" : 1261, "min" : 8035, - "max" : 9296 + "max" : 9296, + "dataSize" : null }, "o_orderpriority" : { "distinctValuesCount" : 5, "min" : "1-URGENT", - "max" : "5-LOW" + "max" : "5-LOW", + "dataSize" : 42 }, "o_clerk" : { "distinctValuesCount" : 1000, "min" : "Clerk#000000001", - "max" : "Clerk#000001000" + "max" : "Clerk#000001000", + "dataSize" : 15000 }, "o_shippriority" : { "distinctValuesCount" : 1, "min" : 0, - "max" : 0 + "max" : 0, + "dataSize" : null }, "o_comment" : { "distinctValuesCount" : 724600, "min" : " Tiresias above the carefully ironic packages nag about the pend", - "max" : "zzle; ironic accounts affix slyly regular pinto b" + "max" : "zzle; ironic accounts affix slyly regular pinto b", + "dataSize" : 35285413 } } } diff --git a/presto-tpch/src/main/resources/tpch/statistics/sf1.0/orders.o_orderstatus.O.json b/presto-tpch/src/main/resources/tpch/statistics/sf1.0/orders.o_orderstatus.O.json index 67a55246c04a1..785197c490b0b 100644 --- a/presto-tpch/src/main/resources/tpch/statistics/sf1.0/orders.o_orderstatus.O.json +++ b/presto-tpch/src/main/resources/tpch/statistics/sf1.0/orders.o_orderstatus.O.json @@ -4,47 +4,56 @@ "o_orderkey" : { "distinctValuesCount" : 732044, "min" : 1, - "max" : 6000000 + "max" : 6000000, + "dataSize" : null }, "o_custkey" : { "distinctValuesCount" : 99621, "min" : 1, - "max" : 149999 + "max" : 149999, + "dataSize" : null }, "o_orderstatus" : { "distinctValuesCount" : 1, "min" : "O", - "max" : "O" + "max" : "O", + "dataSize" : 1 }, "o_totalprice" : { "distinctValuesCount" : 723368, "min" : 857.71, - "max" : 530604.44 + "max" : 530604.44, + "dataSize" : null }, "o_orderdate" : { "distinctValuesCount" : 1262, "min" : 9178, - "max" : 10440 + "max" : 10440, + "dataSize" : null }, "o_orderpriority" : { "distinctValuesCount" : 5, "min" : "1-URGENT", - "max" : "5-LOW" + "max" : "5-LOW", + "dataSize" : 42 }, "o_clerk" : { "distinctValuesCount" : 1000, "min" : "Clerk#000000001", - "max" : "Clerk#000001000" + "max" : "Clerk#000001000", + "dataSize" : 15000 }, "o_shippriority" : { "distinctValuesCount" : 1, "min" : 0, - "max" : 0 + "max" : 0, + "dataSize" : null }, "o_comment" : { "distinctValuesCount" : 727175, "min" : " Tiresias about the blithely ironic a", - "max" : "zzle? furiously ironic instructions among the unusual t" + "max" : "zzle? furiously ironic instructions among the unusual t", + "dataSize" : 35362715 } } } diff --git a/presto-tpch/src/main/resources/tpch/statistics/sf1.0/orders.o_orderstatus.P.json b/presto-tpch/src/main/resources/tpch/statistics/sf1.0/orders.o_orderstatus.P.json index 06aca6727aeda..4bbc38e30080c 100644 --- a/presto-tpch/src/main/resources/tpch/statistics/sf1.0/orders.o_orderstatus.P.json +++ b/presto-tpch/src/main/resources/tpch/statistics/sf1.0/orders.o_orderstatus.P.json @@ -4,47 +4,56 @@ "o_orderkey" : { "distinctValuesCount" : 38543, "min" : 65, - "max" : 5999875 + "max" : 5999875, + "dataSize" : null }, "o_custkey" : { "distinctValuesCount" : 31310, "min" : 2, - "max" : 149998 + "max" : 149998, + "dataSize" : null }, "o_orderstatus" : { "distinctValuesCount" : 1, "min" : "P", - "max" : "P" + "max" : "P", + "dataSize" : 1 }, "o_totalprice" : { "distinctValuesCount" : 38515, "min" : 2933.43, - "max" : 491549.57 + "max" : 491549.57, + "dataSize" : null }, "o_orderdate" : { "distinctValuesCount" : 120, "min" : 9178, - "max" : 9297 + "max" : 9297, + "dataSize" : null }, "o_orderpriority" : { "distinctValuesCount" : 5, "min" : "1-URGENT", - "max" : "5-LOW" + "max" : "5-LOW", + "dataSize" : 42 }, "o_clerk" : { "distinctValuesCount" : 1000, "min" : "Clerk#000000001", - "max" : "Clerk#000001000" + "max" : "Clerk#000001000", + "dataSize" : 15000 }, "o_shippriority" : { "distinctValuesCount" : 1, "min" : 0, - "max" : 0 + "max" : 0, + "dataSize" : null }, "o_comment" : { "distinctValuesCount" : 38531, "min" : " Tiresias haggle slyly bli", - "max" : "zzle furiously. bold packa" + "max" : "zzle furiously. bold packa", + "dataSize" : 1870700 } } } diff --git a/presto-tpch/src/main/resources/tpch/statistics/sf1.0/part.json b/presto-tpch/src/main/resources/tpch/statistics/sf1.0/part.json index be53775465279..fa530c841bbcd 100644 --- a/presto-tpch/src/main/resources/tpch/statistics/sf1.0/part.json +++ b/presto-tpch/src/main/resources/tpch/statistics/sf1.0/part.json @@ -4,47 +4,56 @@ "p_partkey" : { "distinctValuesCount" : 200000, "min" : 1, - "max" : 200000 + "max" : 200000, + "dataSize" : null }, "p_name" : { "distinctValuesCount" : 199997, "min" : "almond antique blue royal burnished", - "max" : "yellow white seashell lavender black" + "max" : "yellow white seashell lavender black", + "dataSize" : 6550123 }, "p_mfgr" : { "distinctValuesCount" : 5, "min" : "Manufacturer#1", - "max" : "Manufacturer#5" + "max" : "Manufacturer#5", + "dataSize" : 70 }, "p_brand" : { "distinctValuesCount" : 25, "min" : "Brand#11", - "max" : "Brand#55" + "max" : "Brand#55", + "dataSize" : 200 }, "p_type" : { "distinctValuesCount" : 150, "min" : "ECONOMY ANODIZED BRASS", - "max" : "STANDARD POLISHED TIN" + "max" : "STANDARD POLISHED TIN", + "dataSize" : 3090 }, "p_size" : { "distinctValuesCount" : 50, "min" : 1, - "max" : 50 + "max" : 50, + "dataSize" : null }, "p_container" : { "distinctValuesCount" : 40, "min" : "JUMBO BAG", - "max" : "WRAP PKG" + "max" : "WRAP PKG", + "dataSize" : 303 }, "p_retailprice" : { "distinctValuesCount" : 20899, "min" : 901.0, - "max" : 2098.99 + "max" : 2098.99, + "dataSize" : null }, "p_comment" : { "distinctValuesCount" : 131753, "min" : " Tire", - "max" : "zzle. quickly si" + "max" : "zzle. quickly si", + "dataSize" : 2038351 } } } diff --git a/presto-tpch/src/main/resources/tpch/statistics/sf1.0/partsupp.json b/presto-tpch/src/main/resources/tpch/statistics/sf1.0/partsupp.json index df9b707120a48..6f17650d14ceb 100644 --- a/presto-tpch/src/main/resources/tpch/statistics/sf1.0/partsupp.json +++ b/presto-tpch/src/main/resources/tpch/statistics/sf1.0/partsupp.json @@ -4,27 +4,32 @@ "ps_partkey" : { "distinctValuesCount" : 200000, "min" : 1, - "max" : 200000 + "max" : 200000, + "dataSize" : null }, "ps_suppkey" : { "distinctValuesCount" : 10000, "min" : 1, - "max" : 10000 + "max" : 10000, + "dataSize" : null }, "ps_availqty" : { "distinctValuesCount" : 9999, "min" : 1, - "max" : 9999 + "max" : 9999, + "dataSize" : null }, "ps_supplycost" : { "distinctValuesCount" : 99865, "min" : 1.0, - "max" : 1000.0 + "max" : 1000.0, + "dataSize" : null }, "ps_comment" : { "distinctValuesCount" : 799124, "min" : " Tiresias according to the quiet courts sleep against the ironic, final requests. carefully unusual requests affix fluffily quickly ironic packages. regular ", - "max" : "zzle. unusual decoys detect slyly blithely express frays. furiously ironic packages about the bold accounts are close requests. slowly silent reque" + "max" : "zzle. unusual decoys detect slyly blithely express frays. furiously ironic packages about the bold accounts are close requests. slowly silent reque", + "dataSize" : 98784266 } } } diff --git a/presto-tpch/src/main/resources/tpch/statistics/sf1.0/region.json b/presto-tpch/src/main/resources/tpch/statistics/sf1.0/region.json index affdb8a3ef65a..217aaf4d92550 100644 --- a/presto-tpch/src/main/resources/tpch/statistics/sf1.0/region.json +++ b/presto-tpch/src/main/resources/tpch/statistics/sf1.0/region.json @@ -4,17 +4,20 @@ "r_regionkey" : { "distinctValuesCount" : 5, "min" : 0, - "max" : 4 + "max" : 4, + "dataSize" : null }, "r_name" : { "distinctValuesCount" : 5, "min" : "AFRICA", - "max" : "MIDDLE EAST" + "max" : "MIDDLE EAST", + "dataSize" : 34 }, "r_comment" : { "distinctValuesCount" : 5, "min" : "ges. thinly even pinto beans ca", - "max" : "uickly special accounts cajole carefully blithely close requests. carefully final asymptotes haggle furiousl" + "max" : "uickly special accounts cajole carefully blithely close requests. carefully final asymptotes haggle furiousl", + "dataSize" : 330 } } } diff --git a/presto-tpch/src/main/resources/tpch/statistics/sf1.0/supplier.json b/presto-tpch/src/main/resources/tpch/statistics/sf1.0/supplier.json index e0ceca3762577..3c7523c196147 100644 --- a/presto-tpch/src/main/resources/tpch/statistics/sf1.0/supplier.json +++ b/presto-tpch/src/main/resources/tpch/statistics/sf1.0/supplier.json @@ -4,37 +4,44 @@ "s_suppkey" : { "distinctValuesCount" : 10000, "min" : 1, - "max" : 10000 + "max" : 10000, + "dataSize" : null }, "s_name" : { "distinctValuesCount" : 10000, "min" : "Supplier#000000001", - "max" : "Supplier#000010000" + "max" : "Supplier#000010000", + "dataSize" : 180000 }, "s_address" : { "distinctValuesCount" : 10000, "min" : " 9aW1wwnBJJPnCx,nox0MA48Y0zpI1IeVfYZ", - "max" : "zzfDhdtZcvmVzA8rNFU,Yctj1zBN" + "max" : "zzfDhdtZcvmVzA8rNFU,Yctj1zBN", + "dataSize" : 249771 }, "s_nationkey" : { "distinctValuesCount" : 25, "min" : 0, - "max" : 24 + "max" : 24, + "dataSize" : null }, "s_phone" : { "distinctValuesCount" : 10000, "min" : "10-102-116-6785", - "max" : "34-998-900-4911" + "max" : "34-998-900-4911", + "dataSize" : 150000 }, "s_acctbal" : { "distinctValuesCount" : 9955, "min" : -998.22, - "max" : 9999.72 + "max" : 9999.72, + "dataSize" : null }, "s_comment" : { "distinctValuesCount" : 10000, "min" : " about the blithely express foxes. bli", - "max" : "zzle furiously. bold accounts haggle furiously ironic excuses. fur" + "max" : "zzle furiously. bold accounts haggle furiously ironic excuses. fur", + "dataSize" : 625695 } } } diff --git a/presto-tpch/src/main/resources/tpch/statistics/sf3000.0/customer.json b/presto-tpch/src/main/resources/tpch/statistics/sf3000.0/customer.json index 67a1e2b91a473..780839bf97d59 100644 --- a/presto-tpch/src/main/resources/tpch/statistics/sf3000.0/customer.json +++ b/presto-tpch/src/main/resources/tpch/statistics/sf3000.0/customer.json @@ -1,35 +1,40 @@ -{ - "rowCount" : 4.5E8, - "columns" : { - "c_custkey" : { - "distinctValuesCount" : 4.12697126E8, - "min" : 1, - "max" : 4.5E8 - }, - "c_name" : { - "distinctValuesCount" : 4.90782358E8 - }, - "c_address" : { - "distinctValuesCount" : 2.15484394E8 - }, - "c_nationkey" : { - "distinctValuesCount" : 19, - "min" : 0, - "max" : 24 - }, - "c_phone" : { - "distinctValuesCount" : 4.50049407E8 - }, - "c_acctbal" : { - "distinctValuesCount" : 806049.0, - "min" : -999.99, - "max" : 9999.99 - }, - "c_mktsegment" : { - "distinctValuesCount" : 7 - }, - "c_comment" : { - "distinctValuesCount" : 2.56255575E8 + { + "rowCount" : 4.5E8, + "columns" : { + "c_phone" : { + "dataSize" : 6.75E9, + "distinctValuesCount" : 4.50049407E8 + }, + "c_nationkey" : { + "distinctValuesCount" : 19.0, + "min" : 0, + "max" : 24 + }, + "c_custkey" : { + "distinctValuesCount" : 4.12697126E8, + "min" : 1, + "max" : 450000000 + }, + "c_name" : { + "dataSize" : 8.1E9, + "distinctValuesCount" : 4.90782358E8 + }, + "c_acctbal" : { + "distinctValuesCount" : 806049.0, + "min" : -999.99, + "max" : 9999.99 + }, + "c_address" : { + "dataSize" : 1.1249934912E10, + "distinctValuesCount" : 2.15484394E8 + }, + "c_comment" : { + "dataSize" : 3.2624827583E10, + "distinctValuesCount" : 2.56255575E8 + }, + "c_mktsegment" : { + "dataSize" : 4.04999546E9, + "distinctValuesCount" : 7.0 + } } - } } diff --git a/presto-tpch/src/main/resources/tpch/statistics/sf3000.0/lineitem.json b/presto-tpch/src/main/resources/tpch/statistics/sf3000.0/lineitem.json index a30bb78690736..1ff5981ef812a 100644 --- a/presto-tpch/src/main/resources/tpch/statistics/sf3000.0/lineitem.json +++ b/presto-tpch/src/main/resources/tpch/statistics/sf3000.0/lineitem.json @@ -1,75 +1,80 @@ -{ - "rowCount" : 1.8000048306E10, - "columns" : { - "l_orderkey" : { - "distinctValuesCount" : 1.80019763E9, - "min" : 1, - "max" : 18000000000 - }, - "l_partkey" : { - "distinctValuesCount" : 5.35201957E8, - "min" : 1, - "max" : 600000000 - }, - "l_suppkey" : { - "distinctValuesCount" : 4.5300013E7, - "min" : 1, - "max" : 30000000 - }, - "l_linenumber" : { - "distinctValuesCount" : 6, - "min" : 1, - "max" : 7 - }, - "l_quantity" : { - "distinctValuesCount" : 61, - "min" : 1.0, - "max" : 50.0 - }, - "l_extendedprice" : { - "distinctValuesCount" : 5192536.0, - "min" : 900.0, - "max" : 104950.0 - }, - "l_discount" : { - "distinctValuesCount" : 11, - "min" : 0.0, - "max" : 0.1 - }, - "l_tax" : { - "distinctValuesCount" : 9, - "min" : 0.0, - "max" : 0.08 - }, - "l_returnflag" : { - "distinctValuesCount" : 2 - }, - "l_linestatus" : { - "distinctValuesCount" : 2 - }, - "l_shipdate" : { - "distinctValuesCount" : 2535, - "min" : 8036, - "max" : 10561 - }, - "l_commitdate" : { - "distinctValuesCount" : 2427, - "min" : 8065, - "max" : 10530 - }, - "l_receiptdate" : { - "distinctValuesCount" : 2535.0, - "min" : 8037, - "max" : 10591 - }, - "l_shipinstruct" : { - "distinctValuesCount" : 4 - }, - "l_shipmode" : { - "distinctValuesCount" : 7 - }, - "l_comment" : { - "distinctValuesCount" : 1.89222466E8 + { + "rowCount" : 1.8000048306E10, + "columns" : { + "l_shipdate" : { + "distinctValuesCount" : 2535.0, + "min" : "1992-01-02", + "max" : "1998-12-01" + }, + "l_comment" : { + "dataSize" : 4.76996438477E11, + "distinctValuesCount" : 1.89222466E8 + }, + "l_linestatus" : { + "dataSize" : 1.8000048306E10, + "distinctValuesCount" : 2.0 + }, + "l_returnflag" : { + "dataSize" : 1.8000048306E10, + "distinctValuesCount" : 2.0 + }, + "l_receiptdate" : { + "distinctValuesCount" : 2535.0, + "min" : "1992-01-03", + "max" : "1998-12-31" + }, + "l_linenumber" : { + "distinctValuesCount" : 6.0, + "min" : 1, + "max" : 7 + }, + "l_quantity" : { + "distinctValuesCount" : 61.0, + "min" : 1.0, + "max" : 50.0 + }, + "l_tax" : { + "distinctValuesCount" : 9.0, + "min" : 0.0, + "max" : 0.08 + }, + "l_partkey" : { + "distinctValuesCount" : 5.35201957E8, + "min" : 1, + "max" : 600000000 + }, + "l_extendedprice" : { + "distinctValuesCount" : 5192536.0, + "min" : 900.0, + "max" : 104950.0 + }, + "l_discount" : { + "distinctValuesCount" : 11.0, + "min" : 0.0, + "max" : 0.1 + }, + "l_orderkey" : { + "distinctValuesCount" : 1.80019763E9, + "min" : 1, + "max" : 18000000000 + }, + "l_commitdate" : { + "distinctValuesCount" : 2427.0, + "min" : "1992-01-31", + "max" : "1998-10-31" + }, + "l_shipinstruct" : { + "dataSize" : 2.16000462173E11, + "distinctValuesCount" : 4.0 + }, + "l_shipmode" : { + "dataSize" : 7.7143107284E10, + "distinctValuesCount" : 7.0 + }, + "l_suppkey" : { + "distinctValuesCount" : 4.5300013E7, + "min" : 1, + "max" : 30000000 + } } - } } diff --git a/presto-tpch/src/main/resources/tpch/statistics/sf3000.0/nation.json b/presto-tpch/src/main/resources/tpch/statistics/sf3000.0/nation.json index 1a3567f76a79e..63bba4aad4422 100644 --- a/presto-tpch/src/main/resources/tpch/statistics/sf3000.0/nation.json +++ b/presto-tpch/src/main/resources/tpch/statistics/sf3000.0/nation.json @@ -1,21 +1,23 @@ -{ - "rowCount" : 25, - "columns" : { - "n_nationkey" : { - "distinctValuesCount" : 19, - "min" : 0, - "max" : 24 - }, - "n_name" : { - "distinctValuesCount" : 24 - }, - "n_regionkey" : { - "distinctValuesCount" : 5, - "min" : 0, - "max" : 4 - }, - "n_comment" : { - "distinctValuesCount" : 31 + { + "rowCount" : 25.0, + "columns" : { + "n_regionkey" : { + "distinctValuesCount" : 5.0, + "min" : 0, + "max" : 4 + }, + "n_nationkey" : { + "distinctValuesCount" : 19.0, + "min" : 0, + "max" : 24 + }, + "n_name" : { + "dataSize" : 177.0, + "distinctValuesCount" : 24.0 + }, + "n_comment" : { + "dataSize" : 1857.0, + "distinctValuesCount" : 31.0 + } } - } } diff --git a/presto-tpch/src/main/resources/tpch/statistics/sf3000.0/orders.json b/presto-tpch/src/main/resources/tpch/statistics/sf3000.0/orders.json index 3a3d025b1d444..78c78d7ac0bb6 100644 --- a/presto-tpch/src/main/resources/tpch/statistics/sf3000.0/orders.json +++ b/presto-tpch/src/main/resources/tpch/statistics/sf3000.0/orders.json @@ -1,44 +1,46 @@ -{ - "rowCount" : 4.5E9, - "columns" : { - "o_orderkey" : { - "distinctValuesCount" : 1.80019763E9, - "min" : 1, - "max" : 18000000000 - }, - "o_custkey" : { - "distinctValuesCount" : 2.67600978E8, - "min" : 1, - "max" : 449999999 - }, - "o_orderstatus" : { - "distinctValuesCount" : 3, - "min" : "F", - "max" : "P" - }, - "o_totalprice" : { - "distinctValuesCount" : 3.8092619E7, - "min" : 812.61, - "max" : 601034.19 - }, - "o_orderdate" : { - "distinctValuesCount" : 2427, - "min" : 8035, - "max" : 10440 - }, - "o_orderpriority" : { - "distinctValuesCount" : 5 - }, - "o_clerk" : { - "distinctValuesCount" : 2486195.0 - }, - "o_shippriority" : { - "distinctValuesCount" : 2, - "min" : 0, - "max" : 0 - }, - "o_comment" : { - "distinctValuesCount" : 3.62400109E8 + { + "rowCount" : 4.5E9, + "columns" : { + "o_orderstatus" : { + "dataSize" : 4.5E9, + "distinctValuesCount" : 3.0 + }, + "o_orderpriority" : { + "dataSize" : 3.7799988176E10, + "distinctValuesCount" : 5.0 + }, + "o_shippriority" : { + "distinctValuesCount" : 2.0, + "min" : 0, + "max" : 0 + }, + "o_comment" : { + "dataSize" : 2.18247624576E11, + "distinctValuesCount" : 3.62400109E8 + }, + "o_orderkey" : { + "distinctValuesCount" : 1.80019763E9, + "min" : 1, + "max" : 18000000000 + }, + "o_totalprice" : { + "distinctValuesCount" : 3.8092619E7, + "min" : 812.61, + "max" : 601034.19 + }, + "o_orderdate" : { + "distinctValuesCount" : 2427.0, + "min" : "1992-01-01", + "max" : "1998-08-02" + }, + "o_custkey" : { + "distinctValuesCount" : 2.67600978E8, + "min" : 1, + "max" : 449999999 + }, + "o_clerk" : { + "dataSize" : 6.75E10, + "distinctValuesCount" : 2486195.0 + } } - } } diff --git a/presto-tpch/src/main/resources/tpch/statistics/sf3000.0/part.json b/presto-tpch/src/main/resources/tpch/statistics/sf3000.0/part.json index 9e41a02010495..6abf006918a4e 100644 --- a/presto-tpch/src/main/resources/tpch/statistics/sf3000.0/part.json +++ b/presto-tpch/src/main/resources/tpch/statistics/sf3000.0/part.json @@ -1,40 +1,44 @@ -{ - "rowCount" : 6.0E8, - "columns" : { - "p_partkey" : { - "distinctValuesCount" : 5.35201957E8, - "min" : 1, - "max" : 600000000 - }, - "p_name" : { - "distinctValuesCount" : 199997, - "min" : "almond antique blue royal burnished", - "max" : "yellow white seashell lavender black" - }, - "p_mfgr" : { - "distinctValuesCount" : 5 - }, - "p_brand" : { - "distinctValuesCount" : 13 - }, - "p_type" : { - "distinctValuesCount" : 165 - }, - "p_size" : { - "distinctValuesCount" : 36, - "min" : 1, - "max" : 50 - }, - "p_container" : { - "distinctValuesCount" : 29 - }, - "p_retailprice" : { - "distinctValuesCount" : 125124.0, - "min" : 900.0, - "max" : 2099.0 - }, - "p_comment" : { - "distinctValuesCount" : 1.6725061E7 + { + "rowCount" : 6.0E8, + "columns" : { + "p_name" : { + "dataSize" : 1.9649937305E10, + "distinctValuesCount" : 5.83641873E8 + }, + "p_partkey" : { + "distinctValuesCount" : 5.35201957E8, + "min" : 1, + "max" : 600000000 + }, + "p_size" : { + "distinctValuesCount" : 36.0, + "min" : 1, + "max" : 50 + }, + "p_container" : { + "dataSize" : 4.544987506E9, + "distinctValuesCount" : 29.0 + }, + "p_brand" : { + "dataSize" : 4.8E9, + "distinctValuesCount" : 13.0 + }, + "p_type" : { + "dataSize" : 1.2359998293E10, + "distinctValuesCount" : 165.0 + }, + "p_retailprice" : { + "distinctValuesCount" : 125124.0, + "min" : 900.0, + "max" : 2099.0 + }, + "p_comment" : { + "dataSize" : 8.099867343E9, + "distinctValuesCount" : 1.6725061E7 + }, + "p_mfgr" : { + "dataSize" : 8.4E9, + "distinctValuesCount" : 5.0 + } } - } } diff --git a/presto-tpch/src/main/resources/tpch/statistics/sf3000.0/partsupp.json b/presto-tpch/src/main/resources/tpch/statistics/sf3000.0/partsupp.json index a0fa0926cc9e8..2eba3c5dd3026 100644 --- a/presto-tpch/src/main/resources/tpch/statistics/sf3000.0/partsupp.json +++ b/presto-tpch/src/main/resources/tpch/statistics/sf3000.0/partsupp.json @@ -1,28 +1,29 @@ -{ - "rowCount" : 2.4E9, - "columns" : { - "ps_partkey" : { - "distinctValuesCount" : 5.35201957E8, - "min" : 1, - "max" : 600000000 - }, - "ps_suppkey" : { - "distinctValuesCount" : 4.5300013E7, - "min" : 1, - "max" : 30000000 - }, - "ps_availqty" : { - "distinctValuesCount" : 13152.0, - "min" : 1, - "max" : 9999 - }, - "ps_supplycost" : { - "distinctValuesCount" : 100756.0, - "min" : 1.0, - "max" : 1000.0 - }, - "ps_comment" : { - "distinctValuesCount" : 2.79448686E8 + { + "rowCount" : 2.4E9, + "columns" : { + "ps_suppkey" : { + "distinctValuesCount" : 4.5300013E7, + "min" : 1, + "max" : 30000000 + }, + "ps_partkey" : { + "distinctValuesCount" : 5.35201957E8, + "min" : 1, + "max" : 600000000 + }, + "ps_comment" : { + "dataSize" : 2.96396748667E11, + "distinctValuesCount" : 2.79448686E8 + }, + "ps_availqty" : { + "distinctValuesCount" : 13152.0, + "min" : 1, + "max" : 9999 + }, + "ps_supplycost" : { + "distinctValuesCount" : 100756.0, + "min" : 1.0, + "max" : 1000.0 + } } - } } diff --git a/presto-tpch/src/main/resources/tpch/statistics/sf3000.0/region.json b/presto-tpch/src/main/resources/tpch/statistics/sf3000.0/region.json index affdb8a3ef65a..be0804462a5e0 100644 --- a/presto-tpch/src/main/resources/tpch/statistics/sf3000.0/region.json +++ b/presto-tpch/src/main/resources/tpch/statistics/sf3000.0/region.json @@ -1,20 +1,18 @@ -{ - "rowCount" : 5, - "columns" : { - "r_regionkey" : { - "distinctValuesCount" : 5, - "min" : 0, - "max" : 4 - }, - "r_name" : { - "distinctValuesCount" : 5, - "min" : "AFRICA", - "max" : "MIDDLE EAST" - }, - "r_comment" : { - "distinctValuesCount" : 5, - "min" : "ges. thinly even pinto beans ca", - "max" : "uickly special accounts cajole carefully blithely close requests. carefully final asymptotes haggle furiousl" + { + "rowCount" : 5.0, + "columns" : { + "r_regionkey" : { + "distinctValuesCount" : 5.0, + "min" : 0, + "max" : 4 + }, + "r_comment" : { + "dataSize" : 330.0, + "distinctValuesCount" : 6.0 + }, + "r_name" : { + "dataSize" : 34.0, + "distinctValuesCount" : 7.0 + } } - } } diff --git a/presto-tpch/src/main/resources/tpch/statistics/sf3000.0/supplier.json b/presto-tpch/src/main/resources/tpch/statistics/sf3000.0/supplier.json index a898d02b30fe9..bf5103878e06e 100644 --- a/presto-tpch/src/main/resources/tpch/statistics/sf3000.0/supplier.json +++ b/presto-tpch/src/main/resources/tpch/statistics/sf3000.0/supplier.json @@ -1,32 +1,36 @@ -{ - "rowCount" : 3.0E7, - "columns" : { - "s_suppkey" : { - "distinctValuesCount" : 4.5300013E7, - "min" : 1, - "max" : 30000000 - }, - "s_name" : { - "distinctValuesCount" : 4.1540295E7 - }, - "s_address" : { - "distinctValuesCount" : 2.579357E7 - }, - "s_nationkey" : { - "distinctValuesCount" : 19, - "min" : 0, - "max" : 24 - }, - "s_phone" : { - "distinctValuesCount" : 3.9779123E7 - }, - "s_acctbal" : { - "distinctValuesCount" : 806049.0, - "min" : -999.99, - "max" : 9999.99 - }, - "s_comment" : { - "distinctValuesCount" : 2.6935549E7 + { + "rowCount" : 3.0E7, + "columns" : { + "s_phone" : { + "dataSize" : 4.5E8, + "distinctValuesCount" : 3.9779123E7 + }, + "s_nationkey" : { + "distinctValuesCount" : 19.0, + "min" : 0, + "max" : 24 + }, + "s_comment" : { + "dataSize" : 1.874956852E9, + "distinctValuesCount" : 2.6935549E7 + }, + "s_name" : { + "dataSize" : 5.4E8, + "distinctValuesCount" : 4.1540295E7 + }, + "s_acctbal" : { + "distinctValuesCount" : 806049.0, + "min" : -999.99, + "max" : 9999.99 + }, + "s_address" : { + "dataSize" : 7.50004849E8, + "distinctValuesCount" : 2.579357E7 + }, + "s_suppkey" : { + "distinctValuesCount" : 4.5300013E7, + "min" : 1, + "max" : 30000000 + } } - } } diff --git a/presto-tpch/src/test/java/com/facebook/presto/tpch/TestTpchMetadata.java b/presto-tpch/src/test/java/com/facebook/presto/tpch/TestTpchMetadata.java index 1fef4d8b2b232..e7feaf2aa92da 100644 --- a/presto-tpch/src/test/java/com/facebook/presto/tpch/TestTpchMetadata.java +++ b/presto-tpch/src/test/java/com/facebook/presto/tpch/TestTpchMetadata.java @@ -43,7 +43,6 @@ import static com.facebook.presto.spi.Constraint.alwaysFalse; import static com.facebook.presto.spi.Constraint.alwaysTrue; -import static com.facebook.presto.spi.statistics.Estimate.unknownValue; import static com.facebook.presto.spi.statistics.Estimate.zeroValue; import static com.facebook.presto.tpch.TpchMetadata.getPrestoType; import static com.facebook.presto.tpch.util.PredicateUtils.filterOutColumnFromPredicate; @@ -169,7 +168,7 @@ public void testColumnStats() testColumnStats(schema, PART_SUPPLIER, PART_KEY, columnStatistics(200_000 * scaleFactor, 1, 200_000 * scaleFactor)); //dictionary - testColumnStats(schema, CUSTOMER, MARKET_SEGMENT, columnStatistics(5, "AUTOMOBILE", "MACHINERY")); + testColumnStats(schema, CUSTOMER, MARKET_SEGMENT, columnStatistics(5, "AUTOMOBILE", "MACHINERY", 45)); //low-valued numeric column testColumnStats(schema, LINE_ITEM, LINE_NUMBER, columnStatistics(7, 1, 7)); @@ -179,11 +178,11 @@ public void testColumnStats() //varchar and double columns if (schema.equals("tiny")) { - testColumnStats(schema, CUSTOMER, NAME, columnStatistics(150_000 * scaleFactor, "Customer#000000001", "Customer#000001500")); + testColumnStats(schema, CUSTOMER, NAME, columnStatistics(150_000 * scaleFactor, "Customer#000000001", "Customer#000001500", 27000)); testColumnStats(schema, PART, RETAIL_PRICE, columnStatistics(1_099, 901, 1900.99)); } else if (schema.equals("sf1")) { - testColumnStats(schema, CUSTOMER, NAME, columnStatistics(150_000 * scaleFactor, "Customer#000000001", "Customer#000150000")); + testColumnStats(schema, CUSTOMER, NAME, columnStatistics(150_000 * scaleFactor, "Customer#000000001", "Customer#000150000", 2700000)); testColumnStats(schema, PART, RETAIL_PRICE, columnStatistics(20899, 901, 2089.99)); } }); @@ -196,15 +195,15 @@ public void testColumnStatsWithConstraints() double scaleFactor = TpchMetadata.schemaNameToScaleFactor(schema); //value count, min and max are supported for the constrained column - testColumnStats(schema, ORDERS, ORDER_STATUS, constraint(ORDER_STATUS, "F"), columnStatistics(1, "F", "F")); - testColumnStats(schema, ORDERS, ORDER_STATUS, constraint(ORDER_STATUS, "O"), columnStatistics(1, "O", "O")); - testColumnStats(schema, ORDERS, ORDER_STATUS, constraint(ORDER_STATUS, "P"), columnStatistics(1, "P", "P")); + testColumnStats(schema, ORDERS, ORDER_STATUS, constraint(ORDER_STATUS, "F"), columnStatistics(1, "F", "F", 1)); + testColumnStats(schema, ORDERS, ORDER_STATUS, constraint(ORDER_STATUS, "O"), columnStatistics(1, "O", "O", 1)); + testColumnStats(schema, ORDERS, ORDER_STATUS, constraint(ORDER_STATUS, "P"), columnStatistics(1, "P", "P", 1)); //only min and max values for non-scaling columns can be estimated for non-constrained columns testColumnStats(schema, ORDERS, ORDER_KEY, constraint(ORDER_STATUS, "F"), rangeStatistics(3, 6_000_000 * scaleFactor)); testColumnStats(schema, ORDERS, ORDER_KEY, constraint(ORDER_STATUS, "O"), rangeStatistics(1, 6_000_000 * scaleFactor)); testColumnStats(schema, ORDERS, ORDER_KEY, constraint(ORDER_STATUS, "P"), rangeStatistics(65, 6_000_000 * scaleFactor)); - testColumnStats(schema, ORDERS, CLERK, constraint(ORDER_STATUS, "O"), rangeStatistics("Clerk#000000001", "Clerk#000001000")); + testColumnStats(schema, ORDERS, CLERK, constraint(ORDER_STATUS, "O"), rangeStatistics("Clerk#000000001", "Clerk#000001000", 15000)); //nothing can be said for always false constraints testColumnStats(schema, ORDERS, ORDER_STATUS, alwaysFalse(), noColumnStatistics()); @@ -213,21 +212,21 @@ public void testColumnStatsWithConstraints() testColumnStats(schema, ORDERS, ORDER_KEY, constraint(ORDER_STATUS, "NO SUCH STATUS"), noColumnStatistics()); //unmodified stats are returned for the always true constraint - testColumnStats(schema, ORDERS, ORDER_STATUS, alwaysTrue(), columnStatistics(3, "F", "P")); + testColumnStats(schema, ORDERS, ORDER_STATUS, alwaysTrue(), columnStatistics(3, "F", "P", 3)); testColumnStats(schema, ORDERS, ORDER_KEY, alwaysTrue(), columnStatistics(1_500_000 * scaleFactor, 1, 6_000_000 * scaleFactor)); //constraints on columns other than ORDER_STATUS are not supported and are ignored - testColumnStats(schema, ORDERS, ORDER_STATUS, constraint(CLERK, "NO SUCH CLERK"), columnStatistics(3, "F", "P")); + testColumnStats(schema, ORDERS, ORDER_STATUS, constraint(CLERK, "NO SUCH CLERK"), columnStatistics(3, "F", "P", 3)); testColumnStats(schema, ORDERS, ORDER_KEY, constraint(CLERK, "Clerk#000000001"), columnStatistics(1_500_000 * scaleFactor, 1, 6_000_000 * scaleFactor)); //compound constraints are supported - testColumnStats(schema, ORDERS, ORDER_STATUS, constraint(ORDER_STATUS, "F", "NO SUCH STATUS"), columnStatistics(1, "F", "F")); + testColumnStats(schema, ORDERS, ORDER_STATUS, constraint(ORDER_STATUS, "F", "NO SUCH STATUS"), columnStatistics(1, "F", "F", 1)); testColumnStats(schema, ORDERS, ORDER_KEY, constraint(ORDER_STATUS, "F", "NO SUCH STATUS"), rangeStatistics(3, 6_000_000 * scaleFactor)); - testColumnStats(schema, ORDERS, ORDER_STATUS, constraint(ORDER_STATUS, "F", "O"), columnStatistics(2, "F", "O")); + testColumnStats(schema, ORDERS, ORDER_STATUS, constraint(ORDER_STATUS, "F", "O"), columnStatistics(2, "F", "O", 2)); testColumnStats(schema, ORDERS, ORDER_KEY, constraint(ORDER_STATUS, "F", "O"), rangeStatistics(1, 6_000_000 * scaleFactor)); - testColumnStats(schema, ORDERS, ORDER_STATUS, constraint(ORDER_STATUS, "F", "O", "P"), columnStatistics(3, "F", "P")); + testColumnStats(schema, ORDERS, ORDER_STATUS, constraint(ORDER_STATUS, "F", "O", "P"), columnStatistics(3, "F", "P", 3)); testColumnStats(schema, ORDERS, ORDER_KEY, constraint(ORDER_STATUS, "F", "O", "P"), columnStatistics(1_500_000 * scaleFactor, 1, 6_000_000 * scaleFactor)); }); } @@ -385,38 +384,46 @@ private static ConnectorTableLayoutResult getTableOnlyLayout(TpchMetadata tpchMe private ColumnStatistics noColumnStatistics() { - return createColumnStatistics(Optional.of((double) 0), empty(), empty()); + return createColumnStatistics(Optional.of(0.0), empty(), empty(), Optional.of(0.0)); } - private ColumnStatistics columnStatistics(double distinctValuesCount, String min, String max) + private ColumnStatistics columnStatistics(double distinctValuesCount, String min, String max, double dataSize) { - return createColumnStatistics(Optional.of(distinctValuesCount), Optional.of(utf8Slice(min)), Optional.of(utf8Slice(max))); + return createColumnStatistics(Optional.of(distinctValuesCount), Optional.of(utf8Slice(min)), Optional.of(utf8Slice(max)), Optional.of(dataSize)); } private ColumnStatistics columnStatistics(double distinctValuesCount, double min, double max) { - return createColumnStatistics(Optional.of(distinctValuesCount), Optional.of(min), Optional.of(max)); + return createColumnStatistics(Optional.of(distinctValuesCount), Optional.of(min), Optional.of(max), Optional.empty()); } - private ColumnStatistics rangeStatistics(String min, String max) + private ColumnStatistics rangeStatistics(String min, String max, double dataSize) { - return createColumnStatistics(empty(), Optional.of(utf8Slice(min)), Optional.of(utf8Slice(max))); + return createColumnStatistics(empty(), Optional.of(utf8Slice(min)), Optional.of(utf8Slice(max)), Optional.of(dataSize)); } private ColumnStatistics rangeStatistics(double min, double max) { - return createColumnStatistics(empty(), Optional.of(min), Optional.of(max)); + return createColumnStatistics(empty(), Optional.of(min), Optional.of(max), Optional.empty()); } - private ColumnStatistics createColumnStatistics(Optional distinctValuesCount, Optional min, Optional max) + private static ColumnStatistics createColumnStatistics(Optional distinctValuesCount, Optional min, Optional max, Optional dataSize) { return ColumnStatistics.builder() .addRange(rb -> rb - .setDistinctValuesCount(distinctValuesCount.map(Estimate::new).orElse(unknownValue())) + .setDistinctValuesCount(toEstimate(distinctValuesCount)) .setLowValue(min) .setHighValue(max) + .setDataSize(toEstimate(dataSize)) .setFraction(new Estimate(1.0))) .setNullsFraction(zeroValue()) .build(); } + + private static Estimate toEstimate(Optional value) + { + return value + .map(Estimate::new) + .orElse(Estimate.unknownValue()); + } } diff --git a/presto-tpch/src/test/java/com/facebook/presto/tpch/statistics/ColumnStatisticsRecorder.java b/presto-tpch/src/test/java/com/facebook/presto/tpch/statistics/ColumnStatisticsRecorder.java index dea7c96cc565e..f3f6b12486d99 100644 --- a/presto-tpch/src/test/java/com/facebook/presto/tpch/statistics/ColumnStatisticsRecorder.java +++ b/presto-tpch/src/test/java/com/facebook/presto/tpch/statistics/ColumnStatisticsRecorder.java @@ -13,12 +13,22 @@ */ package com.facebook.presto.tpch.statistics; +import io.airlift.tpch.TpchColumnType; + import java.util.Optional; import java.util.TreeSet; +import static java.util.Objects.requireNonNull; + class ColumnStatisticsRecorder { private final TreeSet nonNullValues = new TreeSet<>(); + private final TpchColumnType type; + + public ColumnStatisticsRecorder(TpchColumnType type) + { + this.type = requireNonNull(type, "type is null"); + } void record(Comparable value) { @@ -32,7 +42,8 @@ ColumnStatisticsData getRecording() return new ColumnStatisticsData( Optional.of(getUniqueValuesCount()), getLowestValue(), - getHighestValue()); + getHighestValue(), + getDataSize()); } private long getUniqueValuesCount() @@ -49,4 +60,15 @@ private Optional getHighestValue() { return nonNullValues.size() > 0 ? Optional.of(nonNullValues.last()) : Optional.empty(); } + + public Optional getDataSize() + { + if (type.getBase() == TpchColumnType.Base.VARCHAR) { + return Optional.of(nonNullValues.stream() + .map(String.class::cast) + .mapToLong(String::length) + .sum()); + } + return Optional.empty(); + } } diff --git a/presto-tpch/src/test/java/com/facebook/presto/tpch/statistics/TableStatisticsRecorder.java b/presto-tpch/src/test/java/com/facebook/presto/tpch/statistics/TableStatisticsRecorder.java index 47801bdaa7e89..fabbd61a0a75a 100644 --- a/presto-tpch/src/test/java/com/facebook/presto/tpch/statistics/TableStatisticsRecorder.java +++ b/presto-tpch/src/test/java/com/facebook/presto/tpch/statistics/TableStatisticsRecorder.java @@ -59,7 +59,7 @@ private TableStatisticsData recordStatistics(Iterable private Map, ColumnStatisticsRecorder> createStatisticsRecorders(List> columns) { return columns.stream() - .collect(toImmutableMap(identity(), (column) -> new ColumnStatisticsRecorder())); + .collect(toImmutableMap(identity(), (column) -> new ColumnStatisticsRecorder(column.getType()))); } private Comparable getTpchValue(E row, TpchColumn column) From b69e78b6ef01f47fe5816b8bece4c52824a31792 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Osipiuk?= Date: Mon, 26 Mar 2018 15:27:53 +0200 Subject: [PATCH 12/13] Update TPC-DS statistics with data size --- .../statistics/ColumnStatisticsData.java | 10 +- .../TpcdsTableStatisticsFactory.java | 1 + .../tpcds/statistics/sf0.01/call_center.json | 93 ++++-- .../tpcds/statistics/sf0.01/catalog_page.json | 27 +- .../statistics/sf0.01/catalog_returns.json | 81 ++++-- .../statistics/sf0.01/catalog_sales.json | 102 ++++--- .../tpcds/statistics/sf0.01/customer.json | 54 ++-- .../statistics/sf0.01/customer_address.json | 39 ++- .../sf0.01/customer_demographics.json | 27 +- .../tpcds/statistics/sf0.01/date_dim.json | 84 ++++-- .../statistics/sf0.01/dbgen_version.json | 16 +- .../sf0.01/household_demographics.json | 15 +- .../tpcds/statistics/sf0.01/income_band.json | 9 +- .../tpcds/statistics/sf0.01/inventory.json | 12 +- .../tpcds/statistics/sf0.01/item.json | 66 +++-- .../tpcds/statistics/sf0.01/promotion.json | 57 ++-- .../tpcds/statistics/sf0.01/reason.json | 9 +- .../tpcds/statistics/sf0.01/ship_mode.json | 18 +- .../tpcds/statistics/sf0.01/store.json | 87 ++++-- .../statistics/sf0.01/store_returns.json | 60 ++-- .../tpcds/statistics/sf0.01/store_sales.json | 69 +++-- .../tpcds/statistics/sf0.01/time_dim.json | 30 +- .../tpcds/statistics/sf0.01/warehouse.json | 42 ++- .../tpcds/statistics/sf0.01/web_page.json | 42 ++- .../tpcds/statistics/sf0.01/web_returns.json | 72 +++-- .../tpcds/statistics/sf0.01/web_sales.json | 102 ++++--- .../tpcds/statistics/sf0.01/web_site.json | 78 +++-- .../tpcds/statistics/sf1/call_center.json | 93 ++++-- .../tpcds/statistics/sf1/catalog_page.json | 27 +- .../tpcds/statistics/sf1/catalog_returns.json | 81 ++++-- .../tpcds/statistics/sf1/catalog_sales.json | 102 ++++--- .../tpcds/statistics/sf1/customer.json | 54 ++-- .../statistics/sf1/customer_address.json | 39 ++- .../statistics/sf1/customer_demographics.json | 27 +- .../tpcds/statistics/sf1/date_dim.json | 84 ++++-- .../tpcds/statistics/sf1/dbgen_version.json | 16 +- .../sf1/household_demographics.json | 15 +- .../tpcds/statistics/sf1/income_band.json | 9 +- .../tpcds/statistics/sf1/inventory.json | 12 +- .../resources/tpcds/statistics/sf1/item.json | 66 +++-- .../tpcds/statistics/sf1/promotion.json | 57 ++-- .../tpcds/statistics/sf1/reason.json | 9 +- .../tpcds/statistics/sf1/ship_mode.json | 18 +- .../resources/tpcds/statistics/sf1/store.json | 87 ++++-- .../tpcds/statistics/sf1/store_returns.json | 60 ++-- .../tpcds/statistics/sf1/store_sales.json | 69 +++-- .../tpcds/statistics/sf1/time_dim.json | 30 +- .../tpcds/statistics/sf1/warehouse.json | 42 ++- .../tpcds/statistics/sf1/web_page.json | 42 ++- .../tpcds/statistics/sf1/web_returns.json | 72 +++-- .../tpcds/statistics/sf1/web_sales.json | 102 ++++--- .../tpcds/statistics/sf1/web_site.json | 78 +++-- .../tpcds/statistics/sf3000/call_center.json | 227 ++++++++------- .../tpcds/statistics/sf3000/catalog_page.json | 50 ++-- .../statistics/sf3000/catalog_returns.json | 214 +++++++------- .../statistics/sf3000/catalog_sales.json | 270 +++++++++--------- .../tpcds/statistics/sf3000/customer.json | 142 ++++----- .../statistics/sf3000/customer_address.json | 87 +++--- .../sf3000/customer_demographics.json | 48 ++-- .../tpcds/statistics/sf3000/date_dim.json | 205 ++++++------- .../sf3000/household_demographics.json | 23 +- .../tpcds/statistics/sf3000/income_band.json | 6 +- .../tpcds/statistics/sf3000/inventory.json | 24 +- .../tpcds/statistics/sf3000/item.json | 168 ++++++----- .../tpcds/statistics/sf3000/promotion.json | 127 ++++---- .../tpcds/statistics/sf3000/reason.json | 16 +- .../tpcds/statistics/sf3000/ship_mode.json | 39 +-- .../tpcds/statistics/sf3000/store.json | 214 +++++++------- .../statistics/sf3000/store_returns.json | 164 +++++------ .../tpcds/statistics/sf3000/store_sales.json | 182 ++++++------ .../tpcds/statistics/sf3000/time_dim.json | 61 ++-- .../tpcds/statistics/sf3000/warehouse.json | 101 ++++--- .../tpcds/statistics/sf3000/web_page.json | 94 +++--- .../tpcds/statistics/sf3000/web_returns.json | 198 ++++++------- .../tpcds/statistics/sf3000/web_sales.json | 258 ++++++++--------- .../tpcds/statistics/sf3000/web_site.json | 179 ++++++------ .../tpcds/TestTpcdsMetadataStatistics.java | 2 + .../statistics/ColumnStatisticsRecorder.java | 30 +- .../statistics/TableStatisticsRecorder.java | 2 +- 79 files changed, 3383 insertions(+), 2341 deletions(-) diff --git a/presto-tpcds/src/main/java/com/facebook/presto/tpcds/statistics/ColumnStatisticsData.java b/presto-tpcds/src/main/java/com/facebook/presto/tpcds/statistics/ColumnStatisticsData.java index 8b072793c8139..79b8e3d492ae1 100644 --- a/presto-tpcds/src/main/java/com/facebook/presto/tpcds/statistics/ColumnStatisticsData.java +++ b/presto-tpcds/src/main/java/com/facebook/presto/tpcds/statistics/ColumnStatisticsData.java @@ -27,18 +27,21 @@ public class ColumnStatisticsData private final long nullsCount; private final Optional min; private final Optional max; + private final Optional dataSize; @JsonCreator public ColumnStatisticsData( @JsonProperty("distinctValuesCount") long distinctValuesCount, @JsonProperty("nullsCount") long nullsCount, @JsonProperty("min") Optional min, - @JsonProperty("max") Optional max) + @JsonProperty("max") Optional max, + @JsonProperty("dataSize") Optional dataSize) { this.distinctValuesCount = distinctValuesCount; this.nullsCount = nullsCount; this.min = requireNonNull(min); this.max = requireNonNull(max); + this.dataSize = requireNonNull(dataSize, "dataSize is null"); } public long getDistinctValuesCount() @@ -60,4 +63,9 @@ public Optional getMax() { return max; } + + public Optional getDataSize() + { + return dataSize; + } } diff --git a/presto-tpcds/src/main/java/com/facebook/presto/tpcds/statistics/TpcdsTableStatisticsFactory.java b/presto-tpcds/src/main/java/com/facebook/presto/tpcds/statistics/TpcdsTableStatisticsFactory.java index 97c0fd847e066..f22c1a9c49658 100644 --- a/presto-tpcds/src/main/java/com/facebook/presto/tpcds/statistics/TpcdsTableStatisticsFactory.java +++ b/presto-tpcds/src/main/java/com/facebook/presto/tpcds/statistics/TpcdsTableStatisticsFactory.java @@ -79,6 +79,7 @@ private ColumnStatistics toColumnStatistics(ColumnStatisticsData columnStatistic columnStatisticsData.getMax() .map(value -> toPrestoValue(value, type))) .setDistinctValuesCount(new Estimate(columnStatisticsData.getDistinctValuesCount())) + .setDataSize(columnStatisticsData.getDataSize().map(Estimate::new).orElse(Estimate.unknownValue())) .setFraction(new Estimate(((double) rowCount - nullCount) / rowCount)) .build()); diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/call_center.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/call_center.json index 6efe49b00588e..62bdf5c6bac71 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/call_center.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/call_center.json @@ -5,187 +5,218 @@ "distinctValuesCount" : 2, "nullsCount" : 0, "min" : 1, - "max" : 2 + "max" : 2, + "dataSize" : null }, "cc_call_center_id" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : "AAAAAAAABAAAAAAA", - "max" : "AAAAAAAACAAAAAAA" + "max" : "AAAAAAAACAAAAAAA", + "dataSize" : 32 }, "cc_rec_start_date" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : 10227, - "max" : 10227 + "max" : 10227, + "dataSize" : null }, "cc_rec_end_date" : { "distinctValuesCount" : 1, "nullsCount" : 1, "min" : 11322, - "max" : 11322 + "max" : 11322, + "dataSize" : null }, "cc_closed_date_sk" : { "distinctValuesCount" : 0, "nullsCount" : 2, "min" : null, - "max" : null + "max" : null, + "dataSize" : null }, "cc_open_date_sk" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : 2450806, - "max" : 2450952 + "max" : 2450952, + "dataSize" : null }, "cc_name" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : "Mid Atlantic", - "max" : "NY Metro" + "max" : "NY Metro", + "dataSize" : 20 }, "cc_class" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : "large", - "max" : "medium" + "max" : "medium", + "dataSize" : 11 }, "cc_employees" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : 2, - "max" : 6 + "max" : 6, + "dataSize" : null }, "cc_sq_ft" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : 1138, - "max" : 2268 + "max" : 2268, + "dataSize" : null }, "cc_hours" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : "8AM-4PM", - "max" : "8AM-8AM" + "max" : "8AM-8AM", + "dataSize" : 14 }, "cc_manager" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : "Bob Belcher", - "max" : "Felipe Perkins" + "max" : "Felipe Perkins", + "dataSize" : 25 }, "cc_mkt_id" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : 2, - "max" : 6 + "max" : 6, + "dataSize" : null }, "cc_mkt_class" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : "A bit narrow forms matter animals. Consist", - "max" : "More than other authori" + "max" : "More than other authori", + "dataSize" : 65 }, "cc_mkt_desc" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : "Largely blank years put substantially deaf, new others. Question", - "max" : "Shared others could not count fully dollars. New members ca" + "max" : "Shared others could not count fully dollars. New members ca", + "dataSize" : 123 }, "cc_market_manager" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : "Julius Durham", - "max" : "Julius Tran" + "max" : "Julius Tran", + "dataSize" : 24 }, "cc_division" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : 3, - "max" : 5 + "max" : 5, + "dataSize" : null }, "cc_division_name" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : "anti", - "max" : "pri" + "max" : "pri", + "dataSize" : 7 }, "cc_company" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : 1, - "max" : 6 + "max" : 6, + "dataSize" : null }, "cc_company_name" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : "cally", - "max" : "ought" + "max" : "ought", + "dataSize" : 10 }, "cc_street_number" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : "730", - "max" : "984" + "max" : "984", + "dataSize" : 6 }, "cc_street_name" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : "Ash Hill", - "max" : "Center Hill" + "max" : "Center Hill", + "dataSize" : 19 }, "cc_street_type" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : "Boulevard", - "max" : "Way" + "max" : "Way", + "dataSize" : 12 }, "cc_suite_number" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : "Suite 0", - "max" : "Suite 70" + "max" : "Suite 70", + "dataSize" : 15 }, "cc_city" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "Midway", - "max" : "Midway" + "max" : "Midway", + "dataSize" : 6 }, "cc_county" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "Williamson County", - "max" : "Williamson County" + "max" : "Williamson County", + "dataSize" : 17 }, "cc_state" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "TN", - "max" : "TN" + "max" : "TN", + "dataSize" : 2 }, "cc_zip" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "31904", - "max" : "31904" + "max" : "31904", + "dataSize" : 5 }, "cc_country" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "United States", - "max" : "United States" + "max" : "United States", + "dataSize" : 13 }, "cc_gmt_offset" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : -500, - "max" : -500 + "max" : -500, + "dataSize" : null }, "cc_tax_percentage" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : 11, - "max" : 12 + "max" : 12, + "dataSize" : null } } } diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/catalog_page.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/catalog_page.json index 51dbbe07bb14d..a4170f7fd8b2e 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/catalog_page.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/catalog_page.json @@ -5,55 +5,64 @@ "distinctValuesCount" : 11718, "nullsCount" : 0, "min" : 1, - "max" : 11718 + "max" : 11718, + "dataSize" : null }, "cp_catalog_page_id" : { "distinctValuesCount" : 11718, "nullsCount" : 0, "min" : "AAAAAAAAAAABAAAA", - "max" : "AAAAAAAAPPPBAAAA" + "max" : "AAAAAAAAPPPBAAAA", + "dataSize" : 187488 }, "cp_start_date_sk" : { "distinctValuesCount" : 91, "nullsCount" : 101, "min" : 2450815, - "max" : 2453005 + "max" : 2453005, + "dataSize" : null }, "cp_end_date_sk" : { "distinctValuesCount" : 97, "nullsCount" : 108, "min" : 2450844, - "max" : 2453186 + "max" : 2453186, + "dataSize" : null }, "cp_department" : { "distinctValuesCount" : 1, "nullsCount" : 120, "min" : "DEPARTMENT", - "max" : "DEPARTMENT" + "max" : "DEPARTMENT", + "dataSize" : 10 }, "cp_catalog_number" : { "distinctValuesCount" : 109, "nullsCount" : 104, "min" : 1, - "max" : 109 + "max" : 109, + "dataSize" : null }, "cp_catalog_page_number" : { "distinctValuesCount" : 108, "nullsCount" : 116, "min" : 1, - "max" : 108 + "max" : 108, + "dataSize" : null }, "cp_description" : { "distinctValuesCount" : 11609, "nullsCount" : 109, "min" : "A bit asleep rooms cannot feel short dry secondary leads. Ab", - "max" : "Youngsters should get very. Bad, necessary years must pick telecommunications. Co" + "max" : "Youngsters should get very. Bad, necessary years must pick telecommunications. Co", + "dataSize" : 865538 }, "cp_type" : { "distinctValuesCount" : 3, "nullsCount" : 110, "min" : "bi-annual", - "max" : "quarterly" + "max" : "quarterly", + "dataSize" : 25 } } } diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/catalog_returns.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/catalog_returns.json index 0dc0e213519a1..3a67884d8740d 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/catalog_returns.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/catalog_returns.json @@ -5,163 +5,190 @@ "distinctValuesCount" : 1968, "nullsCount" : 0, "min" : 2450851, - "max" : 2452989 + "max" : 2452989, + "dataSize" : null }, "cr_returned_time_sk" : { "distinctValuesCount" : 8370, "nullsCount" : 0, "min" : 76, - "max" : 86370 + "max" : 86370, + "dataSize" : null }, "cr_item_sk" : { "distinctValuesCount" : 1917, "nullsCount" : 0, "min" : 1, - "max" : 2000 + "max" : 2000, + "dataSize" : null }, "cr_refunded_customer_sk" : { "distinctValuesCount" : 997, "nullsCount" : 176, "min" : 1, - "max" : 1000 + "max" : 1000, + "dataSize" : null }, "cr_refunded_cdemo_sk" : { "distinctValuesCount" : 5802, "nullsCount" : 180, "min" : 277, - "max" : 1920724 + "max" : 1920724, + "dataSize" : null }, "cr_refunded_hdemo_sk" : { "distinctValuesCount" : 3982, "nullsCount" : 178, "min" : 1, - "max" : 7200 + "max" : 7200, + "dataSize" : null }, "cr_refunded_addr_sk" : { "distinctValuesCount" : 996, "nullsCount" : 166, "min" : 1, - "max" : 1000 + "max" : 1000, + "dataSize" : null }, "cr_returning_customer_sk" : { "distinctValuesCount" : 1000, "nullsCount" : 183, "min" : 1, - "max" : 1000 + "max" : 1000, + "dataSize" : null }, "cr_returning_cdemo_sk" : { "distinctValuesCount" : 8685, "nullsCount" : 183, "min" : 84, - "max" : 1920365 + "max" : 1920365, + "dataSize" : null }, "cr_returning_hdemo_sk" : { "distinctValuesCount" : 5101, "nullsCount" : 169, "min" : 1, - "max" : 7199 + "max" : 7199, + "dataSize" : null }, "cr_returning_addr_sk" : { "distinctValuesCount" : 1000, "nullsCount" : 185, "min" : 1, - "max" : 1000 + "max" : 1000, + "dataSize" : null }, "cr_call_center_sk" : { "distinctValuesCount" : 2, "nullsCount" : 178, "min" : 1, - "max" : 2 + "max" : 2, + "dataSize" : null }, "cr_catalog_page_sk" : { "distinctValuesCount" : 3404, "nullsCount" : 191, "min" : 1, - "max" : 10040 + "max" : 10040, + "dataSize" : null }, "cr_ship_mode_sk" : { "distinctValuesCount" : 20, "nullsCount" : 184, "min" : 1, - "max" : 20 + "max" : 20, + "dataSize" : null }, "cr_warehouse_sk" : { "distinctValuesCount" : 1, "nullsCount" : 179, "min" : 1, - "max" : 1 + "max" : 1, + "dataSize" : null }, "cr_reason_sk" : { "distinctValuesCount" : 1, "nullsCount" : 160, "min" : 1, - "max" : 1 + "max" : 1, + "dataSize" : null }, "cr_order_number" : { "distinctValuesCount" : 5904, "nullsCount" : 0, "min" : 2, - "max" : 9998 + "max" : 9998, + "dataSize" : null }, "cr_return_quantity" : { "distinctValuesCount" : 99, "nullsCount" : 179, "min" : 1, - "max" : 99 + "max" : 99, + "dataSize" : null }, "cr_return_amount" : { "distinctValuesCount" : 8174, "nullsCount" : 200, "min" : 0, - "max" : 1816756 + "max" : 1816756, + "dataSize" : null }, "cr_return_tax" : { "distinctValuesCount" : 5028, "nullsCount" : 173, "min" : 0, - "max" : 139159 + "max" : 139159, + "dataSize" : null }, "cr_return_amt_inc_tax" : { "distinctValuesCount" : 8389, "nullsCount" : 186, "min" : 0, - "max" : 1889426 + "max" : 1889426, + "dataSize" : null }, "cr_fee" : { "distinctValuesCount" : 5807, "nullsCount" : 171, "min" : 50, - "max" : 9999 + "max" : 9999, + "dataSize" : null }, "cr_return_ship_cost" : { "distinctValuesCount" : 7755, "nullsCount" : 170, "min" : 0, - "max" : 874720 + "max" : 874720, + "dataSize" : null }, "cr_refunded_cash" : { "distinctValuesCount" : 7899, "nullsCount" : 189, "min" : 0, - "max" : 1437985 + "max" : 1437985, + "dataSize" : null }, "cr_reversed_charge" : { "distinctValuesCount" : 7032, "nullsCount" : 181, "min" : 0, - "max" : 1157057 + "max" : 1157057, + "dataSize" : null }, "cr_store_credit" : { "distinctValuesCount" : 6936, "nullsCount" : 188, "min" : 0, - "max" : 1461221 + "max" : 1461221, + "dataSize" : null }, "cr_net_loss" : { "distinctValuesCount" : 8376, "nullsCount" : 181, "min" : 387, - "max" : 920267 + "max" : 920267, + "dataSize" : null } } } diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/catalog_sales.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/catalog_sales.json index 8cdee4285f666..2b4615a5114e5 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/catalog_sales.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/catalog_sales.json @@ -5,205 +5,239 @@ "distinctValuesCount" : 1917, "nullsCount" : 457, "min" : 2450815, - "max" : 2452736 + "max" : 2452736, + "dataSize" : null }, "cs_sold_time_sk" : { "distinctValuesCount" : 9292, "nullsCount" : 478, "min" : 26, - "max" : 86298 + "max" : 86298, + "dataSize" : null }, "cs_ship_date_sk" : { "distinctValuesCount" : 2006, "nullsCount" : 464, "min" : 2450818, - "max" : 2452825 + "max" : 2452825, + "dataSize" : null }, "cs_bill_customer_sk" : { "distinctValuesCount" : 1000, "nullsCount" : 456, "min" : 1, - "max" : 1000 + "max" : 1000, + "dataSize" : null }, "cs_bill_cdemo_sk" : { "distinctValuesCount" : 9966, "nullsCount" : 440, "min" : 277, - "max" : 1920765 + "max" : 1920765, + "dataSize" : null }, "cs_bill_hdemo_sk" : { "distinctValuesCount" : 5429, "nullsCount" : 422, "min" : 1, - "max" : 7200 + "max" : 7200, + "dataSize" : null }, "cs_bill_addr_sk" : { "distinctValuesCount" : 1000, "nullsCount" : 448, "min" : 1, - "max" : 1000 + "max" : 1000, + "dataSize" : null }, "cs_ship_customer_sk" : { "distinctValuesCount" : 1000, "nullsCount" : 467, "min" : 1, - "max" : 1000 + "max" : 1000, + "dataSize" : null }, "cs_ship_cdemo_sk" : { "distinctValuesCount" : 9968, "nullsCount" : 438, "min" : 277, - "max" : 1920765 + "max" : 1920765, + "dataSize" : null }, "cs_ship_hdemo_sk" : { "distinctValuesCount" : 5410, "nullsCount" : 476, "min" : 1, - "max" : 7200 + "max" : 7200, + "dataSize" : null }, "cs_ship_addr_sk" : { "distinctValuesCount" : 1000, "nullsCount" : 470, "min" : 1, - "max" : 1000 + "max" : 1000, + "dataSize" : null }, "cs_call_center_sk" : { "distinctValuesCount" : 2, "nullsCount" : 406, "min" : 1, - "max" : 2 + "max" : 2, + "dataSize" : null }, "cs_catalog_page_sk" : { "distinctValuesCount" : 6588, "nullsCount" : 426, "min" : 1, - "max" : 10147 + "max" : 10147, + "dataSize" : null }, "cs_ship_mode_sk" : { "distinctValuesCount" : 20, "nullsCount" : 448, "min" : 1, - "max" : 20 + "max" : 20, + "dataSize" : null }, "cs_warehouse_sk" : { "distinctValuesCount" : 1, "nullsCount" : 456, "min" : 1, - "max" : 1 + "max" : 1, + "dataSize" : null }, "cs_item_sk" : { "distinctValuesCount" : 2000, "nullsCount" : 0, "min" : 1, - "max" : 2000 + "max" : 2000, + "dataSize" : null }, "cs_promo_sk" : { "distinctValuesCount" : 3, "nullsCount" : 424, "min" : 1, - "max" : 3 + "max" : 3, + "dataSize" : null }, "cs_order_number" : { "distinctValuesCount" : 10000, "nullsCount" : 0, "min" : 1, - "max" : 10000 + "max" : 10000, + "dataSize" : null }, "cs_quantity" : { "distinctValuesCount" : 100, "nullsCount" : 440, "min" : 1, - "max" : 100 + "max" : 100, + "dataSize" : null }, "cs_wholesale_cost" : { "distinctValuesCount" : 9900, "nullsCount" : 441, "min" : 100, - "max" : 10000 + "max" : 10000, + "dataSize" : null }, "cs_list_price" : { "distinctValuesCount" : 24365, "nullsCount" : 451, "min" : 108, - "max" : 29901 + "max" : 29901, + "dataSize" : null }, "cs_sales_price" : { "distinctValuesCount" : 17445, "nullsCount" : 440, "min" : 0, - "max" : 29783 + "max" : 29783, + "dataSize" : null }, "cs_ext_discount_amt" : { "distinctValuesCount" : 69054, "nullsCount" : 457, "min" : 0, - "max" : 2666436 + "max" : 2666436, + "dataSize" : null }, "cs_ext_sales_price" : { "distinctValuesCount" : 69160, "nullsCount" : 461, "min" : 0, - "max" : 2573664 + "max" : 2573664, + "dataSize" : null }, "cs_ext_wholesale_cost" : { "distinctValuesCount" : 72314, "nullsCount" : 458, "min" : 107, - "max" : 998700 + "max" : 998700, + "dataSize" : null }, "cs_ext_list_price" : { "distinctValuesCount" : 79668, "nullsCount" : 433, "min" : 166, - "max" : 2939700 + "max" : 2939700, + "dataSize" : null }, "cs_ext_tax" : { "distinctValuesCount" : 28332, "nullsCount" : 425, "min" : 0, - "max" : 204320 + "max" : 204320, + "dataSize" : null }, "cs_coupon_amt" : { "distinctValuesCount" : 16575, "nullsCount" : 473, "min" : 0, - "max" : 2046762 + "max" : 2046762, + "dataSize" : null }, "cs_ext_ship_cost" : { "distinctValuesCount" : 58820, "nullsCount" : 457, "min" : 0, - "max" : 1364640 + "max" : 1364640, + "dataSize" : null }, "cs_net_paid" : { "distinctValuesCount" : 70322, "nullsCount" : 445, "min" : 0, - "max" : 2573664 + "max" : 2573664, + "dataSize" : null }, "cs_net_paid_inc_tax" : { "distinctValuesCount" : 76563, "nullsCount" : 450, "min" : 0, - "max" : 2705151 + "max" : 2705151, + "dataSize" : null }, "cs_net_paid_inc_ship" : { "distinctValuesCount" : 78051, "nullsCount" : 0, "min" : 0, - "max" : 3724000 + "max" : 3724000, + "dataSize" : null }, "cs_net_paid_inc_ship_tax" : { "distinctValuesCount" : 83407, "nullsCount" : 0, "min" : 0, - "max" : 3851680 + "max" : 3851680, + "dataSize" : null }, "cs_net_profit" : { "distinctValuesCount" : 74371, "nullsCount" : 0, "min" : -979860, - "max" : 1683360 + "max" : 1683360, + "dataSize" : null } } } diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/customer.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/customer.json index b6465e43781e3..8c089ef5e7921 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/customer.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/customer.json @@ -5,109 +5,127 @@ "distinctValuesCount" : 1000, "nullsCount" : 0, "min" : 1, - "max" : 1000 + "max" : 1000, + "dataSize" : null }, "c_customer_id" : { "distinctValuesCount" : 1000, "nullsCount" : 0, "min" : "AAAAAAAAAABAAAAA", - "max" : "AAAAAAAAPPCAAAAA" + "max" : "AAAAAAAAPPCAAAAA", + "dataSize" : 16000 }, "c_current_cdemo_sk" : { "distinctValuesCount" : 974, "nullsCount" : 26, "min" : 2631, - "max" : 1913607 + "max" : 1913607, + "dataSize" : null }, "c_current_hdemo_sk" : { "distinctValuesCount" : 904, "nullsCount" : 28, "min" : 1, - "max" : 7193 + "max" : 7193, + "dataSize" : null }, "c_current_addr_sk" : { "distinctValuesCount" : 624, "nullsCount" : 0, "min" : 2, - "max" : 1000 + "max" : 1000, + "dataSize" : null }, "c_first_shipto_date_sk" : { "distinctValuesCount" : 858, "nullsCount" : 35, "min" : 2449032, - "max" : 2452672 + "max" : 2452672, + "dataSize" : null }, "c_first_sales_date_sk" : { "distinctValuesCount" : 858, "nullsCount" : 30, "min" : 2449002, - "max" : 2452642 + "max" : 2452642, + "dataSize" : null }, "c_salutation" : { "distinctValuesCount" : 6, "nullsCount" : 30, "min" : "Dr.", - "max" : "Sir" + "max" : "Sir", + "dataSize" : 20 }, "c_first_name" : { "distinctValuesCount" : 517, "nullsCount" : 32, "min" : "Aaron", - "max" : "Zachary" + "max" : "Zachary", + "dataSize" : 2992 }, "c_last_name" : { "distinctValuesCount" : 667, "nullsCount" : 24, "min" : "Adams", - "max" : "Zamora" + "max" : "Zamora", + "dataSize" : 4141 }, "c_preferred_cust_flag" : { "distinctValuesCount" : 2, "nullsCount" : 29, "min" : "N", - "max" : "Y" + "max" : "Y", + "dataSize" : 2 }, "c_birth_day" : { "distinctValuesCount" : 31, "nullsCount" : 38, "min" : 1, - "max" : 31 + "max" : 31, + "dataSize" : null }, "c_birth_month" : { "distinctValuesCount" : 12, "nullsCount" : 34, "min" : 1, - "max" : 12 + "max" : 12, + "dataSize" : null }, "c_birth_year" : { "distinctValuesCount" : 69, "nullsCount" : 31, "min" : 1924, - "max" : 1992 + "max" : 1992, + "dataSize" : null }, "c_birth_country" : { "distinctValuesCount" : 210, "nullsCount" : 31, "min" : "AFGHANISTAN", - "max" : "ZIMBABWE" + "max" : "ZIMBABWE", + "dataSize" : 1824 }, "c_login" : { "distinctValuesCount" : 0, "nullsCount" : 1000, "min" : null, - "max" : null + "max" : null, + "dataSize" : 0 }, "c_email_address" : { "distinctValuesCount" : 969, "nullsCount" : 31, "min" : "Aaron.Browder@iUpddkHI9z8.org", - "max" : "Zachary.Parsons@hHmnLrbKsfY.com" + "max" : "Zachary.Parsons@hHmnLrbKsfY.com", + "dataSize" : 26562 }, "c_last_review_date_sk" : { "distinctValuesCount" : 343, "nullsCount" : 25, "min" : 2452283, - "max" : 2452648 + "max" : 2452648, + "dataSize" : null } } } diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/customer_address.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/customer_address.json index 52bd900c948ce..8dad1ede0b698 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/customer_address.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/customer_address.json @@ -5,79 +5,92 @@ "distinctValuesCount" : 1000, "nullsCount" : 0, "min" : 1, - "max" : 1000 + "max" : 1000, + "dataSize" : null }, "ca_address_id" : { "distinctValuesCount" : 1000, "nullsCount" : 0, "min" : "AAAAAAAAAABAAAAA", - "max" : "AAAAAAAAPPCAAAAA" + "max" : "AAAAAAAAPPCAAAAA", + "dataSize" : 16000 }, "ca_street_number" : { "distinctValuesCount" : 622, "nullsCount" : 32, "min" : "10", - "max" : "999" + "max" : "999", + "dataSize" : 1805 }, "ca_street_name" : { "distinctValuesCount" : 542, "nullsCount" : 28, "min" : "10th ", - "max" : "Woodland Seventh" + "max" : "Woodland Seventh", + "dataSize" : 5693 }, "ca_street_type" : { "distinctValuesCount" : 20, "nullsCount" : 37, "min" : "Ave", - "max" : "Wy" + "max" : "Wy", + "dataSize" : 84 }, "ca_suite_number" : { "distinctValuesCount" : 75, "nullsCount" : 29, "min" : "Suite 0", - "max" : "Suite Y" + "max" : "Suite Y", + "dataSize" : 614 }, "ca_city" : { "distinctValuesCount" : 197, "nullsCount" : 28, "min" : "Aberdeen", - "max" : "Wright" + "max" : "Wright", + "dataSize" : 1731 }, "ca_county" : { "distinctValuesCount" : 634, "nullsCount" : 29, "min" : "Ada County", - "max" : "Yuma County" + "max" : "Yuma County", + "dataSize" : 8877 }, "ca_state" : { "distinctValuesCount" : 51, "nullsCount" : 27, "min" : "AK", - "max" : "WY" + "max" : "WY", + "dataSize" : 102 }, "ca_zip" : { "distinctValuesCount" : 641, "nullsCount" : 32, "min" : "00669", - "max" : "99843" + "max" : "99843", + "dataSize" : 3205 }, "ca_country" : { "distinctValuesCount" : 1, "nullsCount" : 30, "min" : "United States", - "max" : "United States" + "max" : "United States", + "dataSize" : 13 }, "ca_gmt_offset" : { "distinctValuesCount" : 6, "nullsCount" : 31, "min" : -1000, - "max" : -500 + "max" : -500, + "dataSize" : null }, "ca_location_type" : { "distinctValuesCount" : 3, "nullsCount" : 34, "min" : "apartment", - "max" : "single family" + "max" : "single family", + "dataSize" : 27 } } } diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/customer_demographics.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/customer_demographics.json index e0198fa52728d..8718cc0978e9c 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/customer_demographics.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/customer_demographics.json @@ -5,55 +5,64 @@ "distinctValuesCount" : 1920800, "nullsCount" : 0, "min" : 1, - "max" : 1920800 + "max" : 1920800, + "dataSize" : null }, "cd_gender" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : "F", - "max" : "M" + "max" : "M", + "dataSize" : 2 }, "cd_marital_status" : { "distinctValuesCount" : 5, "nullsCount" : 0, "min" : "D", - "max" : "W" + "max" : "W", + "dataSize" : 5 }, "cd_education_status" : { "distinctValuesCount" : 7, "nullsCount" : 0, "min" : "2 yr Degree", - "max" : "Unknown" + "max" : "Unknown", + "dataSize" : 67 }, "cd_purchase_estimate" : { "distinctValuesCount" : 20, "nullsCount" : 0, "min" : 500, - "max" : 10000 + "max" : 10000, + "dataSize" : null }, "cd_credit_rating" : { "distinctValuesCount" : 4, "nullsCount" : 0, "min" : "Good", - "max" : "Unknown" + "max" : "Unknown", + "dataSize" : 28 }, "cd_dep_count" : { "distinctValuesCount" : 7, "nullsCount" : 0, "min" : 0, - "max" : 6 + "max" : 6, + "dataSize" : null }, "cd_dep_employed_count" : { "distinctValuesCount" : 7, "nullsCount" : 0, "min" : 0, - "max" : 6 + "max" : 6, + "dataSize" : null }, "cd_dep_college_count" : { "distinctValuesCount" : 7, "nullsCount" : 0, "min" : 0, - "max" : 6 + "max" : 6, + "dataSize" : null } } } diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/date_dim.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/date_dim.json index cedf72418b93b..5f0050b2f4bab 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/date_dim.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/date_dim.json @@ -5,169 +5,197 @@ "distinctValuesCount" : 73049, "nullsCount" : 0, "min" : 2415022, - "max" : 2488070 + "max" : 2488070, + "dataSize" : null }, "d_date_id" : { "distinctValuesCount" : 73049, "nullsCount" : 0, "min" : "AAAAAAAAAAAAFCAA", - "max" : "AAAAAAAAPPPPECAA" + "max" : "AAAAAAAAPPPPECAA", + "dataSize" : 1168784 }, "d_date" : { "distinctValuesCount" : 73049, "nullsCount" : 0, "min" : -25566, - "max" : 47482 + "max" : 47482, + "dataSize" : null }, "d_month_seq" : { "distinctValuesCount" : 2401, "nullsCount" : 0, "min" : 0, - "max" : 2400 + "max" : 2400, + "dataSize" : null }, "d_week_seq" : { "distinctValuesCount" : 10436, "nullsCount" : 0, "min" : 1, - "max" : 10436 + "max" : 10436, + "dataSize" : null }, "d_quarter_seq" : { "distinctValuesCount" : 801, "nullsCount" : 0, "min" : 1, - "max" : 801 + "max" : 801, + "dataSize" : null }, "d_year" : { "distinctValuesCount" : 201, "nullsCount" : 0, "min" : 1900, - "max" : 2100 + "max" : 2100, + "dataSize" : null }, "d_dow" : { "distinctValuesCount" : 7, "nullsCount" : 0, "min" : 0, - "max" : 6 + "max" : 6, + "dataSize" : null }, "d_moy" : { "distinctValuesCount" : 12, "nullsCount" : 0, "min" : 1, - "max" : 12 + "max" : 12, + "dataSize" : null }, "d_dom" : { "distinctValuesCount" : 31, "nullsCount" : 0, "min" : 1, - "max" : 31 + "max" : 31, + "dataSize" : null }, "d_qoy" : { "distinctValuesCount" : 4, "nullsCount" : 0, "min" : 1, - "max" : 4 + "max" : 4, + "dataSize" : null }, "d_fy_year" : { "distinctValuesCount" : 201, "nullsCount" : 0, "min" : 1900, - "max" : 2100 + "max" : 2100, + "dataSize" : null }, "d_fy_quarter_seq" : { "distinctValuesCount" : 801, "nullsCount" : 0, "min" : 1, - "max" : 801 + "max" : 801, + "dataSize" : null }, "d_fy_week_seq" : { "distinctValuesCount" : 10436, "nullsCount" : 0, "min" : 1, - "max" : 10436 + "max" : 10436, + "dataSize" : null }, "d_day_name" : { "distinctValuesCount" : 7, "nullsCount" : 0, "min" : "Friday", - "max" : "Wednesday" + "max" : "Wednesday", + "dataSize" : 50 }, "d_quarter_name" : { "distinctValuesCount" : 801, "nullsCount" : 0, "min" : "1900Q1", - "max" : "2100Q1" + "max" : "2100Q1", + "dataSize" : 4806 }, "d_holiday" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : "N", - "max" : "Y" + "max" : "Y", + "dataSize" : 2 }, "d_weekend" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : "N", - "max" : "Y" + "max" : "Y", + "dataSize" : 2 }, "d_following_holiday" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : "N", - "max" : "Y" + "max" : "Y", + "dataSize" : 2 }, "d_first_dom" : { "distinctValuesCount" : 2401, "nullsCount" : 0, "min" : 2415021, - "max" : 2488070 + "max" : 2488070, + "dataSize" : null }, "d_last_dom" : { "distinctValuesCount" : 2401, "nullsCount" : 0, "min" : 2415020, - "max" : 2488372 + "max" : 2488372, + "dataSize" : null }, "d_same_day_ly" : { "distinctValuesCount" : 73000, "nullsCount" : 0, "min" : 2414657, - "max" : 2487705 + "max" : 2487705, + "dataSize" : null }, "d_same_day_lq" : { "distinctValuesCount" : 72698, "nullsCount" : 0, "min" : 2414930, - "max" : 2487978 + "max" : 2487978, + "dataSize" : null }, "d_current_day" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "N", - "max" : "N" + "max" : "N", + "dataSize" : 1 }, "d_current_week" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "N", - "max" : "N" + "max" : "N", + "dataSize" : 1 }, "d_current_month" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : "N", - "max" : "Y" + "max" : "Y", + "dataSize" : 2 }, "d_current_quarter" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : "N", - "max" : "Y" + "max" : "Y", + "dataSize" : 2 }, "d_current_year" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : "N", - "max" : "Y" + "max" : "Y", + "dataSize" : 2 } } } diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/dbgen_version.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/dbgen_version.json index bd100934d22eb..c47439de30a91 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/dbgen_version.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/dbgen_version.json @@ -5,25 +5,29 @@ "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "2.0.0", - "max" : "2.0.0" + "max" : "2.0.0", + "dataSize" : 5 }, "dv_create_date" : { "distinctValuesCount" : 1, "nullsCount" : 0, - "min" : 17381, - "max" : 17381 + "min" : 17626, + "max" : 17626, + "dataSize" : null }, "dv_create_time" : { "distinctValuesCount" : 1, "nullsCount" : 0, - "min" : 78234000, - "max" : 78234000 + "min" : 62649000, + "max" : 62649000, + "dataSize" : null }, "dv_cmdline_args" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "--scale 0.01", - "max" : "--scale 0.01" + "max" : "--scale 0.01", + "dataSize" : 12 } } } diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/household_demographics.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/household_demographics.json index f664e8d425682..c087ccc6f80b8 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/household_demographics.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/household_demographics.json @@ -5,31 +5,36 @@ "distinctValuesCount" : 7200, "nullsCount" : 0, "min" : 1, - "max" : 7200 + "max" : 7200, + "dataSize" : null }, "hd_income_band_sk" : { "distinctValuesCount" : 20, "nullsCount" : 0, "min" : 1, - "max" : 20 + "max" : 20, + "dataSize" : null }, "hd_buy_potential" : { "distinctValuesCount" : 6, "nullsCount" : 0, "min" : "0-500", - "max" : "Unknown" + "max" : "Unknown", + "dataSize" : 45 }, "hd_dep_count" : { "distinctValuesCount" : 10, "nullsCount" : 0, "min" : 0, - "max" : 9 + "max" : 9, + "dataSize" : null }, "hd_vehicle_count" : { "distinctValuesCount" : 6, "nullsCount" : 0, "min" : -1, - "max" : 4 + "max" : 4, + "dataSize" : null } } } diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/income_band.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/income_band.json index 568c43607612c..3ca986ecc85c2 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/income_band.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/income_band.json @@ -5,19 +5,22 @@ "distinctValuesCount" : 20, "nullsCount" : 0, "min" : 1, - "max" : 20 + "max" : 20, + "dataSize" : null }, "ib_lower_bound" : { "distinctValuesCount" : 20, "nullsCount" : 0, "min" : 0, - "max" : 190001 + "max" : 190001, + "dataSize" : null }, "ib_upper_bound" : { "distinctValuesCount" : 20, "nullsCount" : 0, "min" : 10000, - "max" : 200000 + "max" : 200000, + "dataSize" : null } } } diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/inventory.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/inventory.json index 4c1a8e1656d10..b265da775f724 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/inventory.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/inventory.json @@ -5,25 +5,29 @@ "distinctValuesCount" : 261, "nullsCount" : 0, "min" : 2450815, - "max" : 2452635 + "max" : 2452635, + "dataSize" : null }, "inv_item_sk" : { "distinctValuesCount" : 2000, "nullsCount" : 0, "min" : 1, - "max" : 2000 + "max" : 2000, + "dataSize" : null }, "inv_warehouse_sk" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : 1, - "max" : 1 + "max" : 1, + "dataSize" : null }, "inv_quantity_on_hand" : { "distinctValuesCount" : 1001, "nullsCount" : 13044, "min" : 0, - "max" : 1000 + "max" : 1000, + "dataSize" : null } } } diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/item.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/item.json index cab9306e07efc..9aad50c8103c8 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/item.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/item.json @@ -5,133 +5,155 @@ "distinctValuesCount" : 2000, "nullsCount" : 0, "min" : 1, - "max" : 2000 + "max" : 2000, + "dataSize" : null }, "i_item_id" : { "distinctValuesCount" : 1001, "nullsCount" : 0, "min" : "AAAAAAAAAABAAAAA", - "max" : "AAAAAAAAPPEAAAAA" + "max" : "AAAAAAAAPPEAAAAA", + "dataSize" : 16016 }, "i_rec_start_date" : { "distinctValuesCount" : 4, "nullsCount" : 4, "min" : 10161, - "max" : 11622 + "max" : 11622, + "dataSize" : null }, "i_rec_end_date" : { "distinctValuesCount" : 3, "nullsCount" : 1000, "min" : 10891, - "max" : 11621 + "max" : 11621, + "dataSize" : null }, "i_item_desc" : { "distinctValuesCount" : 1492, "nullsCount" : 9, "min" : "A little special changes would not turn certainly terms. Big, immediate earn", - "max" : "Young, white workers may not wreck british, statistical explanations. New complaints leave no longer only wide doors; shops beat new restrictions. Horses must not test by now anonym" + "max" : "Young, white workers may not wreck british, statistical explanations. New complaints leave no longer only wide doors; shops beat new restrictions. Horses must not test by now anonym", + "dataSize" : 150517 }, "i_current_price" : { "distinctValuesCount" : 1017, "nullsCount" : 6, "min" : 9, - "max" : 9989 + "max" : 9989, + "dataSize" : null }, "i_wholesale_cost" : { "distinctValuesCount" : 704, "nullsCount" : 4, "min" : 3, - "max" : 8583 + "max" : 8583, + "dataSize" : null }, "i_brand_id" : { "distinctValuesCount" : 552, "nullsCount" : 8, "min" : 1001001, - "max" : 10016017 + "max" : 10016017, + "dataSize" : null }, "i_brand" : { "distinctValuesCount" : 536, "nullsCount" : 4, "min" : "amalgamalg #1", - "max" : "univunivamalg #9" + "max" : "univunivamalg #9", + "dataSize" : 8583 }, "i_class_id" : { "distinctValuesCount" : 16, "nullsCount" : 4, "min" : 1, - "max" : 16 + "max" : 16, + "dataSize" : null }, "i_class" : { "distinctValuesCount" : 99, "nullsCount" : 5, "min" : "accent", - "max" : "womens watch" + "max" : "womens watch", + "dataSize" : 785 }, "i_category_id" : { "distinctValuesCount" : 10, "nullsCount" : 6, "min" : 1, - "max" : 10 + "max" : 10, + "dataSize" : null }, "i_category" : { "distinctValuesCount" : 10, "nullsCount" : 5, "min" : "Books", - "max" : "Women" + "max" : "Women", + "dataSize" : 59 }, "i_manufact_id" : { "distinctValuesCount" : 681, "nullsCount" : 5, "min" : 1, - "max" : 996 + "max" : 996, + "dataSize" : null }, "i_manufact" : { "distinctValuesCount" : 625, "nullsCount" : 4, "min" : "able", - "max" : "pripriought" + "max" : "pripriought", + "dataSize" : 7164 }, "i_size" : { "distinctValuesCount" : 7, "nullsCount" : 5, "min" : "N/A", - "max" : "small" + "max" : "small", + "dataSize" : 43 }, "i_formulation" : { "distinctValuesCount" : 1510, "nullsCount" : 5, "min" : "0014orchid3016167652", - "max" : "yellow92850746563485" + "max" : "yellow92850746563485", + "dataSize" : 30200 }, "i_color" : { "distinctValuesCount" : 92, "nullsCount" : 7, "min" : "almond", - "max" : "yellow" + "max" : "yellow", + "dataSize" : 529 }, "i_units" : { "distinctValuesCount" : 21, "nullsCount" : 6, "min" : "Box", - "max" : "Unknown" + "max" : "Unknown", + "dataSize" : 88 }, "i_container" : { "distinctValuesCount" : 1, "nullsCount" : 6, "min" : "Unknown", - "max" : "Unknown" + "max" : "Unknown", + "dataSize" : 7 }, "i_manager_id" : { "distinctValuesCount" : 100, "nullsCount" : 4, "min" : 1, - "max" : 100 + "max" : 100, + "dataSize" : null }, "i_product_name" : { "distinctValuesCount" : 1997, "nullsCount" : 3, "min" : "able", - "max" : "pripripriought" + "max" : "pripripriought", + "dataSize" : 28640 } } } diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/promotion.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/promotion.json index 842edc06a0cfc..f85db8981e497 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/promotion.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/promotion.json @@ -5,115 +5,134 @@ "distinctValuesCount" : 3, "nullsCount" : 0, "min" : 1, - "max" : 3 + "max" : 3, + "dataSize" : null }, "p_promo_id" : { "distinctValuesCount" : 3, "nullsCount" : 0, "min" : "AAAAAAAABAAAAAAA", - "max" : "AAAAAAAADAAAAAAA" + "max" : "AAAAAAAADAAAAAAA", + "dataSize" : 48 }, "p_start_date_sk" : { "distinctValuesCount" : 3, "nullsCount" : 0, "min" : 2450118, - "max" : 2450675 + "max" : 2450675, + "dataSize" : null }, "p_end_date_sk" : { "distinctValuesCount" : 3, "nullsCount" : 0, "min" : 2450150, - "max" : 2450712 + "max" : 2450712, + "dataSize" : null }, "p_item_sk" : { "distinctValuesCount" : 3, "nullsCount" : 0, "min" : 686, - "max" : 1468 + "max" : 1468, + "dataSize" : null }, "p_cost" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : 100000, - "max" : 100000 + "max" : 100000, + "dataSize" : null }, "p_response_targe" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : 1, - "max" : 1 + "max" : 1, + "dataSize" : null }, "p_promo_name" : { "distinctValuesCount" : 3, "nullsCount" : 0, "min" : "able", - "max" : "pri" + "max" : "pri", + "dataSize" : 12 }, "p_channel_dmail" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "Y", - "max" : "Y" + "max" : "Y", + "dataSize" : 1 }, "p_channel_email" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "N", - "max" : "N" + "max" : "N", + "dataSize" : 1 }, "p_channel_catalog" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "N", - "max" : "N" + "max" : "N", + "dataSize" : 1 }, "p_channel_tv" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "N", - "max" : "N" + "max" : "N", + "dataSize" : 1 }, "p_channel_radio" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "N", - "max" : "N" + "max" : "N", + "dataSize" : 1 }, "p_channel_press" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "N", - "max" : "N" + "max" : "N", + "dataSize" : 1 }, "p_channel_event" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "N", - "max" : "N" + "max" : "N", + "dataSize" : 1 }, "p_channel_demo" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "N", - "max" : "N" + "max" : "N", + "dataSize" : 1 }, "p_channel_details" : { "distinctValuesCount" : 3, "nullsCount" : 0, "min" : "Companies shall not pr", - "max" : "So willing buildings coul" + "max" : "So willing buildings coul", + "dataSize" : 87 }, "p_purpose" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "Unknown", - "max" : "Unknown" + "max" : "Unknown", + "dataSize" : 7 }, "p_discount_active" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "N", - "max" : "N" + "max" : "N", + "dataSize" : 1 } } } diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/reason.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/reason.json index 0677c9e5df2ef..4e81484f4ea91 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/reason.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/reason.json @@ -5,19 +5,22 @@ "distinctValuesCount" : 1, "nullsCount" : 0, "min" : 1, - "max" : 1 + "max" : 1, + "dataSize" : null }, "r_reason_id" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "AAAAAAAABAAAAAAA", - "max" : "AAAAAAAABAAAAAAA" + "max" : "AAAAAAAABAAAAAAA", + "dataSize" : 16 }, "r_reason_desc" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "Package was damaged", - "max" : "Package was damaged" + "max" : "Package was damaged", + "dataSize" : 19 } } } diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/ship_mode.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/ship_mode.json index b2de07e556e91..8f95a74eae37a 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/ship_mode.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/ship_mode.json @@ -5,37 +5,43 @@ "distinctValuesCount" : 20, "nullsCount" : 0, "min" : 1, - "max" : 20 + "max" : 20, + "dataSize" : null }, "sm_ship_mode_id" : { "distinctValuesCount" : 20, "nullsCount" : 0, "min" : "AAAAAAAAABAAAAAA", - "max" : "AAAAAAAAPAAAAAAA" + "max" : "AAAAAAAAPAAAAAAA", + "dataSize" : 320 }, "sm_type" : { "distinctValuesCount" : 6, "nullsCount" : 0, "min" : "EXPRESS", - "max" : "TWO DAY" + "max" : "TWO DAY", + "dataSize" : 45 }, "sm_code" : { "distinctValuesCount" : 4, "nullsCount" : 0, "min" : "AIR", - "max" : "SURFACE" + "max" : "SURFACE", + "dataSize" : 17 }, "sm_carrier" : { "distinctValuesCount" : 20, "nullsCount" : 0, "min" : "AIRBORNE", - "max" : "ZOUROS" + "max" : "ZOUROS", + "dataSize" : 133 }, "sm_contract" : { "distinctValuesCount" : 20, "nullsCount" : 0, "min" : "2mM8l", - "max" : "yVfotg7Tio3MVhBg6Bkn" + "max" : "yVfotg7Tio3MVhBg6Bkn", + "dataSize" : 252 } } } diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/store.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/store.json index 3e3d913d71b1b..38dadcdf11ec9 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/store.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/store.json @@ -5,175 +5,204 @@ "distinctValuesCount" : 2, "nullsCount" : 0, "min" : 1, - "max" : 2 + "max" : 2, + "dataSize" : null }, "s_store_id" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : "AAAAAAAABAAAAAAA", - "max" : "AAAAAAAACAAAAAAA" + "max" : "AAAAAAAACAAAAAAA", + "dataSize" : 32 }, "s_rec_start_date" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : 9933, - "max" : 9933 + "max" : 9933, + "dataSize" : null }, "s_rec_end_date" : { "distinctValuesCount" : 1, "nullsCount" : 1, "min" : 11028, - "max" : 11028 + "max" : 11028, + "dataSize" : null }, "s_closed_date_sk" : { "distinctValuesCount" : 1, "nullsCount" : 1, "min" : 2451189, - "max" : 2451189 + "max" : 2451189, + "dataSize" : null }, "s_store_name" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : "able", - "max" : "ought" + "max" : "ought", + "dataSize" : 9 }, "s_number_employees" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : 236, - "max" : 245 + "max" : 245, + "dataSize" : null }, "s_floor_space" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : 5250760, - "max" : 5285950 + "max" : 5285950, + "dataSize" : null }, "s_hours" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "8AM-4PM", - "max" : "8AM-4PM" + "max" : "8AM-4PM", + "dataSize" : 7 }, "s_manager" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : "Scott Smith", - "max" : "William Ward" + "max" : "William Ward", + "dataSize" : 23 }, "s_market_id" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : 2, - "max" : 8 + "max" : 8, + "dataSize" : null }, "s_geography_class" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "Unknown", - "max" : "Unknown" + "max" : "Unknown", + "dataSize" : 7 }, "s_market_desc" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : "Enough high areas stop expectations. Elaborate, local is", - "max" : "Parliamentary candidates wait then heavy, keen mil" + "max" : "Parliamentary candidates wait then heavy, keen mil", + "dataSize" : 106 }, "s_market_manager" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : "Charles Bartley", - "max" : "David Lamontagne" + "max" : "David Lamontagne", + "dataSize" : 31 }, "s_division_id" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : 1, - "max" : 1 + "max" : 1, + "dataSize" : null }, "s_division_name" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "Unknown", - "max" : "Unknown" + "max" : "Unknown", + "dataSize" : 7 }, "s_company_id" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : 1, - "max" : 1 + "max" : 1, + "dataSize" : null }, "s_company_name" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "Unknown", - "max" : "Unknown" + "max" : "Unknown", + "dataSize" : 7 }, "s_street_number" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : "255", - "max" : "767" + "max" : "767", + "dataSize" : 6 }, "s_street_name" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : "Spring ", - "max" : "Sycamore " + "max" : "Sycamore ", + "dataSize" : 16 }, "s_street_type" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : "Dr.", - "max" : "Wy" + "max" : "Wy", + "dataSize" : 5 }, "s_suite_number" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : "Suite 250", - "max" : "Suite 410" + "max" : "Suite 410", + "dataSize" : 18 }, "s_city" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "Midway", - "max" : "Midway" + "max" : "Midway", + "dataSize" : 6 }, "s_county" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "Williamson County", - "max" : "Williamson County" + "max" : "Williamson County", + "dataSize" : 17 }, "s_state" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "TN", - "max" : "TN" + "max" : "TN", + "dataSize" : 2 }, "s_zip" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "31904", - "max" : "31904" + "max" : "31904", + "dataSize" : 5 }, "s_country" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "United States", - "max" : "United States" + "max" : "United States", + "dataSize" : 13 }, "s_gmt_offset" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : -500, - "max" : -500 + "max" : -500, + "dataSize" : null }, "s_tax_precentage" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : 3, - "max" : 3 + "max" : 3, + "dataSize" : null } } } diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/store_returns.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/store_returns.json index 2999888f72c1b..41e096a1a47c9 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/store_returns.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/store_returns.json @@ -5,121 +5,141 @@ "distinctValuesCount" : 1928, "nullsCount" : 451, "min" : 2450822, - "max" : 2452817 + "max" : 2452817, + "dataSize" : null }, "sr_return_time_sk" : { "distinctValuesCount" : 9706, "nullsCount" : 432, "min" : 28799, - "max" : 61195 + "max" : 61195, + "dataSize" : null }, "sr_item_sk" : { "distinctValuesCount" : 1949, "nullsCount" : 0, "min" : 1, - "max" : 2000 + "max" : 2000, + "dataSize" : null }, "sr_customer_sk" : { "distinctValuesCount" : 1000, "nullsCount" : 419, "min" : 1, - "max" : 1000 + "max" : 1000, + "dataSize" : null }, "sr_cdemo_sk" : { "distinctValuesCount" : 11446, "nullsCount" : 450, "min" : 316, - "max" : 1920559 + "max" : 1920559, + "dataSize" : null }, "sr_hdemo_sk" : { "distinctValuesCount" : 5783, "nullsCount" : 453, "min" : 1, - "max" : 7200 + "max" : 7200, + "dataSize" : null }, "sr_addr_sk" : { "distinctValuesCount" : 1000, "nullsCount" : 452, "min" : 1, - "max" : 1000 + "max" : 1000, + "dataSize" : null }, "sr_store_sk" : { "distinctValuesCount" : 2, "nullsCount" : 436, "min" : 1, - "max" : 2 + "max" : 2, + "dataSize" : null }, "sr_reason_sk" : { "distinctValuesCount" : 1, "nullsCount" : 444, "min" : 1, - "max" : 1 + "max" : 1, + "dataSize" : null }, "sr_ticket_number" : { "distinctValuesCount" : 7062, "nullsCount" : 0, "min" : 1, - "max" : 10000 + "max" : 10000, + "dataSize" : null }, "sr_return_quantity" : { "distinctValuesCount" : 100, "nullsCount" : 466, "min" : 1, - "max" : 100 + "max" : 100, + "dataSize" : null }, "sr_return_amt" : { "distinctValuesCount" : 10373, "nullsCount" : 437, "min" : 0, - "max" : 1421115 + "max" : 1421115, + "dataSize" : null }, "sr_return_tax" : { "distinctValuesCount" : 5659, "nullsCount" : 429, "min" : 0, - "max" : 113689 + "max" : 113689, + "dataSize" : null }, "sr_return_amt_inc_tax" : { "distinctValuesCount" : 10758, "nullsCount" : 443, "min" : 0, - "max" : 1534804 + "max" : 1534804, + "dataSize" : null }, "sr_fee" : { "distinctValuesCount" : 6717, "nullsCount" : 453, "min" : 50, - "max" : 10000 + "max" : 10000, + "dataSize" : null }, "sr_return_ship_cost" : { "distinctValuesCount" : 9530, "nullsCount" : 427, "min" : 0, - "max" : 733915 + "max" : 733915, + "dataSize" : null }, "sr_refunded_cash" : { "distinctValuesCount" : 9790, "nullsCount" : 470, "min" : 0, - "max" : 1307425 + "max" : 1307425, + "dataSize" : null }, "sr_reversed_charge" : { "distinctValuesCount" : 8342, "nullsCount" : 468, "min" : 0, - "max" : 815237 + "max" : 815237, + "dataSize" : null }, "sr_store_credit" : { "distinctValuesCount" : 8293, "nullsCount" : 423, "min" : 0, - "max" : 895883 + "max" : 895883, + "dataSize" : null }, "sr_net_loss" : { "distinctValuesCount" : 10688, "nullsCount" : 454, "min" : 170, - "max" : 794072 + "max" : 794072, + "dataSize" : null } } } diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/store_sales.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/store_sales.json index b412ac95c66fc..72f0a00239365 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/store_sales.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/store_sales.json @@ -5,139 +5,162 @@ "distinctValuesCount" : 1783, "nullsCount" : 5335, "min" : 2450816, - "max" : 2452642 + "max" : 2452642, + "dataSize" : null }, "ss_sold_time_sk" : { "distinctValuesCount" : 8841, "nullsCount" : 5372, "min" : 28810, - "max" : 75585 + "max" : 75585, + "dataSize" : null }, "ss_item_sk" : { "distinctValuesCount" : 2000, "nullsCount" : 0, "min" : 1, - "max" : 2000 + "max" : 2000, + "dataSize" : null }, "ss_customer_sk" : { "distinctValuesCount" : 1000, "nullsCount" : 5298, "min" : 1, - "max" : 1000 + "max" : 1000, + "dataSize" : null }, "ss_cdemo_sk" : { "distinctValuesCount" : 9973, "nullsCount" : 5380, "min" : 37, - "max" : 1920695 + "max" : 1920695, + "dataSize" : null }, "ss_hdemo_sk" : { "distinctValuesCount" : 5418, "nullsCount" : 5333, "min" : 1, - "max" : 7200 + "max" : 7200, + "dataSize" : null }, "ss_addr_sk" : { "distinctValuesCount" : 999, "nullsCount" : 5291, "min" : 1, - "max" : 1000 + "max" : 1000, + "dataSize" : null }, "ss_store_sk" : { "distinctValuesCount" : 2, "nullsCount" : 5422, "min" : 1, - "max" : 2 + "max" : 2, + "dataSize" : null }, "ss_promo_sk" : { "distinctValuesCount" : 3, "nullsCount" : 5303, "min" : 1, - "max" : 3 + "max" : 3, + "dataSize" : null }, "ss_ticket_number" : { "distinctValuesCount" : 10000, "nullsCount" : 0, "min" : 1, - "max" : 10000 + "max" : 10000, + "dataSize" : null }, "ss_quantity" : { "distinctValuesCount" : 100, "nullsCount" : 5450, "min" : 1, - "max" : 100 + "max" : 100, + "dataSize" : null }, "ss_wholesale_cost" : { "distinctValuesCount" : 9901, "nullsCount" : 5369, "min" : 100, - "max" : 10000 + "max" : 10000, + "dataSize" : null }, "ss_list_price" : { "distinctValuesCount" : 18329, "nullsCount" : 5429, "min" : 103, - "max" : 19998 + "max" : 19998, + "dataSize" : null }, "ss_sales_price" : { "distinctValuesCount" : 14126, "nullsCount" : 5436, "min" : 0, - "max" : 19956 + "max" : 19956, + "dataSize" : null }, "ss_ext_discount_amt" : { "distinctValuesCount" : 20342, "nullsCount" : 5327, "min" : 0, - "max" : 1628977 + "max" : 1628977, + "dataSize" : null }, "ss_ext_sales_price" : { "distinctValuesCount" : 79659, "nullsCount" : 5344, "min" : 0, - "max" : 1872388 + "max" : 1872388, + "dataSize" : null }, "ss_ext_wholesale_cost" : { "distinctValuesCount" : 88855, "nullsCount" : 5369, "min" : 114, - "max" : 1000000 + "max" : 1000000, + "dataSize" : null }, "ss_ext_list_price" : { "distinctValuesCount" : 95679, "nullsCount" : 5328, "min" : 129, - "max" : 1965150 + "max" : 1965150, + "dataSize" : null }, "ss_ext_tax" : { "distinctValuesCount" : 27830, "nullsCount" : 5310, "min" : 0, - "max" : 159218 + "max" : 159218, + "dataSize" : null }, "ss_coupon_amt" : { "distinctValuesCount" : 20342, "nullsCount" : 5327, "min" : 0, - "max" : 1628977 + "max" : 1628977, + "dataSize" : null }, "ss_net_paid" : { "distinctValuesCount" : 81601, "nullsCount" : 5290, "min" : 0, - "max" : 1769096 + "max" : 1769096, + "dataSize" : null }, "ss_net_paid_inc_tax" : { "distinctValuesCount" : 91312, "nullsCount" : 5313, "min" : 0, - "max" : 1928314 + "max" : 1928314, + "dataSize" : null }, "ss_net_profit" : { "distinctValuesCount" : 86941, "nullsCount" : 5469, "min" : -975389, - "max" : 846300 + "max" : 846300, + "dataSize" : null } } } diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/time_dim.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/time_dim.json index 673a5a4ba31e2..74d93531f3c9a 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/time_dim.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/time_dim.json @@ -5,61 +5,71 @@ "distinctValuesCount" : 86400, "nullsCount" : 0, "min" : 0, - "max" : 86399 + "max" : 86399, + "dataSize" : null }, "t_time_id" : { "distinctValuesCount" : 86400, "nullsCount" : 0, "min" : "AAAAAAAAAAAABAAA", - "max" : "AAAAAAAAPPPPAAAA" + "max" : "AAAAAAAAPPPPAAAA", + "dataSize" : 1382400 }, "t_time" : { "distinctValuesCount" : 86400, "nullsCount" : 0, "min" : 0, - "max" : 86399 + "max" : 86399, + "dataSize" : null }, "t_hour" : { "distinctValuesCount" : 24, "nullsCount" : 0, "min" : 0, - "max" : 23 + "max" : 23, + "dataSize" : null }, "t_minute" : { "distinctValuesCount" : 60, "nullsCount" : 0, "min" : 0, - "max" : 59 + "max" : 59, + "dataSize" : null }, "t_second" : { "distinctValuesCount" : 60, "nullsCount" : 0, "min" : 0, - "max" : 59 + "max" : 59, + "dataSize" : null }, "t_am_pm" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : "AM", - "max" : "PM" + "max" : "PM", + "dataSize" : 4 }, "t_shift" : { "distinctValuesCount" : 3, "nullsCount" : 0, "min" : "first", - "max" : "third" + "max" : "third", + "dataSize" : 16 }, "t_sub_shift" : { "distinctValuesCount" : 4, "nullsCount" : 0, "min" : "afternoon", - "max" : "night" + "max" : "night", + "dataSize" : 28 }, "t_meal_time" : { "distinctValuesCount" : 4, "nullsCount" : 0, "min" : "", - "max" : "lunch" + "max" : "lunch", + "dataSize" : 20 } } } diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/warehouse.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/warehouse.json index abb31f6d93e73..6f2c2f8f5253b 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/warehouse.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/warehouse.json @@ -5,85 +5,99 @@ "distinctValuesCount" : 1, "nullsCount" : 0, "min" : 1, - "max" : 1 + "max" : 1, + "dataSize" : null }, "w_warehouse_id" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "AAAAAAAABAAAAAAA", - "max" : "AAAAAAAABAAAAAAA" + "max" : "AAAAAAAABAAAAAAA", + "dataSize" : 16 }, "w_warehouse_name" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "Conventional childr", - "max" : "Conventional childr" + "max" : "Conventional childr", + "dataSize" : 19 }, "w_warehouse_sq_ft" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : 977787, - "max" : 977787 + "max" : 977787, + "dataSize" : null }, "w_street_number" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "651", - "max" : "651" + "max" : "651", + "dataSize" : 3 }, "w_street_name" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "6th ", - "max" : "6th " + "max" : "6th ", + "dataSize" : 4 }, "w_street_type" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "Parkway", - "max" : "Parkway" + "max" : "Parkway", + "dataSize" : 7 }, "w_suite_number" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "Suite 470", - "max" : "Suite 470" + "max" : "Suite 470", + "dataSize" : 9 }, "w_city" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "Midway", - "max" : "Midway" + "max" : "Midway", + "dataSize" : 6 }, "w_county" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "Williamson County", - "max" : "Williamson County" + "max" : "Williamson County", + "dataSize" : 17 }, "w_state" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "TN", - "max" : "TN" + "max" : "TN", + "dataSize" : 2 }, "w_zip" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "31904", - "max" : "31904" + "max" : "31904", + "dataSize" : 5 }, "w_country" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "United States", - "max" : "United States" + "max" : "United States", + "dataSize" : 13 }, "w_gmt_offset" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : -500, - "max" : -500 + "max" : -500, + "dataSize" : null } } } diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/web_page.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/web_page.json index 535d0b701ff6a..a85e177d19122 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/web_page.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/web_page.json @@ -5,85 +5,99 @@ "distinctValuesCount" : 2, "nullsCount" : 0, "min" : 1, - "max" : 2 + "max" : 2, + "dataSize" : null }, "wp_web_page_id" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : "AAAAAAAABAAAAAAA", - "max" : "AAAAAAAACAAAAAAA" + "max" : "AAAAAAAACAAAAAAA", + "dataSize" : 32 }, "wp_rec_start_date" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : 10107, - "max" : 10107 + "max" : 10107, + "dataSize" : null }, "wp_rec_end_date" : { "distinctValuesCount" : 1, "nullsCount" : 1, "min" : 11202, - "max" : 11202 + "max" : 11202, + "dataSize" : null }, "wp_creation_date_sk" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : 2450810, - "max" : 2450814 + "max" : 2450814, + "dataSize" : null }, "wp_access_date_sk" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : 2452580, - "max" : 2452620 + "max" : 2452620, + "dataSize" : null }, "wp_autogen_flag" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : "N", - "max" : "Y" + "max" : "Y", + "dataSize" : 2 }, "wp_customer_sk" : { "distinctValuesCount" : 1, "nullsCount" : 1, "min" : 539, - "max" : 539 + "max" : 539, + "dataSize" : null }, "wp_url" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "http://www.foo.com", - "max" : "http://www.foo.com" + "max" : "http://www.foo.com", + "dataSize" : 18 }, "wp_type" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : "protected", - "max" : "welcome" + "max" : "welcome", + "dataSize" : 16 }, "wp_char_count" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : 1564, - "max" : 2531 + "max" : 2531, + "dataSize" : null }, "wp_link_count" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : 4, - "max" : 8 + "max" : 8, + "dataSize" : null }, "wp_image_count" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : 3, - "max" : 3 + "max" : 3, + "dataSize" : null }, "wp_max_ad_count" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : 1, - "max" : 4 + "max" : 4, + "dataSize" : null } } } diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/web_returns.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/web_returns.json index a2494c5d0ac41..c16500db106c5 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/web_returns.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/web_returns.json @@ -5,145 +5,169 @@ "distinctValuesCount" : 841, "nullsCount" : 52, "min" : 2450901, - "max" : 2452965 + "max" : 2452965, + "dataSize" : null }, "wr_returned_time_sk" : { "distinctValuesCount" : 1084, "nullsCount" : 56, "min" : 53, - "max" : 85275 + "max" : 85275, + "dataSize" : null }, "wr_item_sk" : { "distinctValuesCount" : 840, "nullsCount" : 0, "min" : 5, - "max" : 2000 + "max" : 2000, + "dataSize" : null }, "wr_refunded_customer_sk" : { "distinctValuesCount" : 672, "nullsCount" : 61, "min" : 4, - "max" : 1000 + "max" : 1000, + "dataSize" : null }, "wr_refunded_cdemo_sk" : { "distinctValuesCount" : 1096, "nullsCount" : 54, "min" : 804, - "max" : 1917676 + "max" : 1917676, + "dataSize" : null }, "wr_refunded_hdemo_sk" : { "distinctValuesCount" : 1018, "nullsCount" : 58, "min" : 8, - "max" : 7198 + "max" : 7198, + "dataSize" : null }, "wr_refunded_addr_sk" : { "distinctValuesCount" : 658, "nullsCount" : 59, "min" : 1, - "max" : 1000 + "max" : 1000, + "dataSize" : null }, "wr_returning_customer_sk" : { "distinctValuesCount" : 671, "nullsCount" : 56, "min" : 4, - "max" : 1000 + "max" : 1000, + "dataSize" : null }, "wr_returning_cdemo_sk" : { "distinctValuesCount" : 1093, "nullsCount" : 57, "min" : 804, - "max" : 1917676 + "max" : 1917676, + "dataSize" : null }, "wr_returning_hdemo_sk" : { "distinctValuesCount" : 1016, "nullsCount" : 60, "min" : 8, - "max" : 7198 + "max" : 7198, + "dataSize" : null }, "wr_returning_addr_sk" : { "distinctValuesCount" : 660, "nullsCount" : 59, "min" : 1, - "max" : 1000 + "max" : 1000, + "dataSize" : null }, "wr_web_page_sk" : { "distinctValuesCount" : 2, "nullsCount" : 63, "min" : 1, - "max" : 2 + "max" : 2, + "dataSize" : null }, "wr_reason_sk" : { "distinctValuesCount" : 1, "nullsCount" : 46, "min" : 1, - "max" : 1 + "max" : 1, + "dataSize" : null }, "wr_order_number" : { "distinctValuesCount" : 713, "nullsCount" : 0, "min" : 1, - "max" : 1000 + "max" : 1000, + "dataSize" : null }, "wr_return_quantity" : { "distinctValuesCount" : 93, "nullsCount" : 62, "min" : 1, - "max" : 97 + "max" : 97, + "dataSize" : null }, "wr_return_amt" : { "distinctValuesCount" : 1085, "nullsCount" : 48, "min" : 0, - "max" : 2032394 + "max" : 2032394, + "dataSize" : null }, "wr_return_tax" : { "distinctValuesCount" : 895, "nullsCount" : 56, "min" : 0, - "max" : 86017 + "max" : 86017, + "dataSize" : null }, "wr_return_amt_inc_tax" : { "distinctValuesCount" : 1080, "nullsCount" : 53, "min" : 0, - "max" : 2032394 + "max" : 2032394, + "dataSize" : null }, "wr_fee" : { "distinctValuesCount" : 1049, "nullsCount" : 55, "min" : 57, - "max" : 9988 + "max" : 9988, + "dataSize" : null }, "wr_return_ship_cost" : { "distinctValuesCount" : 1058, "nullsCount" : 58, "min" : 0, - "max" : 812903 + "max" : 812903, + "dataSize" : null }, "wr_refunded_cash" : { "distinctValuesCount" : 1065, "nullsCount" : 59, "min" : 0, - "max" : 1727534 + "max" : 1727534, + "dataSize" : null }, "wr_reversed_charge" : { "distinctValuesCount" : 1028, "nullsCount" : 65, "min" : 0, - "max" : 802025 + "max" : 802025, + "dataSize" : null }, "wr_account_credit" : { "distinctValuesCount" : 1021, "nullsCount" : 56, "min" : 0, - "max" : 869828 + "max" : 869828, + "dataSize" : null }, "wr_net_loss" : { "distinctValuesCount" : 1093, "nullsCount" : 56, "min" : 787, - "max" : 870716 + "max" : 870716, + "dataSize" : null } } } diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/web_sales.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/web_sales.json index c38ca137a90ca..e0ec78a5f232f 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/web_sales.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/web_sales.json @@ -5,205 +5,239 @@ "distinctValuesCount" : 721, "nullsCount" : 3, "min" : 2450818, - "max" : 2452642 + "max" : 2452642, + "dataSize" : null }, "ws_sold_time_sk" : { "distinctValuesCount" : 993, "nullsCount" : 1, "min" : 353, - "max" : 85558 + "max" : 85558, + "dataSize" : null }, "ws_ship_date_sk" : { "distinctValuesCount" : 1898, "nullsCount" : 3, "min" : 2450824, - "max" : 2452758 + "max" : 2452758, + "dataSize" : null }, "ws_item_sk" : { "distinctValuesCount" : 1961, "nullsCount" : 0, "min" : 1, - "max" : 2000 + "max" : 2000, + "dataSize" : null }, "ws_bill_customer_sk" : { "distinctValuesCount" : 638, "nullsCount" : 3, "min" : 1, - "max" : 999 + "max" : 999, + "dataSize" : null }, "ws_bill_cdemo_sk" : { "distinctValuesCount" : 1000, "nullsCount" : 3, "min" : 2684, - "max" : 1919699 + "max" : 1919699, + "dataSize" : null }, "ws_bill_hdemo_sk" : { "distinctValuesCount" : 935, "nullsCount" : 3, "min" : 1, - "max" : 7187 + "max" : 7187, + "dataSize" : null }, "ws_bill_addr_sk" : { "distinctValuesCount" : 619, "nullsCount" : 2, "min" : 1, - "max" : 1000 + "max" : 1000, + "dataSize" : null }, "ws_ship_customer_sk" : { "distinctValuesCount" : 619, "nullsCount" : 1, "min" : 2, - "max" : 998 + "max" : 998, + "dataSize" : null }, "ws_ship_cdemo_sk" : { "distinctValuesCount" : 1000, "nullsCount" : 2, "min" : 8013, - "max" : 1919699 + "max" : 1919699, + "dataSize" : null }, "ws_ship_hdemo_sk" : { "distinctValuesCount" : 932, "nullsCount" : 2, "min" : 10, - "max" : 7198 + "max" : 7198, + "dataSize" : null }, "ws_ship_addr_sk" : { "distinctValuesCount" : 629, "nullsCount" : 3, "min" : 1, - "max" : 1000 + "max" : 1000, + "dataSize" : null }, "ws_web_page_sk" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : 1, - "max" : 2 + "max" : 2, + "dataSize" : null }, "ws_web_site_sk" : { "distinctValuesCount" : 2, "nullsCount" : 3, "min" : 1, - "max" : 2 + "max" : 2, + "dataSize" : null }, "ws_ship_mode_sk" : { "distinctValuesCount" : 20, "nullsCount" : 4, "min" : 1, - "max" : 20 + "max" : 20, + "dataSize" : null }, "ws_warehouse_sk" : { "distinctValuesCount" : 1, "nullsCount" : 4, "min" : 1, - "max" : 1 + "max" : 1, + "dataSize" : null }, "ws_promo_sk" : { "distinctValuesCount" : 3, "nullsCount" : 3, "min" : 1, - "max" : 3 + "max" : 3, + "dataSize" : null }, "ws_order_number" : { "distinctValuesCount" : 1000, "nullsCount" : 0, "min" : 1, - "max" : 1000 + "max" : 1000, + "dataSize" : null }, "ws_quantity" : { "distinctValuesCount" : 100, "nullsCount" : 4, "min" : 1, - "max" : 100 + "max" : 100, + "dataSize" : null }, "ws_wholesale_cost" : { "distinctValuesCount" : 6855, "nullsCount" : 3, "min" : 100, - "max" : 10000 + "max" : 10000, + "dataSize" : null }, "ws_list_price" : { "distinctValuesCount" : 9247, "nullsCount" : 4, "min" : 107, - "max" : 29574 + "max" : 29574, + "dataSize" : null }, "ws_sales_price" : { "distinctValuesCount" : 7414, "nullsCount" : 2, "min" : 0, - "max" : 28559 + "max" : 28559, + "dataSize" : null }, "ws_ext_discount_amt" : { "distinctValuesCount" : 11275, "nullsCount" : 4, "min" : 0, - "max" : 2817947 + "max" : 2817947, + "dataSize" : null }, "ws_ext_sales_price" : { "distinctValuesCount" : 11283, "nullsCount" : 3, "min" : 0, - "max" : 2551200 + "max" : 2551200, + "dataSize" : null }, "ws_ext_wholesale_cost" : { "distinctValuesCount" : 11490, "nullsCount" : 2, "min" : 276, - "max" : 986700 + "max" : 986700, + "dataSize" : null }, "ws_ext_list_price" : { "distinctValuesCount" : 11673, "nullsCount" : 0, "min" : 714, - "max" : 2866700 + "max" : 2866700, + "dataSize" : null }, "ws_ext_tax" : { "distinctValuesCount" : 7651, "nullsCount" : 2, "min" : 0, - "max" : 191007 + "max" : 191007, + "dataSize" : null }, "ws_coupon_amt" : { "distinctValuesCount" : 2284, "nullsCount" : 2, "min" : 0, - "max" : 2067310 + "max" : 2067310, + "dataSize" : null }, "ws_ext_ship_cost" : { "distinctValuesCount" : 10808, "nullsCount" : 3, "min" : 0, - "max" : 1253043 + "max" : 1253043, + "dataSize" : null }, "ws_net_paid" : { "distinctValuesCount" : 11298, "nullsCount" : 3, "min" : 0, - "max" : 2510036 + "max" : 2510036, + "dataSize" : null }, "ws_net_paid_inc_tax" : { "distinctValuesCount" : 11483, "nullsCount" : 4, "min" : 0, - "max" : 2685738 + "max" : 2685738, + "dataSize" : null }, "ws_net_paid_inc_ship" : { "distinctValuesCount" : 11617, "nullsCount" : 0, "min" : 0, - "max" : 3564172 + "max" : 3564172, + "dataSize" : null }, "ws_net_paid_inc_ship_tax" : { "distinctValuesCount" : 11778, "nullsCount" : 0, "min" : 0, - "max" : 3739874 + "max" : 3739874, + "dataSize" : null }, "ws_net_profit" : { "distinctValuesCount" : 11477, "nullsCount" : 0, "min" : -965053, - "max" : 1619936 + "max" : 1619936, + "dataSize" : null } } } diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/web_site.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/web_site.json index 303bd7bf6d3d7..abd36b393dbcc 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/web_site.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf0.01/web_site.json @@ -5,157 +5,183 @@ "distinctValuesCount" : 2, "nullsCount" : 0, "min" : 1, - "max" : 2 + "max" : 2, + "dataSize" : null }, "web_site_id" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : "AAAAAAAABAAAAAAA", - "max" : "AAAAAAAACAAAAAAA" + "max" : "AAAAAAAACAAAAAAA", + "dataSize" : 32 }, "web_rec_start_date" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : 10089, - "max" : 10089 + "max" : 10089, + "dataSize" : null }, "web_rec_end_date" : { "distinctValuesCount" : 1, "nullsCount" : 1, "min" : 11184, - "max" : 11184 + "max" : 11184, + "dataSize" : null }, "web_name" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "site_0", - "max" : "site_0" + "max" : "site_0", + "dataSize" : 6 }, "web_open_date_sk" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : 2450798, - "max" : 2450807 + "max" : 2450807, + "dataSize" : null }, "web_close_date_sk" : { "distinctValuesCount" : 1, "nullsCount" : 1, "min" : 2448973, - "max" : 2448973 + "max" : 2448973, + "dataSize" : null }, "web_class" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "Unknown", - "max" : "Unknown" + "max" : "Unknown", + "dataSize" : 7 }, "web_manager" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : "Ronald Shaffer", - "max" : "Tommy Jones" + "max" : "Tommy Jones", + "dataSize" : 25 }, "web_mkt_id" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : 4, - "max" : 6 + "max" : 6, + "dataSize" : null }, "web_mkt_class" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : "Completely excellent things ought to pro", - "max" : "Grey lines ought to result indeed centres. Tod" + "max" : "Grey lines ought to result indeed centres. Tod", + "dataSize" : 86 }, "web_mkt_desc" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : "Lucky passengers know. Red details will not hang alive, international s", - "max" : "Well similar decisions used to keep hardly democratic, personal priorities." + "max" : "Well similar decisions used to keep hardly democratic, personal priorities.", + "dataSize" : 146 }, "web_market_manager" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : "David Myers", - "max" : "Joe George" + "max" : "Joe George", + "dataSize" : 21 }, "web_company_id" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : 4, - "max" : 6 + "max" : 6, + "dataSize" : null }, "web_company_name" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : "cally", - "max" : "ese" + "max" : "ese", + "dataSize" : 8 }, "web_street_number" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : "358", - "max" : "51" + "max" : "51", + "dataSize" : 5 }, "web_street_name" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : "Dogwood Sunset", - "max" : "Ridge Wilson" + "max" : "Ridge Wilson", + "dataSize" : 26 }, "web_street_type" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : "Cir.", - "max" : "Ln" + "max" : "Ln", + "dataSize" : 6 }, "web_suite_number" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : "Suite 150", - "max" : "Suite 330" + "max" : "Suite 330", + "dataSize" : 18 }, "web_city" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "Midway", - "max" : "Midway" + "max" : "Midway", + "dataSize" : 6 }, "web_county" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "Williamson County", - "max" : "Williamson County" + "max" : "Williamson County", + "dataSize" : 17 }, "web_state" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "TN", - "max" : "TN" + "max" : "TN", + "dataSize" : 2 }, "web_zip" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "31904", - "max" : "31904" + "max" : "31904", + "dataSize" : 5 }, "web_country" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "United States", - "max" : "United States" + "max" : "United States", + "dataSize" : 13 }, "web_gmt_offset" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : -500, - "max" : -500 + "max" : -500, + "dataSize" : null }, "web_tax_percentage" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : 0, - "max" : 10 + "max" : 10, + "dataSize" : null } } } diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf1/call_center.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf1/call_center.json index 1280dd286b2df..ead5b4cc3793c 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf1/call_center.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf1/call_center.json @@ -5,187 +5,218 @@ "distinctValuesCount" : 6, "nullsCount" : 0, "min" : 1, - "max" : 6 + "max" : 6, + "dataSize" : null }, "cc_call_center_id" : { "distinctValuesCount" : 3, "nullsCount" : 0, "min" : "AAAAAAAABAAAAAAA", - "max" : "AAAAAAAAEAAAAAAA" + "max" : "AAAAAAAAEAAAAAAA", + "dataSize" : 48 }, "cc_rec_start_date" : { "distinctValuesCount" : 4, "nullsCount" : 0, "min" : 10227, - "max" : 11688 + "max" : 11688, + "dataSize" : null }, "cc_rec_end_date" : { "distinctValuesCount" : 3, "nullsCount" : 3, "min" : 10957, - "max" : 11687 + "max" : 11687, + "dataSize" : null }, "cc_closed_date_sk" : { "distinctValuesCount" : 0, "nullsCount" : 6, "min" : null, - "max" : null + "max" : null, + "dataSize" : null }, "cc_open_date_sk" : { "distinctValuesCount" : 3, "nullsCount" : 0, "min" : 2450806, - "max" : 2451063 + "max" : 2451063, + "dataSize" : null }, "cc_name" : { "distinctValuesCount" : 3, "nullsCount" : 0, "min" : "Mid Atlantic", - "max" : "North Midwest" + "max" : "North Midwest", + "dataSize" : 33 }, "cc_class" : { "distinctValuesCount" : 3, "nullsCount" : 0, "min" : "large", - "max" : "small" + "max" : "small", + "dataSize" : 16 }, "cc_employees" : { "distinctValuesCount" : 5, "nullsCount" : 0, "min" : 1, - "max" : 7 + "max" : 7, + "dataSize" : null }, "cc_sq_ft" : { "distinctValuesCount" : 6, "nullsCount" : 0, "min" : 649, - "max" : 4134 + "max" : 4134, + "dataSize" : null }, "cc_hours" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : "8AM-4PM", - "max" : "8AM-8AM" + "max" : "8AM-8AM", + "dataSize" : 14 }, "cc_manager" : { "distinctValuesCount" : 4, "nullsCount" : 0, "min" : "Bob Belcher", - "max" : "Mark Hightower" + "max" : "Mark Hightower", + "dataSize" : 51 }, "cc_mkt_id" : { "distinctValuesCount" : 3, "nullsCount" : 0, "min" : 2, - "max" : 6 + "max" : 6, + "dataSize" : null }, "cc_mkt_class" : { "distinctValuesCount" : 5, "nullsCount" : 0, "min" : "A bit narrow forms matter animals. Consist", - "max" : "Wrong troops shall work sometimes in a opti" + "max" : "Wrong troops shall work sometimes in a opti", + "dataSize" : 178 }, "cc_mkt_desc" : { "distinctValuesCount" : 4, "nullsCount" : 0, "min" : "Blue, due beds come. Politicians would not make far thoughts. Specifically new horses partic", - "max" : "Shared others could not count fully dollars. New members ca" + "max" : "Shared others could not count fully dollars. New members ca", + "dataSize" : 260 }, "cc_market_manager" : { "distinctValuesCount" : 4, "nullsCount" : 0, "min" : "Gary Colburn", - "max" : "Matthew Clifton" + "max" : "Matthew Clifton", + "dataSize" : 51 }, "cc_division" : { "distinctValuesCount" : 4, "nullsCount" : 0, "min" : 1, - "max" : 5 + "max" : 5, + "dataSize" : null }, "cc_division_name" : { "distinctValuesCount" : 4, "nullsCount" : 0, "min" : "anti", - "max" : "pri" + "max" : "pri", + "dataSize" : 15 }, "cc_company" : { "distinctValuesCount" : 4, "nullsCount" : 0, "min" : 1, - "max" : 6 + "max" : 6, + "dataSize" : null }, "cc_company_name" : { "distinctValuesCount" : 4, "nullsCount" : 0, "min" : "able", - "max" : "pri" + "max" : "pri", + "dataSize" : 17 }, "cc_street_number" : { "distinctValuesCount" : 3, "nullsCount" : 0, "min" : "463", - "max" : "984" + "max" : "984", + "dataSize" : 9 }, "cc_street_name" : { "distinctValuesCount" : 3, "nullsCount" : 0, "min" : "Ash Hill", - "max" : "Pine Ridge" + "max" : "Pine Ridge", + "dataSize" : 29 }, "cc_street_type" : { "distinctValuesCount" : 3, "nullsCount" : 0, "min" : "Boulevard", - "max" : "Way" + "max" : "Way", + "dataSize" : 14 }, "cc_suite_number" : { "distinctValuesCount" : 3, "nullsCount" : 0, "min" : "Suite 0", - "max" : "Suite U" + "max" : "Suite U", + "dataSize" : 22 }, "cc_city" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "Midway", - "max" : "Midway" + "max" : "Midway", + "dataSize" : 6 }, "cc_county" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "Williamson County", - "max" : "Williamson County" + "max" : "Williamson County", + "dataSize" : 17 }, "cc_state" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "TN", - "max" : "TN" + "max" : "TN", + "dataSize" : 2 }, "cc_zip" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "31904", - "max" : "31904" + "max" : "31904", + "dataSize" : 5 }, "cc_country" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "United States", - "max" : "United States" + "max" : "United States", + "dataSize" : 13 }, "cc_gmt_offset" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : -500, - "max" : -500 + "max" : -500, + "dataSize" : null }, "cc_tax_percentage" : { "distinctValuesCount" : 4, "nullsCount" : 0, "min" : 1, - "max" : 12 + "max" : 12, + "dataSize" : null } } } diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf1/catalog_page.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf1/catalog_page.json index 51dbbe07bb14d..a4170f7fd8b2e 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf1/catalog_page.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf1/catalog_page.json @@ -5,55 +5,64 @@ "distinctValuesCount" : 11718, "nullsCount" : 0, "min" : 1, - "max" : 11718 + "max" : 11718, + "dataSize" : null }, "cp_catalog_page_id" : { "distinctValuesCount" : 11718, "nullsCount" : 0, "min" : "AAAAAAAAAAABAAAA", - "max" : "AAAAAAAAPPPBAAAA" + "max" : "AAAAAAAAPPPBAAAA", + "dataSize" : 187488 }, "cp_start_date_sk" : { "distinctValuesCount" : 91, "nullsCount" : 101, "min" : 2450815, - "max" : 2453005 + "max" : 2453005, + "dataSize" : null }, "cp_end_date_sk" : { "distinctValuesCount" : 97, "nullsCount" : 108, "min" : 2450844, - "max" : 2453186 + "max" : 2453186, + "dataSize" : null }, "cp_department" : { "distinctValuesCount" : 1, "nullsCount" : 120, "min" : "DEPARTMENT", - "max" : "DEPARTMENT" + "max" : "DEPARTMENT", + "dataSize" : 10 }, "cp_catalog_number" : { "distinctValuesCount" : 109, "nullsCount" : 104, "min" : 1, - "max" : 109 + "max" : 109, + "dataSize" : null }, "cp_catalog_page_number" : { "distinctValuesCount" : 108, "nullsCount" : 116, "min" : 1, - "max" : 108 + "max" : 108, + "dataSize" : null }, "cp_description" : { "distinctValuesCount" : 11609, "nullsCount" : 109, "min" : "A bit asleep rooms cannot feel short dry secondary leads. Ab", - "max" : "Youngsters should get very. Bad, necessary years must pick telecommunications. Co" + "max" : "Youngsters should get very. Bad, necessary years must pick telecommunications. Co", + "dataSize" : 865538 }, "cp_type" : { "distinctValuesCount" : 3, "nullsCount" : 110, "min" : "bi-annual", - "max" : "quarterly" + "max" : "quarterly", + "dataSize" : 25 } } } diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf1/catalog_returns.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf1/catalog_returns.json index 78160553a28ad..08cf468643ef3 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf1/catalog_returns.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf1/catalog_returns.json @@ -5,163 +5,190 @@ "distinctValuesCount" : 2060, "nullsCount" : 0, "min" : 2450822, - "max" : 2452907 + "max" : 2452907, + "dataSize" : null }, "cr_returned_time_sk" : { "distinctValuesCount" : 65102, "nullsCount" : 0, "min" : 2, - "max" : 86399 + "max" : 86399, + "dataSize" : null }, "cr_item_sk" : { "distinctValuesCount" : 17862, "nullsCount" : 0, "min" : 1, - "max" : 18000 + "max" : 18000, + "dataSize" : null }, "cr_refunded_customer_sk" : { "distinctValuesCount" : 60608, "nullsCount" : 2819, "min" : 2, - "max" : 100000 + "max" : 100000, + "dataSize" : null }, "cr_refunded_cdemo_sk" : { "distinctValuesCount" : 91032, "nullsCount" : 2819, "min" : 5, - "max" : 1920733 + "max" : 1920733, + "dataSize" : null }, "cr_refunded_hdemo_sk" : { "distinctValuesCount" : 7200, "nullsCount" : 2874, "min" : 1, - "max" : 7200 + "max" : 7200, + "dataSize" : null }, "cr_refunded_addr_sk" : { "distinctValuesCount" : 42233, "nullsCount" : 2849, "min" : 1, - "max" : 50000 + "max" : 50000, + "dataSize" : null }, "cr_returning_customer_sk" : { "distinctValuesCount" : 75405, "nullsCount" : 2812, "min" : 1, - "max" : 99999 + "max" : 99999, + "dataSize" : null }, "cr_returning_cdemo_sk" : { "distinctValuesCount" : 135452, "nullsCount" : 2858, "min" : 13, - "max" : 1920792 + "max" : 1920792, + "dataSize" : null }, "cr_returning_hdemo_sk" : { "distinctValuesCount" : 7200, "nullsCount" : 2882, "min" : 1, - "max" : 7200 + "max" : 7200, + "dataSize" : null }, "cr_returning_addr_sk" : { "distinctValuesCount" : 47012, "nullsCount" : 2844, "min" : 1, - "max" : 50000 + "max" : 50000, + "dataSize" : null }, "cr_call_center_sk" : { "distinctValuesCount" : 6, "nullsCount" : 2851, "min" : 1, - "max" : 6 + "max" : 6, + "dataSize" : null }, "cr_catalog_page_sk" : { "distinctValuesCount" : 6536, "nullsCount" : 2877, "min" : 1, - "max" : 9828 + "max" : 9828, + "dataSize" : null }, "cr_ship_mode_sk" : { "distinctValuesCount" : 20, "nullsCount" : 2807, "min" : 1, - "max" : 20 + "max" : 20, + "dataSize" : null }, "cr_warehouse_sk" : { "distinctValuesCount" : 5, "nullsCount" : 2935, "min" : 1, - "max" : 5 + "max" : 5, + "dataSize" : null }, "cr_reason_sk" : { "distinctValuesCount" : 35, "nullsCount" : 2840, "min" : 1, - "max" : 35 + "max" : 35, + "dataSize" : null }, "cr_order_number" : { "distinctValuesCount" : 94519, "nullsCount" : 0, "min" : 2, - "max" : 160000 + "max" : 160000, + "dataSize" : null }, "cr_return_quantity" : { "distinctValuesCount" : 100, "nullsCount" : 2895, "min" : 1, - "max" : 100 + "max" : 100, + "dataSize" : null }, "cr_return_amount" : { "distinctValuesCount" : 82918, "nullsCount" : 2876, "min" : 0, - "max" : 2444540 + "max" : 2444540, + "dataSize" : null }, "cr_return_tax" : { "distinctValuesCount" : 25923, "nullsCount" : 2847, "min" : 0, - "max" : 206243 + "max" : 206243, + "dataSize" : null }, "cr_return_amt_inc_tax" : { "distinctValuesCount" : 96833, "nullsCount" : 2902, "min" : 0, - "max" : 2540376 + "max" : 2540376, + "dataSize" : null }, "cr_fee" : { "distinctValuesCount" : 9951, "nullsCount" : 2873, "min" : 50, - "max" : 10000 + "max" : 10000, + "dataSize" : null }, "cr_return_ship_cost" : { "distinctValuesCount" : 64432, "nullsCount" : 2805, "min" : 0, - "max" : 1189006 + "max" : 1189006, + "dataSize" : null }, "cr_refunded_cash" : { "distinctValuesCount" : 74284, "nullsCount" : 2849, "min" : 0, - "max" : 2211068 + "max" : 2211068, + "dataSize" : null }, "cr_reversed_charge" : { "distinctValuesCount" : 55024, "nullsCount" : 2842, "min" : 0, - "max" : 1715823 + "max" : 1715823, + "dataSize" : null }, "cr_store_credit" : { "distinctValuesCount" : 54547, "nullsCount" : 2846, "min" : 0, - "max" : 1625533 + "max" : 1625533, + "dataSize" : null }, "cr_net_loss" : { "distinctValuesCount" : 86883, "nullsCount" : 2902, "min" : 101, - "max" : 1321389 + "max" : 1321389, + "dataSize" : null } } } diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf1/catalog_sales.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf1/catalog_sales.json index 08a1049f0f339..9e3093044d4b4 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf1/catalog_sales.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf1/catalog_sales.json @@ -5,205 +5,239 @@ "distinctValuesCount" : 1830, "nullsCount" : 7180, "min" : 2450815, - "max" : 2452648 + "max" : 2452648, + "dataSize" : null }, "cs_sold_time_sk" : { "distinctValuesCount" : 67461, "nullsCount" : 7053, "min" : 4, - "max" : 86399 + "max" : 86399, + "dataSize" : null }, "cs_ship_date_sk" : { "distinctValuesCount" : 1922, "nullsCount" : 7147, "min" : 2450817, - "max" : 2452738 + "max" : 2452738, + "dataSize" : null }, "cs_bill_customer_sk" : { "distinctValuesCount" : 79641, "nullsCount" : 7029, "min" : 1, - "max" : 100000 + "max" : 100000, + "dataSize" : null }, "cs_bill_cdemo_sk" : { "distinctValuesCount" : 153251, "nullsCount" : 7150, "min" : 5, - "max" : 1920765 + "max" : 1920765, + "dataSize" : null }, "cs_bill_hdemo_sk" : { "distinctValuesCount" : 7200, "nullsCount" : 7060, "min" : 1, - "max" : 7200 + "max" : 7200, + "dataSize" : null }, "cs_bill_addr_sk" : { "distinctValuesCount" : 47999, "nullsCount" : 7101, "min" : 1, - "max" : 50000 + "max" : 50000, + "dataSize" : null }, "cs_ship_customer_sk" : { "distinctValuesCount" : 79675, "nullsCount" : 7226, "min" : 1, - "max" : 100000 + "max" : 100000, + "dataSize" : null }, "cs_ship_cdemo_sk" : { "distinctValuesCount" : 153350, "nullsCount" : 7137, "min" : 5, - "max" : 1920765 + "max" : 1920765, + "dataSize" : null }, "cs_ship_hdemo_sk" : { "distinctValuesCount" : 7200, "nullsCount" : 7133, "min" : 1, - "max" : 7200 + "max" : 7200, + "dataSize" : null }, "cs_ship_addr_sk" : { "distinctValuesCount" : 47961, "nullsCount" : 7165, "min" : 1, - "max" : 50000 + "max" : 50000, + "dataSize" : null }, "cs_call_center_sk" : { "distinctValuesCount" : 6, "nullsCount" : 7120, "min" : 1, - "max" : 6 + "max" : 6, + "dataSize" : null }, "cs_catalog_page_sk" : { "distinctValuesCount" : 6588, "nullsCount" : 7170, "min" : 1, - "max" : 9828 + "max" : 9828, + "dataSize" : null }, "cs_ship_mode_sk" : { "distinctValuesCount" : 20, "nullsCount" : 7127, "min" : 1, - "max" : 20 + "max" : 20, + "dataSize" : null }, "cs_warehouse_sk" : { "distinctValuesCount" : 5, "nullsCount" : 7146, "min" : 1, - "max" : 5 + "max" : 5, + "dataSize" : null }, "cs_item_sk" : { "distinctValuesCount" : 18000, "nullsCount" : 0, "min" : 1, - "max" : 18000 + "max" : 18000, + "dataSize" : null }, "cs_promo_sk" : { "distinctValuesCount" : 300, "nullsCount" : 7234, "min" : 1, - "max" : 300 + "max" : 300, + "dataSize" : null }, "cs_order_number" : { "distinctValuesCount" : 160000, "nullsCount" : 0, "min" : 1, - "max" : 160000 + "max" : 160000, + "dataSize" : null }, "cs_quantity" : { "distinctValuesCount" : 100, "nullsCount" : 7091, "min" : 1, - "max" : 100 + "max" : 100, + "dataSize" : null }, "cs_wholesale_cost" : { "distinctValuesCount" : 9901, "nullsCount" : 7136, "min" : 100, - "max" : 10000 + "max" : 10000, + "dataSize" : null }, "cs_list_price" : { "distinctValuesCount" : 29455, "nullsCount" : 7213, "min" : 101, - "max" : 30000 + "max" : 30000, + "dataSize" : null }, "cs_sales_price" : { "distinctValuesCount" : 26074, "nullsCount" : 7015, "min" : 0, - "max" : 29783 + "max" : 29783, + "dataSize" : null }, "cs_ext_discount_amt" : { "distinctValuesCount" : 393013, "nullsCount" : 7154, "min" : 0, - "max" : 2830044 + "max" : 2830044, + "dataSize" : null }, "cs_ext_sales_price" : { "distinctValuesCount" : 393328, "nullsCount" : 7208, "min" : 0, - "max" : 2884600 + "max" : 2884600, + "dataSize" : null }, "cs_ext_wholesale_cost" : { "distinctValuesCount" : 341793, "nullsCount" : 7167, "min" : 102, - "max" : 999900 + "max" : 999900, + "dataSize" : null }, "cs_ext_list_price" : { "distinctValuesCount" : 559009, "nullsCount" : 7051, "min" : 129, - "max" : 2997600 + "max" : 2997600, + "dataSize" : null }, "cs_ext_tax" : { "distinctValuesCount" : 84992, "nullsCount" : 7135, "min" : 0, - "max" : 241694 + "max" : 241694, + "dataSize" : null }, "cs_coupon_amt" : { "distinctValuesCount" : 157104, "nullsCount" : 7185, "min" : 0, - "max" : 2418855 + "max" : 2418855, + "dataSize" : null }, "cs_ext_ship_cost" : { "distinctValuesCount" : 258578, "nullsCount" : 7245, "min" : 0, - "max" : 1441600 + "max" : 1441600, + "dataSize" : null }, "cs_net_paid" : { "distinctValuesCount" : 423843, "nullsCount" : 7150, "min" : 0, - "max" : 2876700 + "max" : 2876700, + "dataSize" : null }, "cs_net_paid_inc_tax" : { "distinctValuesCount" : 539634, "nullsCount" : 7127, "min" : 0, - "max" : 3026156 + "max" : 3026156, + "dataSize" : null }, "cs_net_paid_inc_ship" : { "distinctValuesCount" : 544355, "nullsCount" : 0, "min" : 0, - "max" : 4137147 + "max" : 4137147, + "dataSize" : null }, "cs_net_paid_inc_ship_tax" : { "distinctValuesCount" : 701006, "nullsCount" : 0, "min" : 0, - "max" : 4333520 + "max" : 4333520, + "dataSize" : null }, "cs_net_profit" : { "distinctValuesCount" : 492185, "nullsCount" : 0, "min" : -989703, - "max" : 1895000 + "max" : 1895000, + "dataSize" : null } } } diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf1/customer.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf1/customer.json index a85c819d65058..e926ed0485cee 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf1/customer.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf1/customer.json @@ -5,109 +5,127 @@ "distinctValuesCount" : 100000, "nullsCount" : 0, "min" : 1, - "max" : 100000 + "max" : 100000, + "dataSize" : null }, "c_customer_id" : { "distinctValuesCount" : 100000, "nullsCount" : 0, "min" : "AAAAAAAAAAAABAAA", - "max" : "AAAAAAAAPPPPAAAA" + "max" : "AAAAAAAAPPPPAAAA", + "dataSize" : 1600000 }, "c_current_cdemo_sk" : { "distinctValuesCount" : 94215, "nullsCount" : 3438, "min" : 17, - "max" : 1920788 + "max" : 1920788, + "dataSize" : null }, "c_current_hdemo_sk" : { "distinctValuesCount" : 7200, "nullsCount" : 3431, "min" : 1, - "max" : 7200 + "max" : 7200, + "dataSize" : null }, "c_current_addr_sk" : { "distinctValuesCount" : 43282, "nullsCount" : 0, "min" : 1, - "max" : 50000 + "max" : 50000, + "dataSize" : null }, "c_first_shipto_date_sk" : { "distinctValuesCount" : 3651, "nullsCount" : 3443, "min" : 2449028, - "max" : 2452678 + "max" : 2452678, + "dataSize" : null }, "c_first_sales_date_sk" : { "distinctValuesCount" : 3651, "nullsCount" : 3518, "min" : 2448998, - "max" : 2452648 + "max" : 2452648, + "dataSize" : null }, "c_salutation" : { "distinctValuesCount" : 6, "nullsCount" : 3410, "min" : "Dr.", - "max" : "Sir" + "max" : "Sir", + "dataSize" : 20 }, "c_first_name" : { "distinctValuesCount" : 4131, "nullsCount" : 3492, "min" : "Aaron", - "max" : "Zulma" + "max" : "Zulma", + "dataSize" : 24620 }, "c_last_name" : { "distinctValuesCount" : 4972, "nullsCount" : 3497, "min" : "Aaron", - "max" : "Zuniga" + "max" : "Zuniga", + "dataSize" : 31159 }, "c_preferred_cust_flag" : { "distinctValuesCount" : 2, "nullsCount" : 3426, "min" : "N", - "max" : "Y" + "max" : "Y", + "dataSize" : 2 }, "c_birth_day" : { "distinctValuesCount" : 31, "nullsCount" : 3461, "min" : 1, - "max" : 31 + "max" : 31, + "dataSize" : null }, "c_birth_month" : { "distinctValuesCount" : 12, "nullsCount" : 3449, "min" : 1, - "max" : 12 + "max" : 12, + "dataSize" : null }, "c_birth_year" : { "distinctValuesCount" : 69, "nullsCount" : 3453, "min" : 1924, - "max" : 1992 + "max" : 1992, + "dataSize" : null }, "c_birth_country" : { "distinctValuesCount" : 211, "nullsCount" : 3439, "min" : "AFGHANISTAN", - "max" : "ZIMBABWE" + "max" : "ZIMBABWE", + "dataSize" : 1836 }, "c_login" : { "distinctValuesCount" : 0, "nullsCount" : 100000, "min" : null, - "max" : null + "max" : null, + "dataSize" : 0 }, "c_email_address" : { "distinctValuesCount" : 96477, "nullsCount" : 3521, "min" : "Aaron.Anderson@0CQ4QUkBY2Q.edu", - "max" : "Zulma.Carter@MfvjVN43Udd95KeZ.com" + "max" : "Zulma.Carter@MfvjVN43Udd95KeZ.com", + "dataSize" : 2648526 }, "c_last_review_date_sk" : { "distinctValuesCount" : 366, "nullsCount" : 3484, "min" : 2452283, - "max" : 2452648 + "max" : 2452648, + "dataSize" : null } } } diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf1/customer_address.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf1/customer_address.json index 75e29e7511a35..97af24643d15f 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf1/customer_address.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf1/customer_address.json @@ -5,79 +5,92 @@ "distinctValuesCount" : 50000, "nullsCount" : 0, "min" : 1, - "max" : 50000 + "max" : 50000, + "dataSize" : null }, "ca_address_id" : { "distinctValuesCount" : 50000, "nullsCount" : 0, "min" : "AAAAAAAAAAABAAAA", - "max" : "AAAAAAAAPPPLAAAA" + "max" : "AAAAAAAAPPPLAAAA", + "dataSize" : 800000 }, "ca_street_number" : { "distinctValuesCount" : 1000, "nullsCount" : 1532, "min" : "1", - "max" : "999" + "max" : "999", + "dataSize" : 2893 }, "ca_street_name" : { "distinctValuesCount" : 6901, "nullsCount" : 1479, "min" : "10th ", - "max" : "Woodland Woodland" + "max" : "Woodland Woodland", + "dataSize" : 81513 }, "ca_street_type" : { "distinctValuesCount" : 20, "nullsCount" : 1501, "min" : "Ave", - "max" : "Wy" + "max" : "Wy", + "dataSize" : 84 }, "ca_suite_number" : { "distinctValuesCount" : 75, "nullsCount" : 1485, "min" : "Suite 0", - "max" : "Suite Y" + "max" : "Suite Y", + "dataSize" : 614 }, "ca_city" : { "distinctValuesCount" : 695, "nullsCount" : 1519, "min" : "Aberdeen", - "max" : "Youngstown" + "max" : "Youngstown", + "dataSize" : 5594 }, "ca_county" : { "distinctValuesCount" : 1846, "nullsCount" : 1464, "min" : "Abbeville County", - "max" : "Ziebach County" + "max" : "Ziebach County", + "dataSize" : 26288 }, "ca_state" : { "distinctValuesCount" : 51, "nullsCount" : 1550, "min" : "AK", - "max" : "WY" + "max" : "WY", + "dataSize" : 102 }, "ca_zip" : { "distinctValuesCount" : 3692, "nullsCount" : 1539, "min" : "00601", - "max" : "99981" + "max" : "99981", + "dataSize" : 18460 }, "ca_country" : { "distinctValuesCount" : 1, "nullsCount" : 1525, "min" : "United States", - "max" : "United States" + "max" : "United States", + "dataSize" : 13 }, "ca_gmt_offset" : { "distinctValuesCount" : 6, "nullsCount" : 1556, "min" : -1000, - "max" : -500 + "max" : -500, + "dataSize" : null }, "ca_location_type" : { "distinctValuesCount" : 3, "nullsCount" : 1492, "min" : "apartment", - "max" : "single family" + "max" : "single family", + "dataSize" : 27 } } } diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf1/customer_demographics.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf1/customer_demographics.json index e0198fa52728d..8718cc0978e9c 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf1/customer_demographics.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf1/customer_demographics.json @@ -5,55 +5,64 @@ "distinctValuesCount" : 1920800, "nullsCount" : 0, "min" : 1, - "max" : 1920800 + "max" : 1920800, + "dataSize" : null }, "cd_gender" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : "F", - "max" : "M" + "max" : "M", + "dataSize" : 2 }, "cd_marital_status" : { "distinctValuesCount" : 5, "nullsCount" : 0, "min" : "D", - "max" : "W" + "max" : "W", + "dataSize" : 5 }, "cd_education_status" : { "distinctValuesCount" : 7, "nullsCount" : 0, "min" : "2 yr Degree", - "max" : "Unknown" + "max" : "Unknown", + "dataSize" : 67 }, "cd_purchase_estimate" : { "distinctValuesCount" : 20, "nullsCount" : 0, "min" : 500, - "max" : 10000 + "max" : 10000, + "dataSize" : null }, "cd_credit_rating" : { "distinctValuesCount" : 4, "nullsCount" : 0, "min" : "Good", - "max" : "Unknown" + "max" : "Unknown", + "dataSize" : 28 }, "cd_dep_count" : { "distinctValuesCount" : 7, "nullsCount" : 0, "min" : 0, - "max" : 6 + "max" : 6, + "dataSize" : null }, "cd_dep_employed_count" : { "distinctValuesCount" : 7, "nullsCount" : 0, "min" : 0, - "max" : 6 + "max" : 6, + "dataSize" : null }, "cd_dep_college_count" : { "distinctValuesCount" : 7, "nullsCount" : 0, "min" : 0, - "max" : 6 + "max" : 6, + "dataSize" : null } } } diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf1/date_dim.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf1/date_dim.json index cedf72418b93b..5f0050b2f4bab 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf1/date_dim.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf1/date_dim.json @@ -5,169 +5,197 @@ "distinctValuesCount" : 73049, "nullsCount" : 0, "min" : 2415022, - "max" : 2488070 + "max" : 2488070, + "dataSize" : null }, "d_date_id" : { "distinctValuesCount" : 73049, "nullsCount" : 0, "min" : "AAAAAAAAAAAAFCAA", - "max" : "AAAAAAAAPPPPECAA" + "max" : "AAAAAAAAPPPPECAA", + "dataSize" : 1168784 }, "d_date" : { "distinctValuesCount" : 73049, "nullsCount" : 0, "min" : -25566, - "max" : 47482 + "max" : 47482, + "dataSize" : null }, "d_month_seq" : { "distinctValuesCount" : 2401, "nullsCount" : 0, "min" : 0, - "max" : 2400 + "max" : 2400, + "dataSize" : null }, "d_week_seq" : { "distinctValuesCount" : 10436, "nullsCount" : 0, "min" : 1, - "max" : 10436 + "max" : 10436, + "dataSize" : null }, "d_quarter_seq" : { "distinctValuesCount" : 801, "nullsCount" : 0, "min" : 1, - "max" : 801 + "max" : 801, + "dataSize" : null }, "d_year" : { "distinctValuesCount" : 201, "nullsCount" : 0, "min" : 1900, - "max" : 2100 + "max" : 2100, + "dataSize" : null }, "d_dow" : { "distinctValuesCount" : 7, "nullsCount" : 0, "min" : 0, - "max" : 6 + "max" : 6, + "dataSize" : null }, "d_moy" : { "distinctValuesCount" : 12, "nullsCount" : 0, "min" : 1, - "max" : 12 + "max" : 12, + "dataSize" : null }, "d_dom" : { "distinctValuesCount" : 31, "nullsCount" : 0, "min" : 1, - "max" : 31 + "max" : 31, + "dataSize" : null }, "d_qoy" : { "distinctValuesCount" : 4, "nullsCount" : 0, "min" : 1, - "max" : 4 + "max" : 4, + "dataSize" : null }, "d_fy_year" : { "distinctValuesCount" : 201, "nullsCount" : 0, "min" : 1900, - "max" : 2100 + "max" : 2100, + "dataSize" : null }, "d_fy_quarter_seq" : { "distinctValuesCount" : 801, "nullsCount" : 0, "min" : 1, - "max" : 801 + "max" : 801, + "dataSize" : null }, "d_fy_week_seq" : { "distinctValuesCount" : 10436, "nullsCount" : 0, "min" : 1, - "max" : 10436 + "max" : 10436, + "dataSize" : null }, "d_day_name" : { "distinctValuesCount" : 7, "nullsCount" : 0, "min" : "Friday", - "max" : "Wednesday" + "max" : "Wednesday", + "dataSize" : 50 }, "d_quarter_name" : { "distinctValuesCount" : 801, "nullsCount" : 0, "min" : "1900Q1", - "max" : "2100Q1" + "max" : "2100Q1", + "dataSize" : 4806 }, "d_holiday" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : "N", - "max" : "Y" + "max" : "Y", + "dataSize" : 2 }, "d_weekend" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : "N", - "max" : "Y" + "max" : "Y", + "dataSize" : 2 }, "d_following_holiday" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : "N", - "max" : "Y" + "max" : "Y", + "dataSize" : 2 }, "d_first_dom" : { "distinctValuesCount" : 2401, "nullsCount" : 0, "min" : 2415021, - "max" : 2488070 + "max" : 2488070, + "dataSize" : null }, "d_last_dom" : { "distinctValuesCount" : 2401, "nullsCount" : 0, "min" : 2415020, - "max" : 2488372 + "max" : 2488372, + "dataSize" : null }, "d_same_day_ly" : { "distinctValuesCount" : 73000, "nullsCount" : 0, "min" : 2414657, - "max" : 2487705 + "max" : 2487705, + "dataSize" : null }, "d_same_day_lq" : { "distinctValuesCount" : 72698, "nullsCount" : 0, "min" : 2414930, - "max" : 2487978 + "max" : 2487978, + "dataSize" : null }, "d_current_day" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "N", - "max" : "N" + "max" : "N", + "dataSize" : 1 }, "d_current_week" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "N", - "max" : "N" + "max" : "N", + "dataSize" : 1 }, "d_current_month" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : "N", - "max" : "Y" + "max" : "Y", + "dataSize" : 2 }, "d_current_quarter" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : "N", - "max" : "Y" + "max" : "Y", + "dataSize" : 2 }, "d_current_year" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : "N", - "max" : "Y" + "max" : "Y", + "dataSize" : 2 } } } diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf1/dbgen_version.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf1/dbgen_version.json index 735bba64f4486..e24cf3d69d45a 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf1/dbgen_version.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf1/dbgen_version.json @@ -5,25 +5,29 @@ "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "2.0.0", - "max" : "2.0.0" + "max" : "2.0.0", + "dataSize" : 5 }, "dv_create_date" : { "distinctValuesCount" : 1, "nullsCount" : 0, - "min" : 17381, - "max" : 17381 + "min" : 17666, + "max" : 17666, + "dataSize" : null }, "dv_create_time" : { "distinctValuesCount" : 1, "nullsCount" : 0, - "min" : 78548000, - "max" : 78548000 + "min" : 57622000, + "max" : 57622000, + "dataSize" : null }, "dv_cmdline_args" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "", - "max" : "" + "max" : "", + "dataSize" : 0 } } } diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf1/household_demographics.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf1/household_demographics.json index f664e8d425682..c087ccc6f80b8 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf1/household_demographics.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf1/household_demographics.json @@ -5,31 +5,36 @@ "distinctValuesCount" : 7200, "nullsCount" : 0, "min" : 1, - "max" : 7200 + "max" : 7200, + "dataSize" : null }, "hd_income_band_sk" : { "distinctValuesCount" : 20, "nullsCount" : 0, "min" : 1, - "max" : 20 + "max" : 20, + "dataSize" : null }, "hd_buy_potential" : { "distinctValuesCount" : 6, "nullsCount" : 0, "min" : "0-500", - "max" : "Unknown" + "max" : "Unknown", + "dataSize" : 45 }, "hd_dep_count" : { "distinctValuesCount" : 10, "nullsCount" : 0, "min" : 0, - "max" : 9 + "max" : 9, + "dataSize" : null }, "hd_vehicle_count" : { "distinctValuesCount" : 6, "nullsCount" : 0, "min" : -1, - "max" : 4 + "max" : 4, + "dataSize" : null } } } diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf1/income_band.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf1/income_band.json index 568c43607612c..3ca986ecc85c2 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf1/income_band.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf1/income_band.json @@ -5,19 +5,22 @@ "distinctValuesCount" : 20, "nullsCount" : 0, "min" : 1, - "max" : 20 + "max" : 20, + "dataSize" : null }, "ib_lower_bound" : { "distinctValuesCount" : 20, "nullsCount" : 0, "min" : 0, - "max" : 190001 + "max" : 190001, + "dataSize" : null }, "ib_upper_bound" : { "distinctValuesCount" : 20, "nullsCount" : 0, "min" : 10000, - "max" : 200000 + "max" : 200000, + "dataSize" : null } } } diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf1/inventory.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf1/inventory.json index 80a022775ce0c..7aea0ff2d4e58 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf1/inventory.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf1/inventory.json @@ -5,25 +5,29 @@ "distinctValuesCount" : 261, "nullsCount" : 0, "min" : 2450815, - "max" : 2452635 + "max" : 2452635, + "dataSize" : null }, "inv_item_sk" : { "distinctValuesCount" : 18000, "nullsCount" : 0, "min" : 1, - "max" : 18000 + "max" : 18000, + "dataSize" : null }, "inv_warehouse_sk" : { "distinctValuesCount" : 5, "nullsCount" : 0, "min" : 1, - "max" : 5 + "max" : 5, + "dataSize" : null }, "inv_quantity_on_hand" : { "distinctValuesCount" : 1001, "nullsCount" : 586913, "min" : 0, - "max" : 1000 + "max" : 1000, + "dataSize" : null } } } diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf1/item.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf1/item.json index 508b95b85d1f4..708fecffca0b1 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf1/item.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf1/item.json @@ -5,133 +5,155 @@ "distinctValuesCount" : 18000, "nullsCount" : 0, "min" : 1, - "max" : 18000 + "max" : 18000, + "dataSize" : null }, "i_item_id" : { "distinctValuesCount" : 9000, "nullsCount" : 0, "min" : "AAAAAAAAAAABAAAA", - "max" : "AAAAAAAAPPPBAAAA" + "max" : "AAAAAAAAPPPBAAAA", + "dataSize" : 144000 }, "i_rec_start_date" : { "distinctValuesCount" : 4, "nullsCount" : 46, "min" : 10161, - "max" : 11622 + "max" : 11622, + "dataSize" : null }, "i_rec_end_date" : { "distinctValuesCount" : 3, "nullsCount" : 9000, "min" : 10891, - "max" : 11621 + "max" : 11621, + "dataSize" : null }, "i_item_desc" : { "distinctValuesCount" : 13453, "nullsCount" : 51, "min" : "A", - "max" : "Young, working horses see mentally " + "max" : "Young, working horses see mentally ", + "dataSize" : 1357155 }, "i_current_price" : { "distinctValuesCount" : 2688, "nullsCount" : 45, "min" : 9, - "max" : 9999 + "max" : 9999, + "dataSize" : null }, "i_wholesale_cost" : { "distinctValuesCount" : 2040, "nullsCount" : 46, "min" : 2, - "max" : 8736 + "max" : 8736, + "dataSize" : null }, "i_brand_id" : { "distinctValuesCount" : 948, "nullsCount" : 44, "min" : 1001001, - "max" : 10016017 + "max" : 10016017, + "dataSize" : null }, "i_brand" : { "distinctValuesCount" : 712, "nullsCount" : 40, "min" : "amalgamalg #1", - "max" : "univunivamalg #9" + "max" : "univunivamalg #9", + "dataSize" : 11590 }, "i_class_id" : { "distinctValuesCount" : 16, "nullsCount" : 35, "min" : 1, - "max" : 16 + "max" : 16, + "dataSize" : null }, "i_class" : { "distinctValuesCount" : 99, "nullsCount" : 43, "min" : "accent", - "max" : "womens watch" + "max" : "womens watch", + "dataSize" : 785 }, "i_category_id" : { "distinctValuesCount" : 10, "nullsCount" : 42, "min" : 1, - "max" : 10 + "max" : 10, + "dataSize" : null }, "i_category" : { "distinctValuesCount" : 10, "nullsCount" : 43, "min" : "Books", - "max" : "Women" + "max" : "Women", + "dataSize" : 59 }, "i_manufact_id" : { "distinctValuesCount" : 994, "nullsCount" : 38, "min" : 1, - "max" : 1000 + "max" : 1000, + "dataSize" : null }, "i_manufact" : { "distinctValuesCount" : 989, "nullsCount" : 43, "min" : "able", - "max" : "pripripri" + "max" : "pripripri", + "dataSize" : 11550 }, "i_size" : { "distinctValuesCount" : 7, "nullsCount" : 41, "min" : "N/A", - "max" : "small" + "max" : "small", + "dataSize" : 43 }, "i_formulation" : { "distinctValuesCount" : 13497, "nullsCount" : 43, "min" : "0001145946rose283864", - "max" : "yellow97669389506333" + "max" : "yellow97669389506333", + "dataSize" : 269940 }, "i_color" : { "distinctValuesCount" : 92, "nullsCount" : 45, "min" : "almond", - "max" : "yellow" + "max" : "yellow", + "dataSize" : 529 }, "i_units" : { "distinctValuesCount" : 21, "nullsCount" : 43, "min" : "Box", - "max" : "Unknown" + "max" : "Unknown", + "dataSize" : 88 }, "i_container" : { "distinctValuesCount" : 1, "nullsCount" : 39, "min" : "Unknown", - "max" : "Unknown" + "max" : "Unknown", + "dataSize" : 7 }, "i_manager_id" : { "distinctValuesCount" : 100, "nullsCount" : 41, "min" : 1, - "max" : 100 + "max" : 100, + "dataSize" : null }, "i_product_name" : { "distinctValuesCount" : 17964, "nullsCount" : 36, "min" : "able", - "max" : "pripripripriought" + "max" : "pripripripriought", + "dataSize" : 324050 } } } diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf1/promotion.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf1/promotion.json index 57c2782add442..5bf09d649b493 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf1/promotion.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf1/promotion.json @@ -5,115 +5,134 @@ "distinctValuesCount" : 300, "nullsCount" : 0, "min" : 1, - "max" : 300 + "max" : 300, + "dataSize" : null }, "p_promo_id" : { "distinctValuesCount" : 300, "nullsCount" : 0, "min" : "AAAAAAAAAABAAAAA", - "max" : "AAAAAAAAPPAAAAAA" + "max" : "AAAAAAAAPPAAAAAA", + "dataSize" : 4800 }, "p_start_date_sk" : { "distinctValuesCount" : 255, "nullsCount" : 6, "min" : 2450100, - "max" : 2450913 + "max" : 2450913, + "dataSize" : null }, "p_end_date_sk" : { "distinctValuesCount" : 249, "nullsCount" : 6, "min" : 2450132, - "max" : 2450955 + "max" : 2450955, + "dataSize" : null }, "p_item_sk" : { "distinctValuesCount" : 291, "nullsCount" : 7, "min" : 28, - "max" : 17926 + "max" : 17926, + "dataSize" : null }, "p_cost" : { "distinctValuesCount" : 1, "nullsCount" : 6, "min" : 100000, - "max" : 100000 + "max" : 100000, + "dataSize" : null }, "p_response_targe" : { "distinctValuesCount" : 1, "nullsCount" : 7, "min" : 1, - "max" : 1 + "max" : 1, + "dataSize" : null }, "p_promo_name" : { "distinctValuesCount" : 10, "nullsCount" : 7, "min" : "able", - "max" : "pri" + "max" : "pri", + "dataSize" : 40 }, "p_channel_dmail" : { "distinctValuesCount" : 2, "nullsCount" : 5, "min" : "N", - "max" : "Y" + "max" : "Y", + "dataSize" : 2 }, "p_channel_email" : { "distinctValuesCount" : 1, "nullsCount" : 5, "min" : "N", - "max" : "N" + "max" : "N", + "dataSize" : 1 }, "p_channel_catalog" : { "distinctValuesCount" : 1, "nullsCount" : 4, "min" : "N", - "max" : "N" + "max" : "N", + "dataSize" : 1 }, "p_channel_tv" : { "distinctValuesCount" : 1, "nullsCount" : 6, "min" : "N", - "max" : "N" + "max" : "N", + "dataSize" : 1 }, "p_channel_radio" : { "distinctValuesCount" : 1, "nullsCount" : 6, "min" : "N", - "max" : "N" + "max" : "N", + "dataSize" : 1 }, "p_channel_press" : { "distinctValuesCount" : 1, "nullsCount" : 7, "min" : "N", - "max" : "N" + "max" : "N", + "dataSize" : 1 }, "p_channel_event" : { "distinctValuesCount" : 1, "nullsCount" : 4, "min" : "N", - "max" : "N" + "max" : "N", + "dataSize" : 1 }, "p_channel_demo" : { "distinctValuesCount" : 1, "nullsCount" : 3, "min" : "N", - "max" : "N" + "max" : "N", + "dataSize" : 1 }, "p_channel_details" : { "distinctValuesCount" : 298, "nullsCount" : 2, "min" : "Able patients will lend as. Southern components must com", - "max" : "Young, valuable companies watch walls. Payments can flour" + "max" : "Young, valuable companies watch walls. Payments can flour", + "dataSize" : 11989 }, "p_purpose" : { "distinctValuesCount" : 1, "nullsCount" : 4, "min" : "Unknown", - "max" : "Unknown" + "max" : "Unknown", + "dataSize" : 7 }, "p_discount_active" : { "distinctValuesCount" : 1, "nullsCount" : 7, "min" : "N", - "max" : "N" + "max" : "N", + "dataSize" : 1 } } } diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf1/reason.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf1/reason.json index 310ba0c0adcbf..45d17ccd9958b 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf1/reason.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf1/reason.json @@ -5,19 +5,22 @@ "distinctValuesCount" : 35, "nullsCount" : 0, "min" : 1, - "max" : 35 + "max" : 35, + "dataSize" : null }, "r_reason_id" : { "distinctValuesCount" : 35, "nullsCount" : 0, "min" : "AAAAAAAAABAAAAAA", - "max" : "AAAAAAAAPBAAAAAA" + "max" : "AAAAAAAAPBAAAAAA", + "dataSize" : 560 }, "r_reason_desc" : { "distinctValuesCount" : 34, "nullsCount" : 0, "min" : "Did not fit", - "max" : "unauthoized purchase" + "max" : "unauthoized purchase", + "dataSize" : 569 } } } diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf1/ship_mode.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf1/ship_mode.json index b2de07e556e91..8f95a74eae37a 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf1/ship_mode.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf1/ship_mode.json @@ -5,37 +5,43 @@ "distinctValuesCount" : 20, "nullsCount" : 0, "min" : 1, - "max" : 20 + "max" : 20, + "dataSize" : null }, "sm_ship_mode_id" : { "distinctValuesCount" : 20, "nullsCount" : 0, "min" : "AAAAAAAAABAAAAAA", - "max" : "AAAAAAAAPAAAAAAA" + "max" : "AAAAAAAAPAAAAAAA", + "dataSize" : 320 }, "sm_type" : { "distinctValuesCount" : 6, "nullsCount" : 0, "min" : "EXPRESS", - "max" : "TWO DAY" + "max" : "TWO DAY", + "dataSize" : 45 }, "sm_code" : { "distinctValuesCount" : 4, "nullsCount" : 0, "min" : "AIR", - "max" : "SURFACE" + "max" : "SURFACE", + "dataSize" : 17 }, "sm_carrier" : { "distinctValuesCount" : 20, "nullsCount" : 0, "min" : "AIRBORNE", - "max" : "ZOUROS" + "max" : "ZOUROS", + "dataSize" : 133 }, "sm_contract" : { "distinctValuesCount" : 20, "nullsCount" : 0, "min" : "2mM8l", - "max" : "yVfotg7Tio3MVhBg6Bkn" + "max" : "yVfotg7Tio3MVhBg6Bkn", + "dataSize" : 252 } } } diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf1/store.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf1/store.json index 3ce896fc33cba..09603b4c3e913 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf1/store.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf1/store.json @@ -5,175 +5,204 @@ "distinctValuesCount" : 12, "nullsCount" : 0, "min" : 1, - "max" : 12 + "max" : 12, + "dataSize" : null }, "s_store_id" : { "distinctValuesCount" : 6, "nullsCount" : 0, "min" : "AAAAAAAABAAAAAAA", - "max" : "AAAAAAAAKAAAAAAA" + "max" : "AAAAAAAAKAAAAAAA", + "dataSize" : 96 }, "s_rec_start_date" : { "distinctValuesCount" : 4, "nullsCount" : 0, "min" : 9933, - "max" : 11394 + "max" : 11394, + "dataSize" : null }, "s_rec_end_date" : { "distinctValuesCount" : 3, "nullsCount" : 6, "min" : 10663, - "max" : 11393 + "max" : 11393, + "dataSize" : null }, "s_closed_date_sk" : { "distinctValuesCount" : 3, "nullsCount" : 9, "min" : 2450910, - "max" : 2451189 + "max" : 2451189, + "dataSize" : null }, "s_store_name" : { "distinctValuesCount" : 8, "nullsCount" : 0, "min" : "able", - "max" : "ought" + "max" : "ought", + "dataSize" : 33 }, "s_number_employees" : { "distinctValuesCount" : 9, "nullsCount" : 0, "min" : 218, - "max" : 297 + "max" : 297, + "dataSize" : null }, "s_floor_space" : { "distinctValuesCount" : 10, "nullsCount" : 0, "min" : 5219562, - "max" : 9341467 + "max" : 9341467, + "dataSize" : null }, "s_hours" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : "8AM-12AM", - "max" : "8AM-4PM" + "max" : "8AM-4PM", + "dataSize" : 15 }, "s_manager" : { "distinctValuesCount" : 7, "nullsCount" : 0, "min" : "Brett Yates", - "max" : "William Ward" + "max" : "William Ward", + "dataSize" : 86 }, "s_market_id" : { "distinctValuesCount" : 7, "nullsCount" : 0, "min" : 2, - "max" : 10 + "max" : 10, + "dataSize" : null }, "s_geography_class" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "Unknown", - "max" : "Unknown" + "max" : "Unknown", + "dataSize" : 7 }, "s_market_desc" : { "distinctValuesCount" : 10, "nullsCount" : 0, "min" : "Architects coul", - "max" : "Various bars make most. Difficult levels introduce at a boots. Buildings welcome only never el" + "max" : "Various bars make most. Difficult levels introduce at a boots. Buildings welcome only never el", + "dataSize" : 504 }, "s_market_manager" : { "distinctValuesCount" : 7, "nullsCount" : 0, "min" : "Charles Bartley", - "max" : "Thomas Pollack" + "max" : "Thomas Pollack", + "dataSize" : 97 }, "s_division_id" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : 1, - "max" : 1 + "max" : 1, + "dataSize" : null }, "s_division_name" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "Unknown", - "max" : "Unknown" + "max" : "Unknown", + "dataSize" : 7 }, "s_company_id" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : 1, - "max" : 1 + "max" : 1, + "dataSize" : null }, "s_company_name" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "Unknown", - "max" : "Unknown" + "max" : "Unknown", + "dataSize" : 7 }, "s_street_number" : { "distinctValuesCount" : 9, "nullsCount" : 0, "min" : "175", - "max" : "877" + "max" : "877", + "dataSize" : 26 }, "s_street_name" : { "distinctValuesCount" : 12, "nullsCount" : 0, "min" : "12th ", - "max" : "Sycamore " + "max" : "Sycamore ", + "dataSize" : 79 }, "s_street_type" : { "distinctValuesCount" : 8, "nullsCount" : 0, "min" : "Boulevard", - "max" : "Wy" + "max" : "Wy", + "dataSize" : 35 }, "s_suite_number" : { "distinctValuesCount" : 11, "nullsCount" : 0, "min" : "Suite 100", - "max" : "Suite T" + "max" : "Suite T", + "dataSize" : 92 }, "s_city" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : "Fairview", - "max" : "Midway" + "max" : "Midway", + "dataSize" : 14 }, "s_county" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "Williamson County", - "max" : "Williamson County" + "max" : "Williamson County", + "dataSize" : 17 }, "s_state" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "TN", - "max" : "TN" + "max" : "TN", + "dataSize" : 2 }, "s_zip" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : "31904", - "max" : "35709" + "max" : "35709", + "dataSize" : 10 }, "s_country" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "United States", - "max" : "United States" + "max" : "United States", + "dataSize" : 13 }, "s_gmt_offset" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : -500, - "max" : -500 + "max" : -500, + "dataSize" : null }, "s_tax_precentage" : { "distinctValuesCount" : 5, "nullsCount" : 0, "min" : 1, - "max" : 11 + "max" : 11, + "dataSize" : null } } } diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf1/store_returns.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf1/store_returns.json index 20191eb6adcf5..5029ed2b63e72 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf1/store_returns.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf1/store_returns.json @@ -5,121 +5,141 @@ "distinctValuesCount" : 2003, "nullsCount" : 10012, "min" : 2450820, - "max" : 2452822 + "max" : 2452822, + "dataSize" : null }, "sr_return_time_sk" : { "distinctValuesCount" : 32393, "nullsCount" : 9946, "min" : 28799, - "max" : 61199 + "max" : 61199, + "dataSize" : null }, "sr_item_sk" : { "distinctValuesCount" : 17996, "nullsCount" : 0, "min" : 1, - "max" : 18000 + "max" : 18000, + "dataSize" : null }, "sr_customer_sk" : { "distinctValuesCount" : 86999, "nullsCount" : 10016, "min" : 1, - "max" : 100000 + "max" : 100000, + "dataSize" : null }, "sr_cdemo_sk" : { "distinctValuesCount" : 258383, "nullsCount" : 9883, "min" : 2, - "max" : 1920800 + "max" : 1920800, + "dataSize" : null }, "sr_hdemo_sk" : { "distinctValuesCount" : 7200, "nullsCount" : 10121, "min" : 1, - "max" : 7200 + "max" : 7200, + "dataSize" : null }, "sr_addr_sk" : { "distinctValuesCount" : 49799, "nullsCount" : 10193, "min" : 1, - "max" : 50000 + "max" : 50000, + "dataSize" : null }, "sr_store_sk" : { "distinctValuesCount" : 6, "nullsCount" : 10062, "min" : 1, - "max" : 10 + "max" : 10, + "dataSize" : null }, "sr_reason_sk" : { "distinctValuesCount" : 35, "nullsCount" : 9984, "min" : 1, - "max" : 35 + "max" : 35, + "dataSize" : null }, "sr_ticket_number" : { "distinctValuesCount" : 169672, "nullsCount" : 0, "min" : 1, - "max" : 240000 + "max" : 240000, + "dataSize" : null }, "sr_return_quantity" : { "distinctValuesCount" : 100, "nullsCount" : 10063, "min" : 1, - "max" : 100 + "max" : 100, + "dataSize" : null }, "sr_return_amt" : { "distinctValuesCount" : 113489, "nullsCount" : 10028, "min" : 0, - "max" : 1691712 + "max" : 1691712, + "dataSize" : null }, "sr_return_tax" : { "distinctValuesCount" : 29230, "nullsCount" : 10177, "min" : 0, - "max" : 125326 + "max" : 125326, + "dataSize" : null }, "sr_return_amt_inc_tax" : { "distinctValuesCount" : 141720, "nullsCount" : 9950, "min" : 0, - "max" : 1759380 + "max" : 1759380, + "dataSize" : null }, "sr_fee" : { "distinctValuesCount" : 9951, "nullsCount" : 10065, "min" : 50, - "max" : 10000 + "max" : 10000, + "dataSize" : null }, "sr_return_ship_cost" : { "distinctValuesCount" : 82103, "nullsCount" : 9871, "min" : 0, - "max" : 863106 + "max" : 863106, + "dataSize" : null }, "sr_refunded_cash" : { "distinctValuesCount" : 101889, "nullsCount" : 10040, "min" : 0, - "max" : 1488706 + "max" : 1488706, + "dataSize" : null }, "sr_reversed_charge" : { "distinctValuesCount" : 73365, "nullsCount" : 10032, "min" : 0, - "max" : 1153104 + "max" : 1153104, + "dataSize" : null }, "sr_store_credit" : { "distinctValuesCount" : 72202, "nullsCount" : 10098, "min" : 0, - "max" : 1135857 + "max" : 1135857, + "dataSize" : null }, "sr_net_loss" : { "distinctValuesCount" : 118454, "nullsCount" : 9973, "min" : 51, - "max" : 925612 + "max" : 925612, + "dataSize" : null } } } diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf1/store_sales.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf1/store_sales.json index eed3e27b05706..069e6b3c18115 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf1/store_sales.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf1/store_sales.json @@ -5,139 +5,162 @@ "distinctValuesCount" : 1823, "nullsCount" : 130093, "min" : 2450816, - "max" : 2452642 + "max" : 2452642, + "dataSize" : null }, "ss_sold_time_sk" : { "distinctValuesCount" : 45647, "nullsCount" : 129637, "min" : 28800, - "max" : 75599 + "max" : 75599, + "dataSize" : null }, "ss_item_sk" : { "distinctValuesCount" : 18000, "nullsCount" : 0, "min" : 1, - "max" : 18000 + "max" : 18000, + "dataSize" : null }, "ss_customer_sk" : { "distinctValuesCount" : 90858, "nullsCount" : 129752, "min" : 1, - "max" : 100000 + "max" : 100000, + "dataSize" : null }, "ss_cdemo_sk" : { "distinctValuesCount" : 225783, "nullsCount" : 129700, "min" : 15, - "max" : 1920797 + "max" : 1920797, + "dataSize" : null }, "ss_hdemo_sk" : { "distinctValuesCount" : 7200, "nullsCount" : 129847, "min" : 1, - "max" : 7200 + "max" : 7200, + "dataSize" : null }, "ss_addr_sk" : { "distinctValuesCount" : 49600, "nullsCount" : 129975, "min" : 1, - "max" : 50000 + "max" : 50000, + "dataSize" : null }, "ss_store_sk" : { "distinctValuesCount" : 6, "nullsCount" : 130034, "min" : 1, - "max" : 10 + "max" : 10, + "dataSize" : null }, "ss_promo_sk" : { "distinctValuesCount" : 300, "nullsCount" : 129484, "min" : 1, - "max" : 300 + "max" : 300, + "dataSize" : null }, "ss_ticket_number" : { "distinctValuesCount" : 240000, "nullsCount" : 0, "min" : 1, - "max" : 240000 + "max" : 240000, + "dataSize" : null }, "ss_quantity" : { "distinctValuesCount" : 100, "nullsCount" : 129996, "min" : 1, - "max" : 100 + "max" : 100, + "dataSize" : null }, "ss_wholesale_cost" : { "distinctValuesCount" : 9901, "nullsCount" : 130023, "min" : 100, - "max" : 10000 + "max" : 10000, + "dataSize" : null }, "ss_list_price" : { "distinctValuesCount" : 19727, "nullsCount" : 130003, "min" : 100, - "max" : 20000 + "max" : 20000, + "dataSize" : null }, "ss_sales_price" : { "distinctValuesCount" : 18686, "nullsCount" : 129666, "min" : 0, - "max" : 19956 + "max" : 19956, + "dataSize" : null }, "ss_ext_discount_amt" : { "distinctValuesCount" : 209365, "nullsCount" : 129838, "min" : 0, - "max" : 1758825 + "max" : 1758825, + "dataSize" : null }, "ss_ext_sales_price" : { "distinctValuesCount" : 411391, "nullsCount" : 130327, "min" : 0, - "max" : 1956240 + "max" : 1956240, + "dataSize" : null }, "ss_ext_wholesale_cost" : { "distinctValuesCount" : 380588, "nullsCount" : 130044, "min" : 100, - "max" : 1000000 + "max" : 1000000, + "dataSize" : null }, "ss_ext_list_price" : { "distinctValuesCount" : 578761, "nullsCount" : 129933, "min" : 112, - "max" : 1998400 + "max" : 1998400, + "dataSize" : null }, "ss_ext_tax" : { "distinctValuesCount" : 78652, "nullsCount" : 130410, "min" : 0, - "max" : 174987 + "max" : 174987, + "dataSize" : null }, "ss_coupon_amt" : { "distinctValuesCount" : 209365, "nullsCount" : 129838, "min" : 0, - "max" : 1758825 + "max" : 1758825, + "dataSize" : null }, "ss_net_paid" : { "distinctValuesCount" : 463256, "nullsCount" : 129397, "min" : 0, - "max" : 1956240 + "max" : 1956240, + "dataSize" : null }, "ss_net_paid_inc_tax" : { "distinctValuesCount" : 618874, "nullsCount" : 130022, "min" : 0, - "max" : 2119287 + "max" : 2119287, + "dataSize" : null }, "ss_net_profit" : { "distinctValuesCount" : 566151, "nullsCount" : 130267, "min" : -996953, - "max" : 973170 + "max" : 973170, + "dataSize" : null } } } diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf1/time_dim.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf1/time_dim.json index 673a5a4ba31e2..74d93531f3c9a 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf1/time_dim.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf1/time_dim.json @@ -5,61 +5,71 @@ "distinctValuesCount" : 86400, "nullsCount" : 0, "min" : 0, - "max" : 86399 + "max" : 86399, + "dataSize" : null }, "t_time_id" : { "distinctValuesCount" : 86400, "nullsCount" : 0, "min" : "AAAAAAAAAAAABAAA", - "max" : "AAAAAAAAPPPPAAAA" + "max" : "AAAAAAAAPPPPAAAA", + "dataSize" : 1382400 }, "t_time" : { "distinctValuesCount" : 86400, "nullsCount" : 0, "min" : 0, - "max" : 86399 + "max" : 86399, + "dataSize" : null }, "t_hour" : { "distinctValuesCount" : 24, "nullsCount" : 0, "min" : 0, - "max" : 23 + "max" : 23, + "dataSize" : null }, "t_minute" : { "distinctValuesCount" : 60, "nullsCount" : 0, "min" : 0, - "max" : 59 + "max" : 59, + "dataSize" : null }, "t_second" : { "distinctValuesCount" : 60, "nullsCount" : 0, "min" : 0, - "max" : 59 + "max" : 59, + "dataSize" : null }, "t_am_pm" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : "AM", - "max" : "PM" + "max" : "PM", + "dataSize" : 4 }, "t_shift" : { "distinctValuesCount" : 3, "nullsCount" : 0, "min" : "first", - "max" : "third" + "max" : "third", + "dataSize" : 16 }, "t_sub_shift" : { "distinctValuesCount" : 4, "nullsCount" : 0, "min" : "afternoon", - "max" : "night" + "max" : "night", + "dataSize" : 28 }, "t_meal_time" : { "distinctValuesCount" : 4, "nullsCount" : 0, "min" : "", - "max" : "lunch" + "max" : "lunch", + "dataSize" : 20 } } } diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf1/warehouse.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf1/warehouse.json index 61fb7090a615b..fe1332d778e52 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf1/warehouse.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf1/warehouse.json @@ -5,85 +5,99 @@ "distinctValuesCount" : 5, "nullsCount" : 0, "min" : 1, - "max" : 5 + "max" : 5, + "dataSize" : null }, "w_warehouse_id" : { "distinctValuesCount" : 5, "nullsCount" : 0, "min" : "AAAAAAAABAAAAAAA", - "max" : "AAAAAAAAFAAAAAAA" + "max" : "AAAAAAAAFAAAAAAA", + "dataSize" : 80 }, "w_warehouse_name" : { "distinctValuesCount" : 4, "nullsCount" : 1, "min" : "Bad cards must make.", - "max" : "Important issues liv" + "max" : "Important issues liv", + "dataSize" : 70 }, "w_warehouse_sq_ft" : { "distinctValuesCount" : 4, "nullsCount" : 1, "min" : 138504, - "max" : 977787 + "max" : 977787, + "dataSize" : null }, "w_street_number" : { "distinctValuesCount" : 4, "nullsCount" : 1, "min" : "368", - "max" : "651" + "max" : "651", + "dataSize" : 12 }, "w_street_name" : { "distinctValuesCount" : 4, "nullsCount" : 1, "min" : "6th ", - "max" : "Wilson Elm" + "max" : "Wilson Elm", + "dataSize" : 34 }, "w_street_type" : { "distinctValuesCount" : 4, "nullsCount" : 1, "min" : "Avenue", - "max" : "Parkway" + "max" : "Parkway", + "dataSize" : 21 }, "w_suite_number" : { "distinctValuesCount" : 4, "nullsCount" : 1, "min" : "Suite 0", - "max" : "Suite P" + "max" : "Suite P", + "dataSize" : 31 }, "w_city" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "Fairview", - "max" : "Fairview" + "max" : "Fairview", + "dataSize" : 8 }, "w_county" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "Williamson County", - "max" : "Williamson County" + "max" : "Williamson County", + "dataSize" : 17 }, "w_state" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "TN", - "max" : "TN" + "max" : "TN", + "dataSize" : 2 }, "w_zip" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "35709", - "max" : "35709" + "max" : "35709", + "dataSize" : 5 }, "w_country" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "United States", - "max" : "United States" + "max" : "United States", + "dataSize" : 13 }, "w_gmt_offset" : { "distinctValuesCount" : 1, "nullsCount" : 1, "min" : -500, - "max" : -500 + "max" : -500, + "dataSize" : null } } } diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf1/web_page.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf1/web_page.json index 4221fd38971cd..7961473b8e414 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf1/web_page.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf1/web_page.json @@ -5,85 +5,99 @@ "distinctValuesCount" : 60, "nullsCount" : 0, "min" : 1, - "max" : 60 + "max" : 60, + "dataSize" : null }, "wp_web_page_id" : { "distinctValuesCount" : 30, "nullsCount" : 0, "min" : "AAAAAAAAABAAAAAA", - "max" : "AAAAAAAAPBAAAAAA" + "max" : "AAAAAAAAPBAAAAAA", + "dataSize" : 480 }, "wp_rec_start_date" : { "distinctValuesCount" : 4, "nullsCount" : 0, "min" : 10107, - "max" : 11568 + "max" : 11568, + "dataSize" : null }, "wp_rec_end_date" : { "distinctValuesCount" : 3, "nullsCount" : 30, "min" : 10837, - "max" : 11567 + "max" : 11567, + "dataSize" : null }, "wp_creation_date_sk" : { "distinctValuesCount" : 9, "nullsCount" : 1, "min" : 2450807, - "max" : 2450815 + "max" : 2450815, + "dataSize" : null }, "wp_access_date_sk" : { "distinctValuesCount" : 40, "nullsCount" : 0, "min" : 2452549, - "max" : 2452648 + "max" : 2452648, + "dataSize" : null }, "wp_autogen_flag" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : "N", - "max" : "Y" + "max" : "Y", + "dataSize" : 2 }, "wp_customer_sk" : { "distinctValuesCount" : 17, "nullsCount" : 39, "min" : 1898, - "max" : 98633 + "max" : 98633, + "dataSize" : null }, "wp_url" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "http://www.foo.com", - "max" : "http://www.foo.com" + "max" : "http://www.foo.com", + "dataSize" : 18 }, "wp_type" : { "distinctValuesCount" : 7, "nullsCount" : 1, "min" : "ad", - "max" : "welcome" + "max" : "welcome", + "dataSize" : 45 }, "wp_char_count" : { "distinctValuesCount" : 42, "nullsCount" : 1, "min" : 701, - "max" : 7046 + "max" : 7046, + "dataSize" : null }, "wp_link_count" : { "distinctValuesCount" : 21, "nullsCount" : 1, "min" : 2, - "max" : 25 + "max" : 25, + "dataSize" : null }, "wp_image_count" : { "distinctValuesCount" : 7, "nullsCount" : 1, "min" : 1, - "max" : 7 + "max" : 7, + "dataSize" : null }, "wp_max_ad_count" : { "distinctValuesCount" : 5, "nullsCount" : 1, "min" : 0, - "max" : 4 + "max" : 4, + "dataSize" : null } } } diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf1/web_returns.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf1/web_returns.json index c085910d94505..42e8e8cc662e5 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf1/web_returns.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf1/web_returns.json @@ -5,145 +5,169 @@ "distinctValuesCount" : 2113, "nullsCount" : 3127, "min" : 2450842, - "max" : 2452995 + "max" : 2452995, + "dataSize" : null }, "wr_returned_time_sk" : { "distinctValuesCount" : 44796, "nullsCount" : 3194, "min" : 0, - "max" : 86399 + "max" : 86399, + "dataSize" : null }, "wr_item_sk" : { "distinctValuesCount" : 17029, "nullsCount" : 0, "min" : 1, - "max" : 18000 + "max" : 18000, + "dataSize" : null }, "wr_refunded_customer_sk" : { "distinctValuesCount" : 49450, "nullsCount" : 3217, "min" : 1, - "max" : 100000 + "max" : 100000, + "dataSize" : null }, "wr_refunded_cdemo_sk" : { "distinctValuesCount" : 67182, "nullsCount" : 3230, "min" : 44, - "max" : 1920789 + "max" : 1920789, + "dataSize" : null }, "wr_refunded_hdemo_sk" : { "distinctValuesCount" : 7199, "nullsCount" : 3270, "min" : 1, - "max" : 7200 + "max" : 7200, + "dataSize" : null }, "wr_refunded_addr_sk" : { "distinctValuesCount" : 37262, "nullsCount" : 3164, "min" : 2, - "max" : 50000 + "max" : 50000, + "dataSize" : null }, "wr_returning_customer_sk" : { "distinctValuesCount" : 49544, "nullsCount" : 3138, "min" : 1, - "max" : 100000 + "max" : 100000, + "dataSize" : null }, "wr_returning_cdemo_sk" : { "distinctValuesCount" : 67206, "nullsCount" : 3215, "min" : 44, - "max" : 1920789 + "max" : 1920789, + "dataSize" : null }, "wr_returning_hdemo_sk" : { "distinctValuesCount" : 7200, "nullsCount" : 3205, "min" : 1, - "max" : 7200 + "max" : 7200, + "dataSize" : null }, "wr_returning_addr_sk" : { "distinctValuesCount" : 37237, "nullsCount" : 3218, "min" : 2, - "max" : 50000 + "max" : 50000, + "dataSize" : null }, "wr_web_page_sk" : { "distinctValuesCount" : 60, "nullsCount" : 3130, "min" : 1, - "max" : 60 + "max" : 60, + "dataSize" : null }, "wr_reason_sk" : { "distinctValuesCount" : 35, "nullsCount" : 3212, "min" : 1, - "max" : 35 + "max" : 35, + "dataSize" : null }, "wr_order_number" : { "distinctValuesCount" : 42249, "nullsCount" : 0, "min" : 1, - "max" : 59997 + "max" : 59997, + "dataSize" : null }, "wr_return_quantity" : { "distinctValuesCount" : 100, "nullsCount" : 3147, "min" : 1, - "max" : 100 + "max" : 100, + "dataSize" : null }, "wr_return_amt" : { "distinctValuesCount" : 49198, "nullsCount" : 3211, "min" : 0, - "max" : 2564940 + "max" : 2564940, + "dataSize" : null }, "wr_return_tax" : { "distinctValuesCount" : 18341, "nullsCount" : 3257, "min" : 0, - "max" : 209005 + "max" : 209005, + "dataSize" : null }, "wr_return_amt_inc_tax" : { "distinctValuesCount" : 54753, "nullsCount" : 3193, "min" : 0, - "max" : 2667537 + "max" : 2667537, + "dataSize" : null }, "wr_fee" : { "distinctValuesCount" : 9946, "nullsCount" : 3165, "min" : 50, - "max" : 10000 + "max" : 10000, + "dataSize" : null }, "wr_return_ship_cost" : { "distinctValuesCount" : 40723, "nullsCount" : 3187, "min" : 0, - "max" : 1173085 + "max" : 1173085, + "dataSize" : null }, "wr_refunded_cash" : { "distinctValuesCount" : 44381, "nullsCount" : 3181, "min" : 0, - "max" : 2082297 + "max" : 2082297, + "dataSize" : null }, "wr_reversed_charge" : { "distinctValuesCount" : 34461, "nullsCount" : 3210, "min" : 0, - "max" : 1614011 + "max" : 1614011, + "dataSize" : null }, "wr_account_credit" : { "distinctValuesCount" : 34198, "nullsCount" : 3151, "min" : 0, - "max" : 1399591 + "max" : 1399591, + "dataSize" : null }, "wr_net_loss" : { "distinctValuesCount" : 51830, "nullsCount" : 3201, "min" : 63, - "max" : 1387185 + "max" : 1387185, + "dataSize" : null } } } diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf1/web_sales.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf1/web_sales.json index ca31ec09063c0..4681bc2392a23 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf1/web_sales.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf1/web_sales.json @@ -5,205 +5,239 @@ "distinctValuesCount" : 1823, "nullsCount" : 189, "min" : 2450816, - "max" : 2452642 + "max" : 2452642, + "dataSize" : null }, "ws_sold_time_sk" : { "distinctValuesCount" : 41020, "nullsCount" : 187, "min" : 7, - "max" : 86367 + "max" : 86367, + "dataSize" : null }, "ws_ship_date_sk" : { "distinctValuesCount" : 1946, "nullsCount" : 177, "min" : 2450817, - "max" : 2452762 + "max" : 2452762, + "dataSize" : null }, "ws_item_sk" : { "distinctValuesCount" : 18000, "nullsCount" : 0, "min" : 1, - "max" : 18000 + "max" : 18000, + "dataSize" : null }, "ws_bill_customer_sk" : { "distinctValuesCount" : 45161, "nullsCount" : 167, "min" : 2, - "max" : 100000 + "max" : 100000, + "dataSize" : null }, "ws_bill_cdemo_sk" : { "distinctValuesCount" : 59093, "nullsCount" : 165, "min" : 31, - "max" : 1920747 + "max" : 1920747, + "dataSize" : null }, "ws_bill_hdemo_sk" : { "distinctValuesCount" : 7197, "nullsCount" : 183, "min" : 1, - "max" : 7200 + "max" : 7200, + "dataSize" : null }, "ws_bill_addr_sk" : { "distinctValuesCount" : 34971, "nullsCount" : 172, "min" : 1, - "max" : 50000 + "max" : 50000, + "dataSize" : null }, "ws_ship_customer_sk" : { "distinctValuesCount" : 45196, "nullsCount" : 173, "min" : 2, - "max" : 99999 + "max" : 99999, + "dataSize" : null }, "ws_ship_cdemo_sk" : { "distinctValuesCount" : 59070, "nullsCount" : 171, "min" : 12, - "max" : 1920716 + "max" : 1920716, + "dataSize" : null }, "ws_ship_hdemo_sk" : { "distinctValuesCount" : 7197, "nullsCount" : 165, "min" : 1, - "max" : 7200 + "max" : 7200, + "dataSize" : null }, "ws_ship_addr_sk" : { "distinctValuesCount" : 34998, "nullsCount" : 178, "min" : 1, - "max" : 50000 + "max" : 50000, + "dataSize" : null }, "ws_web_page_sk" : { "distinctValuesCount" : 60, "nullsCount" : 188, "min" : 1, - "max" : 60 + "max" : 60, + "dataSize" : null }, "ws_web_site_sk" : { "distinctValuesCount" : 30, "nullsCount" : 186, "min" : 1, - "max" : 30 + "max" : 30, + "dataSize" : null }, "ws_ship_mode_sk" : { "distinctValuesCount" : 20, "nullsCount" : 174, "min" : 1, - "max" : 20 + "max" : 20, + "dataSize" : null }, "ws_warehouse_sk" : { "distinctValuesCount" : 5, "nullsCount" : 179, "min" : 1, - "max" : 5 + "max" : 5, + "dataSize" : null }, "ws_promo_sk" : { "distinctValuesCount" : 300, "nullsCount" : 184, "min" : 1, - "max" : 300 + "max" : 300, + "dataSize" : null }, "ws_order_number" : { "distinctValuesCount" : 60000, "nullsCount" : 0, "min" : 1, - "max" : 60000 + "max" : 60000, + "dataSize" : null }, "ws_quantity" : { "distinctValuesCount" : 100, "nullsCount" : 182, "min" : 1, - "max" : 100 + "max" : 100, + "dataSize" : null }, "ws_wholesale_cost" : { "distinctValuesCount" : 9901, "nullsCount" : 173, "min" : 100, - "max" : 10000 + "max" : 10000, + "dataSize" : null }, "ws_list_price" : { "distinctValuesCount" : 29070, "nullsCount" : 184, "min" : 101, - "max" : 30000 + "max" : 30000, + "dataSize" : null }, "ws_sales_price" : { "distinctValuesCount" : 24620, "nullsCount" : 167, "min" : 0, - "max" : 29916 + "max" : 29916, + "dataSize" : null }, "ws_ext_discount_amt" : { "distinctValuesCount" : 282972, "nullsCount" : 179, "min" : 0, - "max" : 2931700 + "max" : 2931700, + "dataSize" : null }, "ws_ext_sales_price" : { "distinctValuesCount" : 282572, "nullsCount" : 181, "min" : 0, - "max" : 2859219 + "max" : 2859219, + "dataSize" : null }, "ws_ext_wholesale_cost" : { "distinctValuesCount" : 273010, "nullsCount" : 197, "min" : 100, - "max" : 1000000 + "max" : 1000000, + "dataSize" : null }, "ws_ext_list_price" : { "distinctValuesCount" : 388373, "nullsCount" : 180, "min" : 111, - "max" : 2942400 + "max" : 2942400, + "dataSize" : null }, "ws_ext_tax" : { "distinctValuesCount" : 68432, "nullsCount" : 184, "min" : 0, - "max" : 243341 + "max" : 243341, + "dataSize" : null }, "ws_coupon_amt" : { "distinctValuesCount" : 96930, "nullsCount" : 196, "min" : 0, - "max" : 2690962 + "max" : 2690962, + "dataSize" : null }, "ws_ext_ship_cost" : { "distinctValuesCount" : 197833, "nullsCount" : 198, "min" : 0, - "max" : 1423125 + "max" : 1423125, + "dataSize" : null }, "ws_net_paid" : { "distinctValuesCount" : 297990, "nullsCount" : 169, "min" : 0, - "max" : 2853837 + "max" : 2853837, + "dataSize" : null }, "ws_net_paid_inc_tax" : { "distinctValuesCount" : 366296, "nullsCount" : 175, "min" : 0, - "max" : 3082143 + "max" : 3082143, + "dataSize" : null }, "ws_net_paid_inc_ship" : { "distinctValuesCount" : 372292, "nullsCount" : 0, "min" : 0, - "max" : 4122209 + "max" : 4122209, + "dataSize" : null }, "ws_net_paid_inc_ship_tax" : { "distinctValuesCount" : 460686, "nullsCount" : 0, "min" : 0, - "max" : 4350515 + "max" : 4350515, + "dataSize" : null }, "ws_net_profit" : { "distinctValuesCount" : 337469, "nullsCount" : 0, "min" : -993800, - "max" : 1886456 + "max" : 1886456, + "dataSize" : null } } } diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf1/web_site.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf1/web_site.json index d0df2e01b38c5..e72c269f22dd2 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf1/web_site.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf1/web_site.json @@ -5,157 +5,183 @@ "distinctValuesCount" : 30, "nullsCount" : 0, "min" : 1, - "max" : 30 + "max" : 30, + "dataSize" : null }, "web_site_id" : { "distinctValuesCount" : 15, "nullsCount" : 0, "min" : "AAAAAAAAABAAAAAA", - "max" : "AAAAAAAAOAAAAAAA" + "max" : "AAAAAAAAOAAAAAAA", + "dataSize" : 240 }, "web_rec_start_date" : { "distinctValuesCount" : 4, "nullsCount" : 0, "min" : 10089, - "max" : 11550 + "max" : 11550, + "dataSize" : null }, "web_rec_end_date" : { "distinctValuesCount" : 3, "nullsCount" : 15, "min" : 10819, - "max" : 11549 + "max" : 11549, + "dataSize" : null }, "web_name" : { "distinctValuesCount" : 5, "nullsCount" : 0, "min" : "site_0", - "max" : "site_4" + "max" : "site_4", + "dataSize" : 30 }, "web_open_date_sk" : { "distinctValuesCount" : 15, "nullsCount" : 0, "min" : 2450577, - "max" : 2450807 + "max" : 2450807, + "dataSize" : null }, "web_close_date_sk" : { "distinctValuesCount" : 10, "nullsCount" : 5, "min" : 2446944, - "max" : 2448956 + "max" : 2448956, + "dataSize" : null }, "web_class" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "Unknown", - "max" : "Unknown" + "max" : "Unknown", + "dataSize" : 7 }, "web_manager" : { "distinctValuesCount" : 22, "nullsCount" : 0, "min" : "Adam Stonge", - "max" : "William Carter" + "max" : "William Carter", + "dataSize" : 271 }, "web_mkt_id" : { "distinctValuesCount" : 6, "nullsCount" : 0, "min" : 1, - "max" : 6 + "max" : 6, + "dataSize" : null }, "web_mkt_class" : { "distinctValuesCount" : 22, "nullsCount" : 0, "min" : "About rural reasons shall no", - "max" : "Wide, final representat" + "max" : "Wide, final representat", + "dataSize" : 734 }, "web_mkt_desc" : { "distinctValuesCount" : 18, "nullsCount" : 0, "min" : "Acres see else children. Mutual too", - "max" : "Well similar decisions used to keep hardly democratic, personal priorities." + "max" : "Well similar decisions used to keep hardly democratic, personal priorities.", + "dataSize" : 1180 }, "web_market_manager" : { "distinctValuesCount" : 25, "nullsCount" : 0, "min" : "Albert Leung", - "max" : "Zachery Oneil" + "max" : "Zachery Oneil", + "dataSize" : 315 }, "web_company_id" : { "distinctValuesCount" : 6, "nullsCount" : 0, "min" : 1, - "max" : 6 + "max" : 6, + "dataSize" : null }, "web_company_name" : { "distinctValuesCount" : 6, "nullsCount" : 0, "min" : "able", - "max" : "pri" + "max" : "pri", + "dataSize" : 24 }, "web_street_number" : { "distinctValuesCount" : 18, "nullsCount" : 0, "min" : "184", - "max" : "973" + "max" : "973", + "dataSize" : 52 }, "web_street_name" : { "distinctValuesCount" : 30, "nullsCount" : 0, "min" : "11th ", - "max" : "Wilson Ridge" + "max" : "Wilson Ridge", + "dataSize" : 272 }, "web_street_type" : { "distinctValuesCount" : 15, "nullsCount" : 0, "min" : "Avenue", - "max" : "Wy" + "max" : "Wy", + "dataSize" : 63 }, "web_suite_number" : { "distinctValuesCount" : 23, "nullsCount" : 0, "min" : "Suite 100", - "max" : "Suite U" + "max" : "Suite U", + "dataSize" : 193 }, "web_city" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : "Fairview", - "max" : "Midway" + "max" : "Midway", + "dataSize" : 14 }, "web_county" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "Williamson County", - "max" : "Williamson County" + "max" : "Williamson County", + "dataSize" : 17 }, "web_state" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "TN", - "max" : "TN" + "max" : "TN", + "dataSize" : 2 }, "web_zip" : { "distinctValuesCount" : 2, "nullsCount" : 0, "min" : "31904", - "max" : "35709" + "max" : "35709", + "dataSize" : 10 }, "web_country" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : "United States", - "max" : "United States" + "max" : "United States", + "dataSize" : 13 }, "web_gmt_offset" : { "distinctValuesCount" : 1, "nullsCount" : 0, "min" : -500, - "max" : -500 + "max" : -500, + "dataSize" : null }, "web_tax_percentage" : { "distinctValuesCount" : 10, "nullsCount" : 0, "min" : 0, - "max" : 12 + "max" : 12, + "dataSize" : null } } } diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/call_center.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/call_center.json index d1ff93970e81d..1de1661f2d338 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/call_center.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/call_center.json @@ -1,151 +1,170 @@ { "rowCount" : 48.0, "columns" : { - "cc_county" : { - "distinctValuesCount" : 18.0, - "nullsCount" : 0.000000 + "cc_company_name" : { + "dataSize" : 180.0, + "nullsCount" : 0.0, + "distinctValuesCount" : 7.0 }, - "cc_suite_number" : { - "distinctValuesCount" : 18.0, - "nullsCount" : 0.000000 + "cc_open_date_sk" : { + "distinctValuesCount" : 15.0, + "nullsCount" : 0.0, + "min" : 2450794, + "max" : 2451146 + }, + "cc_mkt_desc" : { + "dataSize" : 2843.0, + "nullsCount" : 0.0, + "distinctValuesCount" : 33.0 + }, + "cc_zip" : { + "dataSize" : 240.0, + "nullsCount" : 0.0, + "distinctValuesCount" : 24.0 }, "cc_gmt_offset" : { "distinctValuesCount" : 3.0, - "nullsCount" : 0.000000, - "min" : -800, - "max" : -500 + "nullsCount" : 0.0, + "min" : -8.00, + "max" : -5.00 }, - "cc_manager" : { - "distinctValuesCount" : 37.0, - "nullsCount" : 0.000000 + "cc_county" : { + "dataSize" : 648.0, + "nullsCount" : 0.0, + "distinctValuesCount" : 18.0 }, - "cc_city" : { - "distinctValuesCount" : 22.0, - "nullsCount" : 0.000000 + "cc_suite_number" : { + "dataSize" : 370.0, + "nullsCount" : 0.0, + "distinctValuesCount" : 18.0 }, - "cc_zip" : { - "distinctValuesCount" : 24.0, - "nullsCount" : 0.000000 + "cc_employees" : { + "distinctValuesCount" : 34.0, + "nullsCount" : 0.0, + "min" : 146280, + "max" : 62879074 }, - "cc_market_manager" : { - "distinctValuesCount" : 43.0, - "nullsCount" : 0.000000 + "cc_hours" : { + "dataSize" : 342.0, + "nullsCount" : 0.0, + "distinctValuesCount" : 3.0 }, - "cc_company" : { - "distinctValuesCount" : 5.0, - "nullsCount" : 0.000000, - "min" : 1, - "max" : 6 + "cc_state" : { + "dataSize" : 96.0, + "nullsCount" : 0.0, + "distinctValuesCount" : 12.0 }, - "cc_street_number" : { - "distinctValuesCount" : 25.0, - "nullsCount" : 0.000000 + "cc_country" : { + "dataSize" : 624.0, + "nullsCount" : 0.0, + "distinctValuesCount" : 1.0 }, - "cc_mkt_id" : { - "distinctValuesCount" : 5.0, - "nullsCount" : 0.000000, - "min" : 1, - "max" : 6 + "cc_class" : { + "dataSize" : 258.0, + "nullsCount" : 0.0, + "distinctValuesCount" : 3.0 + }, + "cc_manager" : { + "dataSize" : 591.0, + "nullsCount" : 0.0, + "distinctValuesCount" : 37.0 + }, + "cc_street_type" : { + "dataSize" : 198.0, + "nullsCount" : 0.0, + "distinctValuesCount" : 14.0 }, "cc_rec_end_date" : { "distinctValuesCount" : 3.0, - "nullsCount" : 24.000000, + "nullsCount" : 24.0, "min" : "2000-01-02", "max" : "2002-01-01" }, - "cc_company_name" : { - "distinctValuesCount" : 7.0, - "nullsCount" : 0.000000 - }, - "cc_open_date_sk" : { - "distinctValuesCount" : 15.0, - "nullsCount" : 0.000000, - "min" : 2450794, - "max" : 2451146 - }, - "cc_class" : { - "distinctValuesCount" : 3.0, - "nullsCount" : 0.000000 + "cc_call_center_id" : { + "dataSize" : 768.0, + "nullsCount" : 0.0, + "distinctValuesCount" : 24.0 }, - "cc_mkt_class" : { - "distinctValuesCount" : 43.0, - "nullsCount" : 0.000000 + "cc_street_number" : { + "dataSize" : 138.0, + "nullsCount" : 0.0, + "distinctValuesCount" : 25.0 }, - "cc_division" : { + "cc_mkt_id" : { "distinctValuesCount" : 5.0, - "nullsCount" : 0.000000, + "nullsCount" : 0.0, "min" : 1, "max" : 6 }, + "cc_tax_percentage" : { + "distinctValuesCount" : 15.0, + "nullsCount" : 0.0, + "min" : 0, + "max" : 12 + }, + "cc_name" : { + "dataSize" : 660.0, + "nullsCount" : 0.0, + "distinctValuesCount" : 25.0 + }, "cc_call_center_sk" : { "distinctValuesCount" : 36.0, - "nullsCount" : 0.000000, + "nullsCount" : 0.0, "min" : 1, "max" : 48 }, - "cc_rec_start_date" : { - "distinctValuesCount" : 4.0, - "nullsCount" : 0.000000, - "min" : "1998-01-02", - "max" : "2002-01-02" - }, - "cc_street_type" : { - "distinctValuesCount" : 14.0, - "nullsCount" : 0.000000 - }, "cc_division_name" : { - "distinctValuesCount" : 7.0, - "nullsCount" : 0.000000 - }, - "cc_name" : { - "distinctValuesCount" : 25.0, - "nullsCount" : 0.000000 - }, - "cc_country" : { - "distinctValuesCount" : 1.0, - "nullsCount" : 0.000000 - }, - "cc_closed_date_sk" : { - "distinctValuesCount" : 1.0, - "nullsCount" : 48.000000 - }, - "cc_call_center_id" : { - "distinctValuesCount" : 24.0, - "nullsCount" : 0.000000 + "dataSize" : 190.0, + "nullsCount" : 0.0, + "distinctValuesCount" : 7.0 }, "cc_street_name" : { - "distinctValuesCount" : 25.0, - "nullsCount" : 0.000000 + "dataSize" : 398.0, + "nullsCount" : 0.0, + "distinctValuesCount" : 25.0 }, - "cc_tax_percentage" : { - "distinctValuesCount" : 15.0, - "nullsCount" : 0.000000, - "min" : 0, - "max" : 12 + "cc_division" : { + "distinctValuesCount" : 5.0, + "nullsCount" : 0.0, + "min" : 1, + "max" : 6 }, "cc_sq_ft" : { "distinctValuesCount" : 45.0, - "nullsCount" : 0.000000, + "nullsCount" : 0.0, "min" : -2131742388, "max" : 1959548348 }, - "cc_state" : { - "distinctValuesCount" : 12.0, - "nullsCount" : 0.000000 + "cc_mkt_class" : { + "dataSize" : 1666.0, + "nullsCount" : 0.0, + "distinctValuesCount" : 43.0 }, - "cc_hours" : { - "distinctValuesCount" : 3.0, - "nullsCount" : 0.000000 + "cc_rec_start_date" : { + "distinctValuesCount" : 4.0, + "nullsCount" : 0.0, + "min" : "1998-01-02", + "max" : "2002-01-02" }, - "cc_mkt_desc" : { - "distinctValuesCount" : 33.0, - "nullsCount" : 0.000000 + "cc_city" : { + "dataSize" : 431.0, + "nullsCount" : 0.0, + "distinctValuesCount" : 22.0 }, - "cc_employees" : { - "distinctValuesCount" : 34.0, - "nullsCount" : 0.000000, - "min" : 146280, - "max" : 62879074 + "cc_company" : { + "distinctValuesCount" : 5.0, + "nullsCount" : 0.0, + "min" : 1, + "max" : 6 + }, + "cc_closed_date_sk" : { + "nullsCount" : 48.0, + "distinctValuesCount" : 1.0 + }, + "cc_market_manager" : { + "dataSize" : 590.0, + "nullsCount" : 0.0, + "distinctValuesCount" : 43.0 }, "dummyColumn" : {} } diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/catalog_page.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/catalog_page.json index a95643b7f531f..531262834ce58 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/catalog_page.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/catalog_page.json @@ -1,51 +1,55 @@ { "rowCount" : 36000.0, "columns" : { - "cp_catalog_page_sk" : { - "distinctValuesCount" : 59909.0, - "nullsCount" : 0.000000, - "min" : 1, - "max" : 36000 - }, - "cp_catalog_page_number" : { - "distinctValuesCount" : 205.0, - "nullsCount" : 358.000000, - "min" : 1, - "max" : 333 - }, "cp_catalog_number" : { "distinctValuesCount" : 66.0, - "nullsCount" : 374.000000, + "nullsCount" : 374.0, "min" : 1, "max" : 109 }, "cp_type" : { - "distinctValuesCount" : 2.0, - "nullsCount" : 356.000000 + "dataSize" : 273316.0, + "nullsCount" : 355.99999999999994, + "distinctValuesCount" : 2.0 }, "cp_start_date_sk" : { "distinctValuesCount" : 112.0, - "nullsCount" : 356.000000, + "nullsCount" : 355.99999999999994, "min" : 2450815, "max" : 2453005 }, "cp_end_date_sk" : { "distinctValuesCount" : 86.0, - "nullsCount" : 368.000000, + "nullsCount" : 368.0, "min" : 2450844, "max" : 2453186 }, + "cp_catalog_page_sk" : { + "distinctValuesCount" : 59909.0, + "nullsCount" : 0.0, + "min" : 1, + "max" : 36000 + }, "cp_catalog_page_id" : { - "distinctValuesCount" : 27468.0, - "nullsCount" : 0.000000 + "dataSize" : 576000.0, + "nullsCount" : 0.0, + "distinctValuesCount" : 27468.0 + }, + "cp_catalog_page_number" : { + "distinctValuesCount" : 205.0, + "nullsCount" : 358.0, + "min" : 1, + "max" : 333 }, "cp_department" : { - "distinctValuesCount" : 1.0, - "nullsCount" : 353.000000 + "dataSize" : 356470.0, + "nullsCount" : 353.0, + "distinctValuesCount" : 1.0 }, "cp_description" : { - "distinctValuesCount" : 31281.0, - "nullsCount" : 353.000000 + "dataSize" : 2657367.0, + "nullsCount" : 353.0, + "distinctValuesCount" : 31281.0 }, "dummyColumn" : {} } diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/catalog_returns.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/catalog_returns.json index b2af1dc839873..3c81add280553 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/catalog_returns.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/catalog_returns.json @@ -1,167 +1,167 @@ { "rowCount" : 4.32018033E8, "columns" : { - "cr_order_number" : { - "distinctValuesCount" : 2.15484394E8, - "nullsCount" : 0.000000, - "min" : 2, - "max" : 479999998 + "cr_return_ship_cost" : { + "distinctValuesCount" : 621548.0, + "nullsCount" : 8648206.0, + "min" : 0, + "max" : 1427328 }, "cr_store_credit" : { "distinctValuesCount" : 1190394.0, - "nullsCount" : 8643766.000000, + "nullsCount" : 8643766.0, "min" : 0, "max" : 2488613 }, - "cr_call_center_sk" : { - "distinctValuesCount" : 36.0, - "nullsCount" : 8644652.000000, - "min" : 1, - "max" : 48 + "cr_return_amt_inc_tax" : { + "distinctValuesCount" : 2001996.0, + "nullsCount" : 8647001.0, + "min" : 0, + "max" : 3041806 }, - "cr_warehouse_sk" : { - "distinctValuesCount" : 18.0, - "nullsCount" : 8647042.000000, + "cr_return_amount" : { + "distinctValuesCount" : 1000998.0, + "nullsCount" : 8638795.0, + "min" : 0, + "max" : 2880504 + }, + "cr_return_tax" : { + "distinctValuesCount" : 142490.0, + "nullsCount" : 8646336.0, + "min" : 0, + "max" : 251158 + }, + "cr_returning_customer_sk" : { + "distinctValuesCount" : 4.5300013E7, + "nullsCount" : 8638960.0, "min" : 1, - "max" : 22 + "max" : 30000000 }, "cr_fee" : { "distinctValuesCount" : 10590.0, - "nullsCount" : 8647422.000000, + "nullsCount" : 8647422.0, "min" : 50, "max" : 10000 }, - "cr_returned_date_sk" : { - "distinctValuesCount" : 2535.0, - "nullsCount" : 0.000000, - "min" : 2450821, - "max" : 2452924 + "cr_returned_time_sk" : { + "distinctValuesCount" : 125124.0, + "nullsCount" : 0.0, + "min" : 0, + "max" : 86399 }, - "cr_ship_mode_sk" : { - "distinctValuesCount" : 18.0, - "nullsCount" : 8640537.000000, + "cr_item_sk" : { + "distinctValuesCount" : 385937.0, + "nullsCount" : 0.0, "min" : 1, - "max" : 20 + "max" : 360000 }, - "cr_reason_sk" : { - "distinctValuesCount" : 47.0, - "nullsCount" : 8647007.000000, + "cr_returning_hdemo_sk" : { + "distinctValuesCount" : 9299.0, + "nullsCount" : 8645966.0, "min" : 1, - "max" : 67 + "max" : 7200 }, - "cr_return_quantity" : { - "distinctValuesCount" : 63.0, - "nullsCount" : 8639534.000000, + "cr_warehouse_sk" : { + "distinctValuesCount" : 18.0, + "nullsCount" : 8647042.0, "min" : 1, - "max" : 100 + "max" : 22 + }, + "cr_order_number" : { + "distinctValuesCount" : 2.15484394E8, + "nullsCount" : 0.0, + "min" : 2, + "max" : 479999998 + }, + "cr_refunded_addr_sk" : { + "distinctValuesCount" : 1.9889561E7, + "nullsCount" : 8645217.0, + "min" : 1, + "max" : 15000000 }, "cr_net_loss" : { "distinctValuesCount" : 1355607.0, - "nullsCount" : 8645354.000000, + "nullsCount" : 8645354.0, "min" : 50, "max" : 1611866 }, - "cr_refunded_hdemo_sk" : { - "distinctValuesCount" : 9299.0, - "nullsCount" : 8647744.000000, + "cr_ship_mode_sk" : { + "distinctValuesCount" : 18.0, + "nullsCount" : 8640537.0, "min" : 1, - "max" : 7200 - }, - "cr_returned_time_sk" : { - "distinctValuesCount" : 125124.0, - "nullsCount" : 0.000000, - "min" : 0, - "max" : 86399 + "max" : 20 }, - "cr_returning_customer_sk" : { - "distinctValuesCount" : 4.5300013E7, - "nullsCount" : 8638960.000000, + "cr_reason_sk" : { + "distinctValuesCount" : 47.0, + "nullsCount" : 8647007.0, "min" : 1, - "max" : 30000000 - }, - "cr_return_ship_cost" : { - "distinctValuesCount" : 621548.0, - "nullsCount" : 8648206.000000, - "min" : 0, - "max" : 1427328 + "max" : 67 }, - "cr_refunded_addr_sk" : { - "distinctValuesCount" : 1.9889561E7, - "nullsCount" : 8645217.000000, + "cr_refunded_hdemo_sk" : { + "distinctValuesCount" : 9299.0, + "nullsCount" : 8647744.0, "min" : 1, - "max" : 15000000 - }, - "cr_return_tax" : { - "distinctValuesCount" : 142490.0, - "nullsCount" : 8646336.000000, - "min" : 0, - "max" : 251158 + "max" : 7200 }, - "cr_refunded_customer_sk" : { - "distinctValuesCount" : 4.5300013E7, - "nullsCount" : 8638060.000000, + "cr_refunded_cdemo_sk" : { + "distinctValuesCount" : 1835839.0, + "nullsCount" : 8643595.0, "min" : 1, - "max" : 30000000 - }, - "cr_reversed_charge" : { - "distinctValuesCount" : 1091596.0, - "nullsCount" : 8643839.000000, - "min" : 0, - "max" : 2403384 + "max" : 1920800 }, - "cr_returning_addr_sk" : { - "distinctValuesCount" : 1.9889561E7, - "nullsCount" : 8648349.000000, + "cr_catalog_page_sk" : { + "distinctValuesCount" : 27468.0, + "nullsCount" : 8646402.0, "min" : 1, - "max" : 15000000 + "max" : 30303 }, "cr_refunded_cash" : { "distinctValuesCount" : 1543750.0, - "nullsCount" : 8638178.000000, + "nullsCount" : 8638178.0, "min" : 0, "max" : 2695524 }, - "cr_return_amt_inc_tax" : { - "distinctValuesCount" : 2001996.0, - "nullsCount" : 8647001.000000, - "min" : 0, - "max" : 3041806 - }, - "cr_item_sk" : { - "distinctValuesCount" : 385937.0, - "nullsCount" : 0.000000, + "cr_return_quantity" : { + "distinctValuesCount" : 63.0, + "nullsCount" : 8639534.0, "min" : 1, - "max" : 360000 + "max" : 100 }, - "cr_refunded_cdemo_sk" : { + "cr_returning_cdemo_sk" : { "distinctValuesCount" : 1835839.0, - "nullsCount" : 8643595.000000, + "nullsCount" : 8641134.0, "min" : 1, "max" : 1920800 }, - "cr_returning_hdemo_sk" : { - "distinctValuesCount" : 9299.0, - "nullsCount" : 8645966.000000, + "cr_call_center_sk" : { + "distinctValuesCount" : 36.0, + "nullsCount" : 8644652.0, "min" : 1, - "max" : 7200 + "max" : 48 }, - "cr_returning_cdemo_sk" : { - "distinctValuesCount" : 1835839.0, - "nullsCount" : 8641134.000000, + "cr_returning_addr_sk" : { + "distinctValuesCount" : 1.9889561E7, + "nullsCount" : 8648349.0, "min" : 1, - "max" : 1920800 + "max" : 15000000 }, - "cr_return_amount" : { - "distinctValuesCount" : 1000998.0, - "nullsCount" : 8638795.000000, + "cr_reversed_charge" : { + "distinctValuesCount" : 1091596.0, + "nullsCount" : 8643839.0, "min" : 0, - "max" : 2880504 + "max" : 2403384 }, - "cr_catalog_page_sk" : { - "distinctValuesCount" : 27468.0, - "nullsCount" : 8646402.000000, + "cr_returned_date_sk" : { + "distinctValuesCount" : 2535.0, + "nullsCount" : 0.0, + "min" : 2450821, + "max" : 2452924 + }, + "cr_refunded_customer_sk" : { + "distinctValuesCount" : 4.5300013E7, + "nullsCount" : 8638060.0, "min" : 1, - "max" : 30303 + "max" : 30000000 }, "dummyColumn" : {} } diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/catalog_sales.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/catalog_sales.json index 0c98f373938a1..5cacc163ed345 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/catalog_sales.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/catalog_sales.json @@ -1,209 +1,209 @@ { "rowCount" : 4.32007888E9, "columns" : { - "cs_ext_sales_price" : { - "distinctValuesCount" : 1355607.0, - "nullsCount" : 21598683.000000, - "min" : 0, - "max" : 2994300 - }, - "cs_ext_tax" : { - "distinctValuesCount" : 219750.0, - "nullsCount" : 21598935.000000, - "min" : 0, - "max" : 267327 - }, - "cs_call_center_sk" : { - "distinctValuesCount" : 36.0, - "nullsCount" : 21593946.000000, - "min" : 1, - "max" : 48 - }, "cs_item_sk" : { "distinctValuesCount" : 385937.0, - "nullsCount" : 0.000000, + "nullsCount" : 0.0, "min" : 1, "max" : 360000 }, + "cs_quantity" : { + "distinctValuesCount" : 63.0, + "nullsCount" : 21605853.0, + "min" : 1, + "max" : 100 + }, + "cs_sold_date_sk" : { + "distinctValuesCount" : 2226.0, + "nullsCount" : 21604595.0, + "min" : 2450815, + "max" : 2452654 + }, + "cs_sales_price" : { + "distinctValuesCount" : 25189.0, + "nullsCount" : 21597770.000000004, + "min" : 0, + "max" : 30000 + }, "cs_ext_wholesale_cost" : { "distinctValuesCount" : 545798.0, - "nullsCount" : 21595674.000000, + "nullsCount" : 21595674.0, "min" : 100, "max" : 1000000 }, - "cs_net_paid_inc_ship" : { - "distinctValuesCount" : 2711215.0, - "nullsCount" : 0.000000, + "cs_ship_cdemo_sk" : { + "distinctValuesCount" : 1835839.0, + "nullsCount" : 21594672.0, + "min" : 1, + "max" : 1920800 + }, + "cs_catalog_page_sk" : { + "distinctValuesCount" : 27468.0, + "nullsCount" : 21595925.0, + "min" : 1, + "max" : 30303 + }, + "cs_net_paid" : { + "distinctValuesCount" : 2090632.0, + "nullsCount" : 21589858.0, "min" : 0, - "max" : 4395600 + "max" : 2994300 }, - "cs_coupon_amt" : { - "distinctValuesCount" : 2001996.0, - "nullsCount" : 21593373.000000, + "cs_ship_hdemo_sk" : { + "distinctValuesCount" : 9299.0, + "nullsCount" : 21604320.0, + "min" : 1, + "max" : 7200 + }, + "cs_wholesale_cost" : { + "distinctValuesCount" : 10590.0, + "nullsCount" : 21600026.0, + "min" : 100, + "max" : 10000 + }, + "cs_ship_mode_sk" : { + "distinctValuesCount" : 18.0, + "nullsCount" : 21598565.0, + "min" : 1, + "max" : 20 + }, + "cs_ext_ship_cost" : { + "distinctValuesCount" : 677803.0, + "nullsCount" : 21602964.0, "min" : 0, - "max" : 2873000 + "max" : 1499400 }, - "cs_ship_date_sk" : { - "distinctValuesCount" : 2324.0, - "nullsCount" : 21601305.000000, - "min" : 2450817, - "max" : 2452744 + "cs_ext_list_price" : { + "distinctValuesCount" : 1355607.0, + "nullsCount" : 21602226.0, + "min" : 100, + "max" : 3000000 + }, + "cs_bill_hdemo_sk" : { + "distinctValuesCount" : 9299.0, + "nullsCount" : 21594077.0, + "min" : 1, + "max" : 7200 + }, + "cs_ext_tax" : { + "distinctValuesCount" : 219750.0, + "nullsCount" : 21598935.0, + "min" : 0, + "max" : 267327 + }, + "cs_net_profit" : { + "distinctValuesCount" : 2279851.0, + "nullsCount" : 0.0, + "min" : -10000.00, + "max" : 1996200 }, "cs_bill_customer_sk" : { "distinctValuesCount" : 4.5300013E7, - "nullsCount" : 21604935.000000, + "nullsCount" : 21604935.0, "min" : 1, "max" : 30000000 }, - "cs_list_price" : { - "distinctValuesCount" : 25189.0, - "nullsCount" : 21600012.000000, - "min" : 100, - "max" : 30000 + "cs_net_paid_inc_ship" : { + "distinctValuesCount" : 2711215.0, + "nullsCount" : 0.0, + "min" : 0, + "max" : 4395600 }, "cs_ship_customer_sk" : { "distinctValuesCount" : 4.5300013E7, - "nullsCount" : 21597564.000000, + "nullsCount" : 21597564.0, "min" : 1, "max" : 30000000 }, - "cs_catalog_page_sk" : { - "distinctValuesCount" : 27468.0, - "nullsCount" : 21595925.000000, - "min" : 1, - "max" : 30303 - }, "cs_warehouse_sk" : { "distinctValuesCount" : 18.0, - "nullsCount" : 21601466.000000, + "nullsCount" : 21601466.0, "min" : 1, "max" : 22 }, - "cs_sales_price" : { + "cs_list_price" : { "distinctValuesCount" : 25189.0, - "nullsCount" : 21597770.000000, - "min" : 0, + "nullsCount" : 21600012.0, + "min" : 100, "max" : 30000 }, "cs_net_paid_inc_tax" : { "distinctValuesCount" : 2380788.0, - "nullsCount" : 21598003.000000, + "nullsCount" : 21598003.0, "min" : 0, "max" : 3237627 }, - "cs_sold_date_sk" : { - "distinctValuesCount" : 2226.0, - "nullsCount" : 21604595.000000, - "min" : 2450815, - "max" : 2452654 - }, - "cs_quantity" : { - "distinctValuesCount" : 63.0, - "nullsCount" : 21605853.000000, - "min" : 1, - "max" : 100 - }, - "cs_ship_mode_sk" : { - "distinctValuesCount" : 18.0, - "nullsCount" : 21598565.000000, - "min" : 1, - "max" : 20 - }, "cs_sold_time_sk" : { "distinctValuesCount" : 125124.0, - "nullsCount" : 21598766.000000, + "nullsCount" : 21598766.0, "min" : 0, "max" : 86399 }, - "cs_net_profit" : { - "distinctValuesCount" : 2279851.0, - "nullsCount" : 0.000000, - "min" : -1000000, - "max" : 1996200 - }, - "cs_bill_addr_sk" : { - "distinctValuesCount" : 1.9889561E7, - "nullsCount" : 21600722.000000, - "min" : 1, - "max" : 15000000 - }, - "cs_bill_cdemo_sk" : { - "distinctValuesCount" : 1835839.0, - "nullsCount" : 21598031.000000, - "min" : 1, - "max" : 1920800 - }, "cs_promo_sk" : { "distinctValuesCount" : 1507.0, - "nullsCount" : 21602146.000000, + "nullsCount" : 21602146.0, "min" : 1, "max" : 1800 }, - "cs_net_paid_inc_ship_tax" : { - "distinctValuesCount" : 3834237.0, - "nullsCount" : 0.000000, + "cs_ship_addr_sk" : { + "distinctValuesCount" : 1.9889561E7, + "nullsCount" : 21593452.0, + "min" : 1, + "max" : 15000000 + }, + "cs_coupon_amt" : { + "distinctValuesCount" : 2001996.0, + "nullsCount" : 21593373.0, "min" : 0, - "max" : 4659336 + "max" : 2873000 }, - "cs_ship_cdemo_sk" : { + "cs_bill_cdemo_sk" : { "distinctValuesCount" : 1835839.0, - "nullsCount" : 21594672.000000, + "nullsCount" : 21598031.0, "min" : 1, "max" : 1920800 }, - "cs_ship_hdemo_sk" : { - "distinctValuesCount" : 9299.0, - "nullsCount" : 21604320.000000, - "min" : 1, - "max" : 7200 - }, - "cs_net_paid" : { - "distinctValuesCount" : 2090632.0, - "nullsCount" : 21589858.000000, + "cs_ext_discount_amt" : { + "distinctValuesCount" : 1243097.0, + "nullsCount" : 21597495.0, "min" : 0, - "max" : 2994300 - }, - "cs_ship_addr_sk" : { - "distinctValuesCount" : 1.9889561E7, - "nullsCount" : 21593452.000000, - "min" : 1, - "max" : 15000000 + "max" : 2998200 }, "cs_order_number" : { "distinctValuesCount" : 5.35201957E8, - "nullsCount" : 0.000000, + "nullsCount" : 0.0, "min" : 1, "max" : 480000000 }, - "cs_bill_hdemo_sk" : { - "distinctValuesCount" : 9299.0, - "nullsCount" : 21594077.000000, + "cs_bill_addr_sk" : { + "distinctValuesCount" : 1.9889561E7, + "nullsCount" : 21600722.0, "min" : 1, - "max" : 7200 + "max" : 15000000 }, - "cs_ext_list_price" : { - "distinctValuesCount" : 1355607.0, - "nullsCount" : 21602226.000000, - "min" : 100, - "max" : 3000000 + "cs_call_center_sk" : { + "distinctValuesCount" : 36.0, + "nullsCount" : 21593946.0, + "min" : 1, + "max" : 48 }, - "cs_ext_discount_amt" : { - "distinctValuesCount" : 1243097.0, - "nullsCount" : 21597495.000000, + "cs_ext_sales_price" : { + "distinctValuesCount" : 1355607.0, + "nullsCount" : 21598683.0, "min" : 0, - "max" : 2998200 - }, - "cs_wholesale_cost" : { - "distinctValuesCount" : 10590.0, - "nullsCount" : 21600026.000000, - "min" : 100, - "max" : 10000 + "max" : 2994300 }, - "cs_ext_ship_cost" : { - "distinctValuesCount" : 677803.0, - "nullsCount" : 21602964.000000, + "cs_net_paid_inc_ship_tax" : { + "distinctValuesCount" : 3834237.0, + "nullsCount" : 0.0, "min" : 0, - "max" : 1499400 + "max" : 4659336 + }, + "cs_ship_date_sk" : { + "distinctValuesCount" : 2324.0, + "nullsCount" : 21601304.999999996, + "min" : 2450817, + "max" : 2452744 }, "dummyColumn" : {} } diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/customer.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/customer.json index 6f4088e0787dc..cbed4676ca90f 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/customer.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/customer.json @@ -1,97 +1,105 @@ { "rowCount" : 3.0E7, "columns" : { - "c_first_shipto_date_sk" : { - "distinctValuesCount" : 3585.0, - "nullsCount" : 1051228.000000, - "min" : 2449028, - "max" : 2452678 + "c_first_name" : { + "dataSize" : 1.68978794E8, + "nullsCount" : 1048745.0, + "distinctValuesCount" : 5529.0 }, - "c_login" : { - "distinctValuesCount" : 1.0, - "nullsCount" : 30000000.000000 + "c_current_addr_sk" : { + "distinctValuesCount" : 1.7465542E7, + "nullsCount" : 0.0, + "min" : 1, + "max" : 15000000 }, - "c_customer_sk" : { - "distinctValuesCount" : 4.5300013E7, - "nullsCount" : 0.000000, + "c_birth_day" : { + "distinctValuesCount" : 23.0, + "nullsCount" : 1050937.0, "min" : 1, - "max" : 30000000 + "max" : 31 }, - "c_last_review_date_sk" : { - "distinctValuesCount" : 266.0, - "nullsCount" : 1049890.000000, - "min" : 2452283, - "max" : 2452648 + "c_last_name" : { + "dataSize" : 1.77481785E8, + "nullsCount" : 1050668.0, + "distinctValuesCount" : 7820.0 }, "c_customer_id" : { - "distinctValuesCount" : 3.9779123E7, - "nullsCount" : 0.000000 + "dataSize" : 4.8E8, + "nullsCount" : 0.0, + "distinctValuesCount" : 3.9779123E7 }, - "c_first_sales_date_sk" : { - "distinctValuesCount" : 3585.0, - "nullsCount" : 1050303.000000, - "min" : 2448998, - "max" : 2452648 + "c_birth_year" : { + "distinctValuesCount" : 49.0, + "nullsCount" : 1050423.0, + "min" : 1924, + "max" : 1992 }, "c_birth_month" : { "distinctValuesCount" : 13.0, - "nullsCount" : 1049422.000000, + "nullsCount" : 1049422.0, "min" : 1, "max" : 12 }, - "c_birth_day" : { - "distinctValuesCount" : 23.0, - "nullsCount" : 1050937.000000, - "min" : 1, - "max" : 31 + "c_salutation" : { + "dataSize" : 9.3858171E7, + "nullsCount" : 1050068.0, + "distinctValuesCount" : 7.0 }, - "c_current_addr_sk" : { - "distinctValuesCount" : 1.7465542E7, - "nullsCount" : 0.000000, - "min" : 1, - "max" : 15000000 + "c_birth_country" : { + "dataSize" : 2.5162486599999997E8, + "nullsCount" : 1049811.0, + "distinctValuesCount" : 196.0 }, - "c_preferred_cust_flag" : { - "distinctValuesCount" : 2.0, - "nullsCount" : 1050942.000000 + "c_customer_sk" : { + "distinctValuesCount" : 4.5300013E7, + "nullsCount" : 0.0, + "min" : 1, + "max" : 30000000 }, - "c_current_hdemo_sk" : { - "distinctValuesCount" : 9299.0, - "nullsCount" : 1049211.000000, + "c_current_cdemo_sk" : { + "distinctValuesCount" : 1835839.0, + "nullsCount" : 1049861.0, "min" : 1, - "max" : 7200 + "max" : 1920800 }, - "c_salutation" : { - "distinctValuesCount" : 7.0, - "nullsCount" : 1050068.000000 + "c_first_sales_date_sk" : { + "distinctValuesCount" : 3585.0, + "nullsCount" : 1050303.0, + "min" : 2448998, + "max" : 2452648 }, - "c_email_address" : { - "distinctValuesCount" : 3.4931085E7, - "nullsCount" : 1050182.000000 + "c_last_review_date_sk" : { + "distinctValuesCount" : 266.0, + "nullsCount" : 1049890.0, + "min" : 2452283, + "max" : 2452648 }, - "c_birth_year" : { - "distinctValuesCount" : 49.0, - "nullsCount" : 1050423.000000, - "min" : 1924, - "max" : 1992 + "c_login" : { + "dataSize" : 0.0, + "nullsCount" : 30000000.0, + "distinctValuesCount" : 1.0 }, - "c_first_name" : { - "distinctValuesCount" : 5529.0, - "nullsCount" : 1048745.000000 + "c_first_shipto_date_sk" : { + "distinctValuesCount" : 3585.0, + "nullsCount" : 1051228.0, + "min" : 2449028, + "max" : 2452678 }, - "c_last_name" : { - "distinctValuesCount" : 7820.0, - "nullsCount" : 1050668.000000 + "c_email_address" : { + "dataSize" : 7.95203808E8, + "nullsCount" : 1050182.0, + "distinctValuesCount" : 3.4931085E7 }, - "c_current_cdemo_sk" : { - "distinctValuesCount" : 1835839.0, - "nullsCount" : 1049861.000000, - "min" : 1, - "max" : 1920800 + "c_preferred_cust_flag" : { + "dataSize" : 2.8949058E7, + "nullsCount" : 1050942.0, + "distinctValuesCount" : 2.0 }, - "c_birth_country" : { - "distinctValuesCount" : 196.0, - "nullsCount" : 1049811.000000 + "c_current_hdemo_sk" : { + "distinctValuesCount" : 9299.0, + "nullsCount" : 1049211.0, + "min" : 1, + "max" : 7200 }, "dummyColumn" : {} } diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/customer_address.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/customer_address.json index 5fe8422895168..bffa22b5aa182 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/customer_address.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/customer_address.json @@ -1,61 +1,72 @@ { "rowCount" : 1.5E7, "columns" : { - "ca_suite_number" : { - "distinctValuesCount" : 86.0, - "nullsCount" : 450380.000000 + "ca_street_name" : { + "dataSize" : 1.2674987699999999E8, + "nullsCount" : 449639.0, + "distinctValuesCount" : 7488.0 }, - "ca_county" : { - "distinctValuesCount" : 1716.0, - "nullsCount" : 449296.000000 + "ca_zip" : { + "dataSize" : 7.2750175E7, + "nullsCount" : 449965.0, + "distinctValuesCount" : 10141.0 }, "ca_gmt_offset" : { "distinctValuesCount" : 5.0, - "nullsCount" : 449744.000000, - "min" : -1000, - "max" : -500 + "nullsCount" : 449744.0, + "min" : -10.00, + "max" : -5.00 }, - "ca_zip" : { - "distinctValuesCount" : 10141.0, - "nullsCount" : 449965.000000 - }, - "ca_country" : { - "distinctValuesCount" : 1.0, - "nullsCount" : 449481.000000 - }, - "ca_street_name" : { - "distinctValuesCount" : 7488.0, - "nullsCount" : 449639.000000 - }, - "ca_address_id" : { - "distinctValuesCount" : 1.9889561E7, - "nullsCount" : 0.000000 + "ca_street_type" : { + "dataSize" : 6.1110979E7, + "nullsCount" : 449465.0, + "distinctValuesCount" : 23.0 }, "ca_city" : { - "distinctValuesCount" : 896.0, - "nullsCount" : 450422.000000 + "dataSize" : 1.30253791E8, + "nullsCount" : 450422.0, + "distinctValuesCount" : 896.0 }, "ca_street_number" : { - "distinctValuesCount" : 822.0, - "nullsCount" : 450409.000000 - }, - "ca_location_type" : { - "distinctValuesCount" : 3.0, - "nullsCount" : 449205.000000 + "dataSize" : 4.2092414E7, + "nullsCount" : 450409.0, + "distinctValuesCount" : 822.0 }, "ca_address_sk" : { "distinctValuesCount" : 1.9889561E7, - "nullsCount" : 0.000000, + "nullsCount" : 0.0, "min" : 1, "max" : 15000000 }, + "ca_address_id" : { + "dataSize" : 2.4E8, + "nullsCount" : 0.0, + "distinctValuesCount" : 1.9889561E7 + }, "ca_state" : { - "distinctValuesCount" : 51.0, - "nullsCount" : 449069.000000 + "dataSize" : 2.9101862E7, + "nullsCount" : 449069.0, + "distinctValuesCount" : 51.0 }, - "ca_street_type" : { - "distinctValuesCount" : 23.0, - "nullsCount" : 449465.000000 + "ca_country" : { + "dataSize" : 1.89156747E8, + "nullsCount" : 449481.0, + "distinctValuesCount" : 1.0 + }, + "ca_location_type" : { + "dataSize" : 1.30951887E8, + "nullsCount" : 449205.0, + "distinctValuesCount" : 3.0 + }, + "ca_suite_number" : { + "dataSize" : 1.1479582E8, + "nullsCount" : 450380.0, + "distinctValuesCount" : 86.0 + }, + "ca_county" : { + "dataSize" : 2.03147993E8, + "nullsCount" : 449296.0, + "distinctValuesCount" : 1716.0 }, "dummyColumn" : {} } diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/customer_demographics.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/customer_demographics.json index f942fdc137cdc..bfffc00c25867 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/customer_demographics.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/customer_demographics.json @@ -1,49 +1,53 @@ { "rowCount" : 1920800.0, "columns" : { - "cd_education_status" : { - "distinctValuesCount" : 9.0, - "nullsCount" : 0.000000 + "cd_gender" : { + "dataSize" : 1920800.0, + "nullsCount" : 0.0, + "distinctValuesCount" : 2.0 }, - "cd_dep_employed_count" : { + "cd_dep_college_count" : { "distinctValuesCount" : 5.0, - "nullsCount" : 0.000000, + "nullsCount" : 0.0, "min" : 0, "max" : 6 }, + "cd_credit_rating" : { + "dataSize" : 1.34456E7, + "nullsCount" : 0.0, + "distinctValuesCount" : 5.0 + }, + "cd_education_status" : { + "dataSize" : 1.83848E7, + "nullsCount" : 0.0, + "distinctValuesCount" : 9.0 + }, + "cd_marital_status" : { + "dataSize" : 1920800.0, + "nullsCount" : 0.0, + "distinctValuesCount" : 7.0 + }, "cd_dep_count" : { "distinctValuesCount" : 5.0, - "nullsCount" : 0.000000, + "nullsCount" : 0.0, "min" : 0, "max" : 6 }, - "cd_marital_status" : { - "distinctValuesCount" : 7.0, - "nullsCount" : 0.000000 - }, - "cd_dep_college_count" : { + "cd_dep_employed_count" : { "distinctValuesCount" : 5.0, - "nullsCount" : 0.000000, + "nullsCount" : 0.0, "min" : 0, "max" : 6 }, "cd_demo_sk" : { "distinctValuesCount" : 1835839.0, - "nullsCount" : 0.000000, + "nullsCount" : 0.0, "min" : 1, "max" : 1920800 }, - "cd_gender" : { - "distinctValuesCount" : 2.0, - "nullsCount" : 0.000000 - }, - "cd_credit_rating" : { - "distinctValuesCount" : 5.0, - "nullsCount" : 0.000000 - }, "cd_purchase_estimate" : { "distinctValuesCount" : 24.0, - "nullsCount" : 0.000000, + "nullsCount" : 0.0, "min" : 500, "max" : 10000 }, diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/date_dim.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/date_dim.json index cc4a90debe9bc..9647e19639511 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/date_dim.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/date_dim.json @@ -1,151 +1,162 @@ { "rowCount" : 73049.0, "columns" : { - "d_current_quarter" : { - "distinctValuesCount" : 2.0, - "nullsCount" : 0.000000 - }, - "d_dom" : { - "distinctValuesCount" : 23.0, - "nullsCount" : 0.000000, - "min" : 1, - "max" : 31 - }, - "d_date_sk" : { - "distinctValuesCount" : 65332.0, - "nullsCount" : 0.000000, - "min" : 2415022, - "max" : 2488070 + "d_year" : { + "distinctValuesCount" : 112.0, + "nullsCount" : 0.0, + "min" : 1900, + "max" : 2100 }, "d_first_dom" : { "distinctValuesCount" : 2226.0, - "nullsCount" : 0.000000, + "nullsCount" : 0.0, "min" : 2415021, "max" : 2488070 }, - "d_year" : { - "distinctValuesCount" : 112.0, - "nullsCount" : 0.000000, - "min" : 1900, - "max" : 2100 + "d_current_quarter" : { + "dataSize" : 73049.0, + "nullsCount" : 0.0, + "distinctValuesCount" : 2.0 }, - "d_week_seq" : { - "distinctValuesCount" : 13152.0, - "nullsCount" : 0.000000, + "d_weekend" : { + "dataSize" : 73049.0, + "nullsCount" : 0.0, + "distinctValuesCount" : 2.0 + }, + "d_current_day" : { + "dataSize" : 73049.0, + "nullsCount" : 0.0, + "distinctValuesCount" : 1.0 + }, + "d_quarter_seq" : { + "distinctValuesCount" : 429.0, + "nullsCount" : 0.0, "min" : 1, - "max" : 10436 + "max" : 801 + }, + "d_dom" : { + "distinctValuesCount" : 23.0, + "nullsCount" : 0.0, + "min" : 1, + "max" : 31 + }, + "d_quarter_name" : { + "dataSize" : 438294.0, + "nullsCount" : 0.0, + "distinctValuesCount" : 721.0 }, "d_moy" : { "distinctValuesCount" : 13.0, - "nullsCount" : 0.000000, + "nullsCount" : 0.0, "min" : 1, "max" : 12 }, - "d_dow" : { - "distinctValuesCount" : 5.0, - "nullsCount" : 0.000000, + "d_month_seq" : { + "distinctValuesCount" : 2764.0, + "nullsCount" : 0.0, "min" : 0, - "max" : 6 + "max" : 2400 }, - "d_current_month" : { - "distinctValuesCount" : 2.0, - "nullsCount" : 0.000000 + "d_day_name" : { + "dataSize" : 521779.00000000006, + "nullsCount" : 0.0, + "distinctValuesCount" : 9.0 }, - "d_date_id" : { - "distinctValuesCount" : 109875.0, - "nullsCount" : 0.000000 + "d_holiday" : { + "dataSize" : 73049.0, + "nullsCount" : 0.0, + "distinctValuesCount" : 2.0 + }, + "d_fy_week_seq" : { + "distinctValuesCount" : 13152.0, + "nullsCount" : 0.0, + "min" : 1, + "max" : 10436 + }, + "d_date" : { + "distinctValuesCount" : 81133.0, + "nullsCount" : 0.0, + "min" : "1900-01-03", + "max" : "2100-01-02" }, "d_same_day_ly" : { "distinctValuesCount" : 65332.0, - "nullsCount" : 0.000000, + "nullsCount" : 0.0, "min" : 2414657, "max" : 2487705 }, - "d_fy_week_seq" : { - "distinctValuesCount" : 13152.0, - "nullsCount" : 0.000000, + "d_fy_quarter_seq" : { + "distinctValuesCount" : 429.0, + "nullsCount" : 0.0, "min" : 1, - "max" : 10436 + "max" : 801 + }, + "d_following_holiday" : { + "dataSize" : 73049.0, + "nullsCount" : 0.0, + "distinctValuesCount" : 2.0 }, "d_last_dom" : { "distinctValuesCount" : 2535.0, - "nullsCount" : 0.000000, + "nullsCount" : 0.0, "min" : 2415020, "max" : 2488372 }, - "d_fy_year" : { - "distinctValuesCount" : 112.0, - "nullsCount" : 0.000000, - "min" : 1900, - "max" : 2100 - }, - "d_following_holiday" : { - "distinctValuesCount" : 2.0, - "nullsCount" : 0.000000 - }, "d_same_day_lq" : { "distinctValuesCount" : 65332.0, - "nullsCount" : 0.000000, + "nullsCount" : 0.0, "min" : 2414930, "max" : 2487978 }, - "d_fy_quarter_seq" : { - "distinctValuesCount" : 429.0, - "nullsCount" : 0.000000, - "min" : 1, - "max" : 801 + "d_fy_year" : { + "distinctValuesCount" : 112.0, + "nullsCount" : 0.0, + "min" : 1900, + "max" : 2100 + }, + "d_date_id" : { + "dataSize" : 1168784.0, + "nullsCount" : 0.0, + "distinctValuesCount" : 109875.0 }, "d_qoy" : { "distinctValuesCount" : 5.0, - "nullsCount" : 0.000000, + "nullsCount" : 0.0, "min" : 1, "max" : 4 }, "d_current_week" : { - "distinctValuesCount" : 1.0, - "nullsCount" : 0.000000 - }, - "d_quarter_seq" : { - "distinctValuesCount" : 429.0, - "nullsCount" : 0.000000, - "min" : 1, - "max" : 801 - }, - "d_month_seq" : { - "distinctValuesCount" : 2764.0, - "nullsCount" : 0.000000, - "min" : 0, - "max" : 2400 - }, - "d_quarter_name" : { - "distinctValuesCount" : 721.0, - "nullsCount" : 0.000000 + "dataSize" : 73049.0, + "nullsCount" : 0.0, + "distinctValuesCount" : 1.0 }, "d_current_year" : { - "distinctValuesCount" : 2.0, - "nullsCount" : 0.000000 + "dataSize" : 73049.0, + "nullsCount" : 0.0, + "distinctValuesCount" : 2.0 }, - "d_date" : { - "distinctValuesCount" : 81133.0, - "nullsCount" : 0.000000, - "min" : "1900-01-03", - "max" : "2100-01-02" - }, - "d_day_name" : { - "distinctValuesCount" : 9.0, - "nullsCount" : 0.000000 + "d_date_sk" : { + "distinctValuesCount" : 65332.0, + "nullsCount" : 0.0, + "min" : 2415022, + "max" : 2488070 }, - "d_holiday" : { - "distinctValuesCount" : 2.0, - "nullsCount" : 0.000000 + "d_week_seq" : { + "distinctValuesCount" : 13152.0, + "nullsCount" : 0.0, + "min" : 1, + "max" : 10436 }, - "d_weekend" : { - "distinctValuesCount" : 2.0, - "nullsCount" : 0.000000 + "d_dow" : { + "distinctValuesCount" : 5.0, + "nullsCount" : 0.0, + "min" : 0, + "max" : 6 }, - "d_current_day" : { - "distinctValuesCount" : 1.0, - "nullsCount" : 0.000000 + "d_current_month" : { + "dataSize" : 73049.0, + "nullsCount" : 0.0, + "distinctValuesCount" : 2.0 }, "dummyColumn" : {} } diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/household_demographics.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/household_demographics.json index 77d420d4a8ddf..6289f69476caf 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/household_demographics.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/household_demographics.json @@ -1,31 +1,32 @@ { "rowCount" : 7200.0, "columns" : { - "hd_demo_sk" : { - "distinctValuesCount" : 9299.0, - "nullsCount" : 0.000000, - "min" : 1, - "max" : 7200 + "hd_buy_potential" : { + "dataSize" : 54000.0, + "nullsCount" : 0.0, + "distinctValuesCount" : 5.0 }, "hd_income_band_sk" : { "distinctValuesCount" : 18.0, - "nullsCount" : 0.000000, + "nullsCount" : 0.0, "min" : 1, "max" : 20 }, - "hd_buy_potential" : { - "distinctValuesCount" : 5.0, - "nullsCount" : 0.000000 + "hd_demo_sk" : { + "distinctValuesCount" : 9299.0, + "nullsCount" : 0.0, + "min" : 1, + "max" : 7200 }, "hd_dep_count" : { "distinctValuesCount" : 11.0, - "nullsCount" : 0.000000, + "nullsCount" : 0.0, "min" : 0, "max" : 9 }, "hd_vehicle_count" : { "distinctValuesCount" : 6.0, - "nullsCount" : 0.000000, + "nullsCount" : 0.0, "min" : -1, "max" : 4 }, diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/income_band.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/income_band.json index 642547c2b7019..5a75752c27d17 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/income_band.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/income_band.json @@ -3,19 +3,19 @@ "columns" : { "ib_income_band_sk" : { "distinctValuesCount" : 18.0, - "nullsCount" : 0.000000, + "nullsCount" : 0.0, "min" : 1, "max" : 20 }, "ib_lower_bound" : { "distinctValuesCount" : 21.0, - "nullsCount" : 0.000000, + "nullsCount" : 0.0, "min" : 0, "max" : 190001 }, "ib_upper_bound" : { "distinctValuesCount" : 18.0, - "nullsCount" : 0.000000, + "nullsCount" : 0.0, "min" : 10000, "max" : 200000 }, diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/inventory.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/inventory.json index f146b677282f8..731a3a87833f8 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/inventory.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/inventory.json @@ -3,27 +3,27 @@ "columns" : { "inv_warehouse_sk" : { "distinctValuesCount" : 18.0, - "nullsCount" : 0.000000, + "nullsCount" : 0.0, "min" : 1, "max" : 22 }, - "inv_quantity_on_hand" : { - "distinctValuesCount" : 691.0, - "nullsCount" : 51680476.000000, - "min" : 0, - "max" : 1000 + "inv_item_sk" : { + "distinctValuesCount" : 385937.0, + "nullsCount" : 0.0, + "min" : 1, + "max" : 360000 }, "inv_date_sk" : { "distinctValuesCount" : 316.0, - "nullsCount" : 0.000000, + "nullsCount" : 0.0, "min" : 2450815, "max" : 2452635 }, - "inv_item_sk" : { - "distinctValuesCount" : 385937.0, - "nullsCount" : 0.000000, - "min" : 1, - "max" : 360000 + "inv_quantity_on_hand" : { + "distinctValuesCount" : 691.0, + "nullsCount" : 51680476.0, + "min" : 0, + "max" : 1000 }, "dummyColumn" : {} } diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/item.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/item.json index 70d17d5d94e66..301bd88be663b 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/item.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/item.json @@ -1,113 +1,125 @@ { "rowCount" : 360000.0, "columns" : { - "i_product_name" : { - "distinctValuesCount" : 403024.0, - "nullsCount" : 908.000000 + "i_item_desc" : { + "dataSize" : 3.6126694E7, + "nullsCount" : 886.0, + "distinctValuesCount" : 297598.0 + }, + "i_size" : { + "dataSize" : 1555644.0000000002, + "nullsCount" : 924.0, + "distinctValuesCount" : 9.0 + }, + "i_category" : { + "dataSize" : 2120783.0, + "nullsCount" : 855.0, + "distinctValuesCount" : 8.0 + }, + "i_manager_id" : { + "distinctValuesCount" : 63.0, + "nullsCount" : 886.0, + "min" : 1, + "max" : 100 + }, + "i_manufact" : { + "dataSize" : 4054833.0, + "nullsCount" : 924.0, + "distinctValuesCount" : 1267.0 + }, + "i_rec_start_date" : { + "distinctValuesCount" : 3.0, + "nullsCount" : 931.0, + "min" : "1997-10-28", + "max" : "2001-10-28" }, "i_rec_end_date" : { "distinctValuesCount" : 4.0, - "nullsCount" : 180000.000000, + "nullsCount" : 180000.0, "min" : "1999-10-28", "max" : "2001-10-27" }, "i_category_id" : { "distinctValuesCount" : 11.0, - "nullsCount" : 914.000000, + "nullsCount" : 913.9999999999999, "min" : 1, "max" : 10 }, - "i_current_price" : { - "distinctValuesCount" : 10590.0, - "nullsCount" : 904.000000, - "min" : 9, - "max" : 9999 - }, - "i_item_desc" : { - "distinctValuesCount" : 297598.0, - "nullsCount" : 886.000000 - }, - "i_size" : { - "distinctValuesCount" : 9.0, - "nullsCount" : 924.000000 - }, - "i_item_sk" : { - "distinctValuesCount" : 385937.0, - "nullsCount" : 0.000000, - "min" : 1, - "max" : 360000 + "i_brand" : { + "dataSize" : 5802797.0, + "nullsCount" : 898.0, + "distinctValuesCount" : 633.0 }, - "i_wholesale_cost" : { - "distinctValuesCount" : 7820.0, - "nullsCount" : 876.000000, - "min" : 2, - "max" : 8949 + "i_color" : { + "dataSize" : 1932121.0, + "nullsCount" : 938.9999999999999, + "distinctValuesCount" : 66.0 }, - "i_units" : { - "distinctValuesCount" : 18.0, - "nullsCount" : 905.000000 + "i_class" : { + "dataSize" : 2796595.0, + "nullsCount" : 910.0, + "distinctValuesCount" : 102.0 }, - "i_brand_id" : { - "distinctValuesCount" : 633.0, - "nullsCount" : 911.000000, - "min" : 1001001, - "max" : 10016017 + "i_formulation" : { + "dataSize" : 7181440.0, + "nullsCount" : 928.0, + "distinctValuesCount" : 239639.0 }, - "i_manager_id" : { - "distinctValuesCount" : 63.0, - "nullsCount" : 886.000000, + "i_class_id" : { + "distinctValuesCount" : 15.0, + "nullsCount" : 870.0, "min" : 1, - "max" : 100 - }, - "i_brand" : { - "distinctValuesCount" : 633.0, - "nullsCount" : 898.000000 - }, - "i_category" : { - "distinctValuesCount" : 8.0, - "nullsCount" : 855.000000 + "max" : 16 }, - "i_rec_start_date" : { - "distinctValuesCount" : 3.0, - "nullsCount" : 931.000000, - "min" : "1997-10-28", - "max" : "2001-10-28" + "i_item_id" : { + "dataSize" : 5760000.0, + "nullsCount" : 0.0, + "distinctValuesCount" : 142490.0 }, - "i_manufact" : { - "distinctValuesCount" : 1267.0, - "nullsCount" : 924.000000 + "i_item_sk" : { + "distinctValuesCount" : 385937.0, + "nullsCount" : 0.0, + "min" : 1, + "max" : 360000 }, - "i_container" : { - "distinctValuesCount" : 1.0, - "nullsCount" : 900.000000 + "i_current_price" : { + "distinctValuesCount" : 10590.0, + "nullsCount" : 904.0, + "min" : 9, + "max" : 9999 }, "i_manufact_id" : { "distinctValuesCount" : 691.0, - "nullsCount" : 900.000000, + "nullsCount" : 900.0, "min" : 1, "max" : 1000 }, - "i_class" : { - "distinctValuesCount" : 102.0, - "nullsCount" : 910.000000 + "i_container" : { + "dataSize" : 2513700.0, + "nullsCount" : 900.0, + "distinctValuesCount" : 1.0 }, - "i_color" : { - "distinctValuesCount" : 66.0, - "nullsCount" : 939.000000 + "i_brand_id" : { + "distinctValuesCount" : 633.0, + "nullsCount" : 911.0, + "min" : 1001001, + "max" : 10016017 }, - "i_class_id" : { - "distinctValuesCount" : 15.0, - "nullsCount" : 870.000000, - "min" : 1, - "max" : 16 + "i_wholesale_cost" : { + "distinctValuesCount" : 7820.0, + "nullsCount" : 876.0, + "min" : 2, + "max" : 8949 }, - "i_formulation" : { - "distinctValuesCount" : 239639.0, - "nullsCount" : 928.000000 + "i_product_name" : { + "dataSize" : 8205802.0, + "nullsCount" : 908.0, + "distinctValuesCount" : 403024.0 }, - "i_item_id" : { - "distinctValuesCount" : 142490.0, - "nullsCount" : 0.000000 + "i_units" : { + "dataSize" : 1504436.0, + "nullsCount" : 905.0, + "distinctValuesCount" : 18.0 }, "dummyColumn" : {} } diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/promotion.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/promotion.json index c69cbf74f11ee..00482a7dee902 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/promotion.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/promotion.json @@ -1,93 +1,106 @@ { "rowCount" : 1800.0, "columns" : { - "p_channel_dmail" : { - "distinctValuesCount" : 2.0, - "nullsCount" : 19.000000 + "p_item_sk" : { + "distinctValuesCount" : 1792.0, + "nullsCount" : 23.0, + "min" : 56, + "max" : 359779 + }, + "p_discount_active" : { + "dataSize" : 1773.0, + "nullsCount" : 27.0, + "distinctValuesCount" : 1.0 }, "p_channel_details" : { - "distinctValuesCount" : 1955.0, - "nullsCount" : 17.000000 + "dataSize" : 71007.0, + "nullsCount" : 17.0, + "distinctValuesCount" : 1955.0 }, "p_end_date_sk" : { "distinctValuesCount" : 1066.0, - "nullsCount" : 20.000000, + "nullsCount" : 20.0, "min" : 2450107, "max" : 2450970 }, + "p_promo_name" : { + "dataSize" : 7096.0, + "nullsCount" : 25.0, + "distinctValuesCount" : 11.0 + }, "p_channel_email" : { - "distinctValuesCount" : 1.0, - "nullsCount" : 22.000000 + "dataSize" : 1778.0, + "nullsCount" : 22.0, + "distinctValuesCount" : 1.0 }, - "p_channel_tv" : { - "distinctValuesCount" : 1.0, - "nullsCount" : 21.000000 + "p_channel_dmail" : { + "dataSize" : 1781.0, + "nullsCount" : 19.0, + "distinctValuesCount" : 2.0 }, - "p_response_targe" : { - "distinctValuesCount" : 1.0, - "nullsCount" : 29.000000, - "min" : 1, - "max" : 1 + "p_promo_id" : { + "dataSize" : 28800.0, + "nullsCount" : 0.0, + "distinctValuesCount" : 2041.0 }, - "p_promo_name" : { - "distinctValuesCount" : 11.0, - "nullsCount" : 25.000000 + "p_channel_event" : { + "dataSize" : 1780.0, + "nullsCount" : 20.0, + "distinctValuesCount" : 1.0 }, "p_channel_demo" : { - "distinctValuesCount" : 1.0, - "nullsCount" : 21.000000 + "dataSize" : 1779.0, + "nullsCount" : 21.0, + "distinctValuesCount" : 1.0 }, "p_start_date_sk" : { "distinctValuesCount" : 753.0, - "nullsCount" : 25.000000, + "nullsCount" : 25.0, "min" : 2450096, "max" : 2450915 }, - "p_promo_sk" : { - "distinctValuesCount" : 1507.0, - "nullsCount" : 0.000000, - "min" : 1, - "max" : 1800 + "p_cost" : { + "distinctValuesCount" : 2.0, + "nullsCount" : 22.0, + "min" : 100000, + "max" : 100000 }, - "p_channel_press" : { + "p_response_targe" : { "distinctValuesCount" : 1.0, - "nullsCount" : 21.000000 - }, - "p_item_sk" : { - "distinctValuesCount" : 1792.0, - "nullsCount" : 23.000000, - "min" : 56, - "max" : 359779 + "nullsCount" : 29.0, + "min" : 1, + "max" : 1 }, - "p_channel_catalog" : { - "distinctValuesCount" : 1.0, - "nullsCount" : 21.000000 + "p_channel_tv" : { + "dataSize" : 1779.0, + "nullsCount" : 21.0, + "distinctValuesCount" : 1.0 }, "p_channel_radio" : { - "distinctValuesCount" : 1.0, - "nullsCount" : 24.000000 + "dataSize" : 1776.0, + "nullsCount" : 24.0, + "distinctValuesCount" : 1.0 }, "p_purpose" : { - "distinctValuesCount" : 1.0, - "nullsCount" : 20.000000 - }, - "p_discount_active" : { - "distinctValuesCount" : 1.0, - "nullsCount" : 27.000000 + "dataSize" : 12460.0, + "nullsCount" : 20.0, + "distinctValuesCount" : 1.0 }, - "p_channel_event" : { - "distinctValuesCount" : 1.0, - "nullsCount" : 20.000000 + "p_promo_sk" : { + "distinctValuesCount" : 1507.0, + "nullsCount" : 0.0, + "min" : 1, + "max" : 1800 }, - "p_cost" : { - "distinctValuesCount" : 2.0, - "nullsCount" : 22.000000, - "min" : 100000, - "max" : 100000 + "p_channel_catalog" : { + "dataSize" : 1779.0, + "nullsCount" : 21.0, + "distinctValuesCount" : 1.0 }, - "p_promo_id" : { - "distinctValuesCount" : 2041.0, - "nullsCount" : 0.000000 + "p_channel_press" : { + "dataSize" : 1779.0, + "nullsCount" : 21.0, + "distinctValuesCount" : 1.0 }, "dummyColumn" : {} } diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/reason.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/reason.json index f5693c3d86465..35843cd0bf883 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/reason.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/reason.json @@ -1,17 +1,19 @@ { "rowCount" : 67.0, "columns" : { - "r_reason_desc" : { - "distinctValuesCount" : 90.0, - "nullsCount" : 0.000000 - }, "r_reason_id" : { - "distinctValuesCount" : 58.0, - "nullsCount" : 0.000000 + "dataSize" : 1072.0, + "nullsCount" : 0.0, + "distinctValuesCount" : 58.0 + }, + "r_reason_desc" : { + "dataSize" : 866.0, + "nullsCount" : 0.0, + "distinctValuesCount" : 90.0 }, "r_reason_sk" : { "distinctValuesCount" : 47.0, - "nullsCount" : 0.000000, + "nullsCount" : 0.0, "min" : 1, "max" : 67 }, diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/ship_mode.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/ship_mode.json index 80c9ec5a0e97b..0eb08a17b67f6 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/ship_mode.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/ship_mode.json @@ -1,31 +1,36 @@ { "rowCount" : 20.0, "columns" : { - "sm_type" : { - "distinctValuesCount" : 6.0, - "nullsCount" : 0.000000 - }, - "sm_ship_mode_id" : { - "distinctValuesCount" : 18.0, - "nullsCount" : 0.000000 - }, - "sm_contract" : { - "distinctValuesCount" : 19.0, - "nullsCount" : 0.000000 + "sm_code" : { + "dataSize" : 87.0, + "nullsCount" : 0.0, + "distinctValuesCount" : 5.0 }, "sm_ship_mode_sk" : { "distinctValuesCount" : 18.0, - "nullsCount" : 0.000000, + "nullsCount" : 0.0, "min" : 1, "max" : 20 }, - "sm_code" : { - "distinctValuesCount" : 5.0, - "nullsCount" : 0.000000 + "sm_type" : { + "dataSize" : 150.0, + "nullsCount" : 0.0, + "distinctValuesCount" : 6.0 + }, + "sm_contract" : { + "dataSize" : 252.0, + "nullsCount" : 0.0, + "distinctValuesCount" : 19.0 + }, + "sm_ship_mode_id" : { + "dataSize" : 320.0, + "nullsCount" : 0.0, + "distinctValuesCount" : 18.0 }, "sm_carrier" : { - "distinctValuesCount" : 26.0, - "nullsCount" : 0.000000 + "dataSize" : 133.0, + "nullsCount" : 0.0, + "distinctValuesCount" : 26.0 }, "dummyColumn" : {} } diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/store.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/store.json index ab3eaffc49af7..13c682633e5bb 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/store.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/store.json @@ -1,143 +1,161 @@ { "rowCount" : 1350.0, "columns" : { - "s_company_id" : { - "distinctValuesCount" : 1.0, - "nullsCount" : 10.000000, - "min" : 1, - "max" : 1 + "s_store_name" : { + "dataSize" : 5286.0, + "nullsCount" : 8.0, + "distinctValuesCount" : 11.0 }, - "s_closed_date_sk" : { - "distinctValuesCount" : 188.0, - "nullsCount" : 961.000000, - "min" : 2450820, - "max" : 2451313 + "s_street_name" : { + "dataSize" : 11554.999999999998, + "nullsCount" : 10.0, + "distinctValuesCount" : 753.0 }, "s_geography_class" : { - "distinctValuesCount" : 1.0, - "nullsCount" : 9.000000 - }, - "s_tax_precentage" : { - "distinctValuesCount" : 15.0, - "nullsCount" : 9.000000, - "min" : 0, - "max" : 11 + "dataSize" : 9387.0, + "nullsCount" : 9.0, + "distinctValuesCount" : 1.0 }, - "s_street_type" : { - "distinctValuesCount" : 23.0, - "nullsCount" : 10.000000 - }, - "s_rec_start_date" : { - "distinctValuesCount" : 4.0, - "nullsCount" : 9.000000, - "min" : "1997-03-14", - "max" : "2001-03-14" + "s_zip" : { + "dataSize" : 6700.0, + "nullsCount" : 10.0, + "distinctValuesCount" : 488.0 }, - "s_floor_space" : { - "distinctValuesCount" : 1213.0, - "nullsCount" : 8.000000, - "min" : 5002549, - "max" : 9997773 + "s_city" : { + "dataSize" : 12190.0, + "nullsCount" : 10.0, + "distinctValuesCount" : 61.0 }, - "s_division_id" : { - "distinctValuesCount" : 1.0, - "nullsCount" : 7.000000, - "min" : 1, - "max" : 1 + "s_closed_date_sk" : { + "distinctValuesCount" : 188.0, + "nullsCount" : 961.0, + "min" : 2450820, + "max" : 2451313 }, - "s_zip" : { - "distinctValuesCount" : 488.0, - "nullsCount" : 10.000000 + "s_hours" : { + "dataSize" : 9557.0, + "nullsCount" : 13.000000000000002, + "distinctValuesCount" : 3.0 }, "s_manager" : { - "distinctValuesCount" : 1020.0, - "nullsCount" : 13.000000 - }, - "s_store_name" : { - "distinctValuesCount" : 11.0, - "nullsCount" : 8.000000 + "dataSize" : 17072.0, + "nullsCount" : 13.000000000000002, + "distinctValuesCount" : 1020.0 }, "s_market_id" : { "distinctValuesCount" : 11.0, - "nullsCount" : 10.000000, + "nullsCount" : 10.0, "min" : 1, "max" : 10 }, - "s_market_desc" : { - "distinctValuesCount" : 1020.0, - "nullsCount" : 13.000000 - }, - "s_number_employees" : { - "distinctValuesCount" : 63.0, - "nullsCount" : 11.000000, - "min" : 200, - "max" : 300 + "s_state" : { + "dataSize" : 2684.0, + "nullsCount" : 8.0, + "distinctValuesCount" : 36.0 }, - "s_store_sk" : { - "distinctValuesCount" : 1213.0, - "nullsCount" : 0.000000, + "s_company_id" : { + "distinctValuesCount" : 1.0, + "nullsCount" : 10.0, "min" : 1, - "max" : 1350 + "max" : 1 }, "s_rec_end_date" : { "distinctValuesCount" : 2.0, - "nullsCount" : 675.000000, + "nullsCount" : 675.0, "min" : "1999-03-14", "max" : "2001-03-13" }, - "s_county" : { - "distinctValuesCount" : 39.0, - "nullsCount" : 8.000000 + "s_country" : { + "dataSize" : 17472.0, + "nullsCount" : 6.0, + "distinctValuesCount" : 1.0 }, "s_store_id" : { - "distinctValuesCount" : 633.0, - "nullsCount" : 0.000000 + "dataSize" : 21600.0, + "nullsCount" : 0.0, + "distinctValuesCount" : 633.0 }, "s_gmt_offset" : { "distinctValuesCount" : 3.0, - "nullsCount" : 6.000000, - "min" : -800, - "max" : -500 - }, - "s_hours" : { - "distinctValuesCount" : 3.0, - "nullsCount" : 13.000000 + "nullsCount" : 6.0, + "min" : -8.00, + "max" : -5.00 }, - "s_state" : { - "distinctValuesCount" : 36.0, - "nullsCount" : 8.000000 - }, - "s_street_number" : { - "distinctValuesCount" : 556.0, - "nullsCount" : 12.000000 + "s_street_type" : { + "dataSize" : 5631.999999999999, + "nullsCount" : 10.0, + "distinctValuesCount" : 23.0 }, - "s_division_name" : { + "s_division_id" : { "distinctValuesCount" : 1.0, - "nullsCount" : 9.000000 + "nullsCount" : 7.0, + "min" : 1, + "max" : 1 }, "s_suite_number" : { - "distinctValuesCount" : 86.0, - "nullsCount" : 6.000000 + "dataSize" : 10590.0, + "nullsCount" : 6.0, + "distinctValuesCount" : 86.0 }, - "s_market_manager" : { - "distinctValuesCount" : 787.0, - "nullsCount" : 12.000000 + "s_number_employees" : { + "distinctValuesCount" : 63.0, + "nullsCount" : 10.999999999999998, + "min" : 200, + "max" : 300 + }, + "s_county" : { + "dataSize" : 18716.0, + "nullsCount" : 8.0, + "distinctValuesCount" : 39.0 + }, + "s_store_sk" : { + "distinctValuesCount" : 1213.0, + "nullsCount" : 0.0, + "min" : 1, + "max" : 1350 }, "s_company_name" : { - "distinctValuesCount" : 1.0, - "nullsCount" : 10.000000 + "dataSize" : 9380.0, + "nullsCount" : 10.0, + "distinctValuesCount" : 1.0 }, - "s_country" : { - "distinctValuesCount" : 1.0, - "nullsCount" : 6.000000 + "s_market_manager" : { + "dataSize" : 17211.0, + "nullsCount" : 12.0, + "distinctValuesCount" : 787.0 }, - "s_street_name" : { - "distinctValuesCount" : 753.0, - "nullsCount" : 10.000000 + "s_market_desc" : { + "dataSize" : 78013.0, + "nullsCount" : 13.000000000000002, + "distinctValuesCount" : 1020.0 }, - "s_city" : { - "distinctValuesCount" : 61.0, - "nullsCount" : 10.000000 + "s_street_number" : { + "dataSize" : 3876.0, + "nullsCount" : 12.0, + "distinctValuesCount" : 556.0 + }, + "s_tax_precentage" : { + "distinctValuesCount" : 15.0, + "nullsCount" : 9.0, + "min" : 0, + "max" : 11 + }, + "s_division_name" : { + "dataSize" : 9387.0, + "nullsCount" : 9.0, + "distinctValuesCount" : 1.0 + }, + "s_floor_space" : { + "distinctValuesCount" : 1213.0, + "nullsCount" : 8.0, + "min" : 5002549, + "max" : 9997773 + }, + "s_rec_start_date" : { + "distinctValuesCount" : 4.0, + "nullsCount" : 9.0, + "min" : "1997-03-14", + "max" : "2001-03-14" }, "dummyColumn" : {} } diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/store_returns.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/store_returns.json index b89643f7511a2..2d6d1b7ccb1df 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/store_returns.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/store_returns.json @@ -1,125 +1,125 @@ { "rowCount" : 8.63989652E8, "columns" : { + "sr_addr_sk" : { + "distinctValuesCount" : 1.9889561E7, + "nullsCount" : 30239142.0, + "min" : 1, + "max" : 15000000 + }, + "sr_customer_sk" : { + "distinctValuesCount" : 4.5300013E7, + "nullsCount" : 30240875.0, + "min" : 1, + "max" : 30000000 + }, + "sr_returned_date_sk" : { + "distinctValuesCount" : 2324.0, + "nullsCount" : 30239636.0, + "min" : 2450820, + "max" : 2452822 + }, + "sr_net_loss" : { + "distinctValuesCount" : 1190394.0, + "nullsCount" : 30234959.999999996, + "min" : 50, + "max" : 1097126 + }, "sr_item_sk" : { "distinctValuesCount" : 385937.0, - "nullsCount" : 0.000000, + "nullsCount" : 0.0, "min" : 1, "max" : 360000 }, - "sr_return_ship_cost" : { - "distinctValuesCount" : 500499.0, - "nullsCount" : 30240907.000000, - "min" : 0, - "max" : 981486 + "sr_store_sk" : { + "distinctValuesCount" : 633.0, + "nullsCount" : 30237802.0, + "min" : 1, + "max" : 1348 }, "sr_ticket_number" : { "distinctValuesCount" : 5.83641873E8, - "nullsCount" : 0.000000, + "nullsCount" : 0.0, "min" : 1, "max" : 720000000 }, - "sr_return_amt_inc_tax" : { - "distinctValuesCount" : 1683471.0, - "nullsCount" : 30237093.000000, - "min" : 0, - "max" : 2080782 - }, - "sr_return_time_sk" : { - "distinctValuesCount" : 46196.0, - "nullsCount" : 30238098.000000, - "min" : 28799, - "max" : 61199 - }, - "sr_return_tax" : { - "distinctValuesCount" : 114739.0, - "nullsCount" : 30240859.000000, + "sr_store_credit" : { + "distinctValuesCount" : 1298134.0, + "nullsCount" : 30229370.999999996, "min" : 0, - "max" : 171437 + "max" : 1779248 }, - "sr_cdemo_sk" : { - "distinctValuesCount" : 1835839.0, - "nullsCount" : 30232372.000000, + "sr_reason_sk" : { + "distinctValuesCount" : 47.0, + "nullsCount" : 30240240.999999996, "min" : 1, - "max" : 1920800 + "max" : 67 }, - "sr_addr_sk" : { - "distinctValuesCount" : 1.9889561E7, - "nullsCount" : 30239142.000000, - "min" : 1, - "max" : 15000000 + "sr_reversed_charge" : { + "distinctValuesCount" : 1190394.0, + "nullsCount" : 30245123.0, + "min" : 0, + "max" : 1734466 }, "sr_fee" : { "distinctValuesCount" : 10590.0, - "nullsCount" : 30229858.000000, + "nullsCount" : 30229858.000000004, "min" : 50, "max" : 10000 }, - "sr_customer_sk" : { - "distinctValuesCount" : 4.5300013E7, - "nullsCount" : 30240875.000000, + "sr_cdemo_sk" : { + "distinctValuesCount" : 1835839.0, + "nullsCount" : 30232372.0, "min" : 1, - "max" : 30000000 + "max" : 1920800 }, - "sr_refunded_cash" : { - "distinctValuesCount" : 1190394.0, - "nullsCount" : 30237954.000000, + "sr_hdemo_sk" : { + "distinctValuesCount" : 9299.0, + "nullsCount" : 30243127.000000004, + "min" : 1, + "max" : 7200 + }, + "sr_return_tax" : { + "distinctValuesCount" : 114739.0, + "nullsCount" : 30240859.0, "min" : 0, - "max" : 1817396 + "max" : 171437 }, - "sr_return_amt" : { - "distinctValuesCount" : 879002.0, - "nullsCount" : 30237383.000000, + "sr_return_ship_cost" : { + "distinctValuesCount" : 500499.0, + "nullsCount" : 30240907.0, "min" : 0, - "max" : 1944700 + "max" : 981486 + }, + "sr_return_time_sk" : { + "distinctValuesCount" : 46196.0, + "nullsCount" : 30238098.0, + "min" : 28799, + "max" : 61199 }, "sr_return_quantity" : { "distinctValuesCount" : 63.0, - "nullsCount" : 30240711.000000, + "nullsCount" : 30240710.999999996, "min" : 1, "max" : 100 }, - "sr_net_loss" : { - "distinctValuesCount" : 1190394.0, - "nullsCount" : 30234960.000000, - "min" : 50, - "max" : 1097126 - }, - "sr_returned_date_sk" : { - "distinctValuesCount" : 2324.0, - "nullsCount" : 30239636.000000, - "min" : 2450820, - "max" : 2452822 - }, - "sr_hdemo_sk" : { - "distinctValuesCount" : 9299.0, - "nullsCount" : 30243127.000000, - "min" : 1, - "max" : 7200 - }, - "sr_store_sk" : { - "distinctValuesCount" : 633.0, - "nullsCount" : 30237802.000000, - "min" : 1, - "max" : 1348 - }, - "sr_reason_sk" : { - "distinctValuesCount" : 47.0, - "nullsCount" : 30240241.000000, - "min" : 1, - "max" : 67 + "sr_return_amt_inc_tax" : { + "distinctValuesCount" : 1683471.0, + "nullsCount" : 30237092.999999996, + "min" : 0, + "max" : 2080782 }, - "sr_reversed_charge" : { + "sr_refunded_cash" : { "distinctValuesCount" : 1190394.0, - "nullsCount" : 30245123.000000, + "nullsCount" : 30237953.999999996, "min" : 0, - "max" : 1734467 + "max" : 1817396 }, - "sr_store_credit" : { - "distinctValuesCount" : 1298134.0, - "nullsCount" : 30229371.000000, + "sr_return_amt" : { + "distinctValuesCount" : 879002.0, + "nullsCount" : 30237382.999999996, "min" : 0, - "max" : 1779248 + "max" : 1944700 }, "dummyColumn" : {} } diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/store_sales.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/store_sales.json index 995b419604ab3..cd2814a42238d 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/store_sales.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/store_sales.json @@ -1,143 +1,143 @@ { "rowCount" : 8.639936081E9, "columns" : { - "ss_net_profit" : { - "distinctValuesCount" : 1835839.0, - "nullsCount" : 388764120.000000, - "min" : -1000000, - "max" : 998600 + "ss_net_paid_inc_tax" : { + "distinctValuesCount" : 2001996.0, + "nullsCount" : 388837233.0, + "min" : 0, + "max" : 2176948 + }, + "ss_ext_list_price" : { + "distinctValuesCount" : 917919.0, + "nullsCount" : 388801162.0, + "min" : 100, + "max" : 2000000 + }, + "ss_net_paid" : { + "distinctValuesCount" : 1543750.0, + "nullsCount" : 388812350.0, + "min" : 0, + "max" : 1997200 + }, + "ss_item_sk" : { + "distinctValuesCount" : 385937.0, + "nullsCount" : 0.0, + "min" : 1, + "max" : 360000 + }, + "ss_promo_sk" : { + "distinctValuesCount" : 1507.0, + "nullsCount" : 388806692.0, + "min" : 1, + "max" : 1800 + }, + "ss_sales_price" : { + "distinctValuesCount" : 19423.0, + "nullsCount" : 388822511.0, + "min" : 0, + "max" : 20000 }, "ss_ext_sales_price" : { "distinctValuesCount" : 917919.0, - "nullsCount" : 388796452.000000, + "nullsCount" : 388796452.0, "min" : 0, "max" : 1997200 }, + "ss_customer_sk" : { + "distinctValuesCount" : 4.5300013E7, + "nullsCount" : 388823543.0, + "min" : 1, + "max" : 30000000 + }, + "ss_net_profit" : { + "distinctValuesCount" : 1835839.0, + "nullsCount" : 388764120.0, + "min" : -10000.00, + "max" : 998600 + }, "ss_ext_tax" : { "distinctValuesCount" : 130664.0, - "nullsCount" : 388790616.000000, + "nullsCount" : 388790616.0, "min" : 0, "max" : 179748 }, "ss_quantity" : { "distinctValuesCount" : 63.0, - "nullsCount" : 388791462.000000, + "nullsCount" : 388791462.0, "min" : 1, "max" : 100 }, - "ss_item_sk" : { - "distinctValuesCount" : 385937.0, - "nullsCount" : 0.000000, + "ss_hdemo_sk" : { + "distinctValuesCount" : 9299.0, + "nullsCount" : 388794618.00000006, "min" : 1, - "max" : 360000 + "max" : 7200 }, - "ss_sold_date_sk" : { - "distinctValuesCount" : 2226.0, - "nullsCount" : 388811692.000000, - "min" : 2450816, - "max" : 2452642 + "ss_store_sk" : { + "distinctValuesCount" : 633.0, + "nullsCount" : 388746744.0, + "min" : 1, + "max" : 1348 }, "ss_ext_discount_amt" : { "distinctValuesCount" : 1355607.0, - "nullsCount" : 388859709.000000, + "nullsCount" : 388859709.0, "min" : 0, "max" : 1977800 }, - "ss_net_paid_inc_tax" : { - "distinctValuesCount" : 2001996.0, - "nullsCount" : 388837233.000000, - "min" : 0, - "max" : 2176948 - }, - "ss_addr_sk" : { - "distinctValuesCount" : 1.9889561E7, - "nullsCount" : 388786978.000000, - "min" : 1, - "max" : 15000000 - }, - "ss_sold_time_sk" : { - "distinctValuesCount" : 74399.0, - "nullsCount" : 388800029.000000, - "min" : 28800, - "max" : 75599 - }, - "ss_cdemo_sk" : { - "distinctValuesCount" : 1835839.0, - "nullsCount" : 388815979.000000, - "min" : 1, - "max" : 1920800 + "ss_wholesale_cost" : { + "distinctValuesCount" : 10590.0, + "nullsCount" : 388777696.00000006, + "min" : 100, + "max" : 10000 }, - "ss_ticket_number" : { - "distinctValuesCount" : 8.25394252E8, - "nullsCount" : 0.000000, - "min" : 1, - "max" : 720000000 + "ss_sold_date_sk" : { + "distinctValuesCount" : 2226.0, + "nullsCount" : 388811692.0, + "min" : 2450816, + "max" : 2452642 }, "ss_coupon_amt" : { "distinctValuesCount" : 1355607.0, - "nullsCount" : 388859709.000000, + "nullsCount" : 388859709.0, "min" : 0, "max" : 1977800 }, - "ss_customer_sk" : { - "distinctValuesCount" : 4.5300013E7, - "nullsCount" : 388823543.000000, - "min" : 1, - "max" : 30000000 - }, "ss_ext_wholesale_cost" : { "distinctValuesCount" : 545798.0, - "nullsCount" : 388787278.000000, + "nullsCount" : 388787278.0, "min" : 100, "max" : 1000000 }, "ss_list_price" : { "distinctValuesCount" : 19423.0, - "nullsCount" : 388813055.000000, + "nullsCount" : 388813055.0, "min" : 100, "max" : 20000 }, - "ss_sales_price" : { - "distinctValuesCount" : 19423.0, - "nullsCount" : 388822511.000000, - "min" : 0, - "max" : 20000 - }, - "ss_promo_sk" : { - "distinctValuesCount" : 1507.0, - "nullsCount" : 388806692.000000, + "ss_cdemo_sk" : { + "distinctValuesCount" : 1835839.0, + "nullsCount" : 388815979.0, "min" : 1, - "max" : 1800 - }, - "ss_net_paid" : { - "distinctValuesCount" : 1543750.0, - "nullsCount" : 388812350.000000, - "min" : 0, - "max" : 1997200 - }, - "ss_wholesale_cost" : { - "distinctValuesCount" : 10590.0, - "nullsCount" : 388777696.000000, - "min" : 100, - "max" : 10000 + "max" : 1920800 }, - "ss_store_sk" : { - "distinctValuesCount" : 633.0, - "nullsCount" : 388746744.000000, + "ss_addr_sk" : { + "distinctValuesCount" : 1.9889561E7, + "nullsCount" : 388786978.0, "min" : 1, - "max" : 1348 - }, - "ss_ext_list_price" : { - "distinctValuesCount" : 917919.0, - "nullsCount" : 388801162.000000, - "min" : 100, - "max" : 2000000 + "max" : 15000000 }, - "ss_hdemo_sk" : { - "distinctValuesCount" : 9299.0, - "nullsCount" : 388794618.000000, + "ss_ticket_number" : { + "distinctValuesCount" : 8.25394252E8, + "nullsCount" : 0.0, "min" : 1, - "max" : 7200 + "max" : 720000000 + }, + "ss_sold_time_sk" : { + "distinctValuesCount" : 74399.0, + "nullsCount" : 388800029.0, + "min" : 28800, + "max" : 75599 }, "dummyColumn" : {} } diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/time_dim.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/time_dim.json index 391810a71fb01..567410c80f1b4 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/time_dim.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/time_dim.json @@ -1,55 +1,60 @@ { "rowCount" : 86400.0, "columns" : { - "t_am_pm" : { - "distinctValuesCount" : 2.0, - "nullsCount" : 0.000000 + "t_meal_time" : { + "dataSize" : 248400.0, + "nullsCount" : 0.0, + "distinctValuesCount" : 4.0 }, - "t_time" : { - "distinctValuesCount" : 125124.0, - "nullsCount" : 0.000000, + "t_minute" : { + "distinctValuesCount" : 37.0, + "nullsCount" : 0.0, "min" : 0, - "max" : 86399 + "max" : 59 }, "t_time_sk" : { "distinctValuesCount" : 125124.0, - "nullsCount" : 0.000000, + "nullsCount" : 0.0, "min" : 0, "max" : 86399 }, - "t_sub_shift" : { - "distinctValuesCount" : 5.0, - "nullsCount" : 0.000000 + "t_time" : { + "distinctValuesCount" : 125124.0, + "nullsCount" : 0.0, + "min" : 0, + "max" : 86399 }, "t_hour" : { "distinctValuesCount" : 19.0, - "nullsCount" : 0.000000, + "nullsCount" : 0.0, "min" : 0, "max" : 23 }, - "t_second" : { - "distinctValuesCount" : 37.0, - "nullsCount" : 0.000000, - "min" : 0, - "max" : 59 - }, "t_time_id" : { - "distinctValuesCount" : 71245.0, - "nullsCount" : 0.000000 - }, - "t_meal_time" : { - "distinctValuesCount" : 4.0, - "nullsCount" : 0.000000 + "dataSize" : 1382400.0, + "nullsCount" : 0.0, + "distinctValuesCount" : 71245.0 }, - "t_minute" : { + "t_second" : { "distinctValuesCount" : 37.0, - "nullsCount" : 0.000000, + "nullsCount" : 0.0, "min" : 0, "max" : 59 }, + "t_sub_shift" : { + "dataSize" : 597600.0, + "nullsCount" : 0.0, + "distinctValuesCount" : 5.0 + }, "t_shift" : { - "distinctValuesCount" : 3.0, - "nullsCount" : 0.000000 + "dataSize" : 460800.0, + "nullsCount" : 0.0, + "distinctValuesCount" : 3.0 + }, + "t_am_pm" : { + "dataSize" : 172800.0, + "nullsCount" : 0.0, + "distinctValuesCount" : 2.0 }, "dummyColumn" : {} } diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/warehouse.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/warehouse.json index d6d33ac6f50e5..9b39bd7e5e06f 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/warehouse.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/warehouse.json @@ -1,67 +1,78 @@ { "rowCount" : 22.0, "columns" : { - "w_suite_number" : { - "distinctValuesCount" : 19.0, - "nullsCount" : 1.000000 - }, - "w_street_name" : { - "distinctValuesCount" : 19.0, - "nullsCount" : 1.000000 - }, - "w_country" : { - "distinctValuesCount" : 1.0, - "nullsCount" : 0.000000 - }, - "w_warehouse_id" : { - "distinctValuesCount" : 18.0, - "nullsCount" : 0.000000 - }, - "w_warehouse_sq_ft" : { - "distinctValuesCount" : 29.0, - "nullsCount" : 1.000000, - "min" : 73065, - "max" : 977787 + "w_zip" : { + "dataSize" : 110.0, + "nullsCount" : 0.0, + "distinctValuesCount" : 22.0 }, "w_city" : { - "distinctValuesCount" : 12.0, - "nullsCount" : 0.000000 + "dataSize" : 210.0, + "nullsCount" : 0.0, + "distinctValuesCount" : 12.0 }, "w_street_number" : { - "distinctValuesCount" : 15.0, - "nullsCount" : 1.000000 - }, - "w_county" : { - "distinctValuesCount" : 19.0, - "nullsCount" : 0.000000 - }, - "w_warehouse_name" : { - "distinctValuesCount" : 18.0, - "nullsCount" : 1.000000 + "dataSize" : 59.99999999999999, + "nullsCount" : 1.0, + "distinctValuesCount" : 15.0 }, "w_street_type" : { - "distinctValuesCount" : 16.0, - "nullsCount" : 1.000000 + "dataSize" : 79.0, + "nullsCount" : 1.0, + "distinctValuesCount" : 16.0 }, - "w_state" : { - "distinctValuesCount" : 13.0, - "nullsCount" : 0.000000 + "w_warehouse_id" : { + "dataSize" : 352.0, + "nullsCount" : 0.0, + "distinctValuesCount" : 18.0 }, - "w_zip" : { - "distinctValuesCount" : 22.0, - "nullsCount" : 0.000000 + "w_country" : { + "dataSize" : 286.0, + "nullsCount" : 0.0, + "distinctValuesCount" : 1.0 + }, + "w_street_name" : { + "dataSize" : 193.0, + "nullsCount" : 1.0, + "distinctValuesCount" : 19.0 }, "w_warehouse_sk" : { "distinctValuesCount" : 18.0, - "nullsCount" : 0.000000, + "nullsCount" : 0.0, "min" : 1, "max" : 22 }, "w_gmt_offset" : { "distinctValuesCount" : 3.0, - "nullsCount" : 1.000000, - "min" : -700, - "max" : -500 + "nullsCount" : 1.0, + "min" : -7.00, + "max" : -5.00 + }, + "w_warehouse_sq_ft" : { + "distinctValuesCount" : 29.0, + "nullsCount" : 1.0, + "min" : 73065, + "max" : 977787 + }, + "w_county" : { + "dataSize" : 322.0, + "nullsCount" : 0.0, + "distinctValuesCount" : 19.0 + }, + "w_state" : { + "dataSize" : 44.0, + "nullsCount" : 0.0, + "distinctValuesCount" : 13.0 + }, + "w_suite_number" : { + "dataSize" : 165.0, + "nullsCount" : 1.0, + "distinctValuesCount" : 19.0 + }, + "w_warehouse_name" : { + "dataSize" : 337.0, + "nullsCount" : 1.0, + "distinctValuesCount" : 18.0 }, "dummyColumn" : {} } diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/web_page.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/web_page.json index aea09ffa91b32..bffe51a64da00 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/web_page.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/web_page.json @@ -1,81 +1,85 @@ { "rowCount" : 3600.0, "columns" : { - "wp_type" : { - "distinctValuesCount" : 6.0, - "nullsCount" : 38.000000 - }, - "wp_rec_end_date" : { - "distinctValuesCount" : 4.0, - "nullsCount" : 1800.000000, - "min" : "1999-09-04", - "max" : "2001-09-03" - }, - "wp_access_date_sk" : { - "distinctValuesCount" : 63.0, - "nullsCount" : 39.000000, - "min" : 2452548, - "max" : 2452648 - }, "wp_web_page_sk" : { "distinctValuesCount" : 4452.0, - "nullsCount" : 0.000000, + "nullsCount" : 0.0, "min" : 1, "max" : 3600 }, + "wp_web_page_id" : { + "dataSize" : 57600.0, + "nullsCount" : 0.0, + "distinctValuesCount" : 1872.0 + }, "wp_link_count" : { "distinctValuesCount" : 16.0, - "nullsCount" : 35.000000, + "nullsCount" : 35.0, "min" : 2, "max" : 25 }, - "wp_max_ad_count" : { - "distinctValuesCount" : 5.0, - "nullsCount" : 41.000000, - "min" : 0, - "max" : 4 - }, - "wp_url" : { - "distinctValuesCount" : 1.0, - "nullsCount" : 38.000000 + "wp_rec_end_date" : { + "distinctValuesCount" : 4.0, + "nullsCount" : 1800.0, + "min" : "1999-09-04", + "max" : "2001-09-03" }, "wp_creation_date_sk" : { "distinctValuesCount" : 165.0, - "nullsCount" : 44.000000, + "nullsCount" : 44.0, "min" : 2450570, "max" : 2450815 }, "wp_autogen_flag" : { - "distinctValuesCount" : 2.0, - "nullsCount" : 48.000000 + "dataSize" : 3552.0, + "nullsCount" : 48.0, + "distinctValuesCount" : 2.0 }, "wp_image_count" : { "distinctValuesCount" : 6.0, - "nullsCount" : 34.000000, + "nullsCount" : 34.0, "min" : 1, "max" : 7 }, - "wp_web_page_id" : { - "distinctValuesCount" : 1872.0, - "nullsCount" : 0.000000 + "wp_customer_sk" : { + "distinctValuesCount" : 822.0, + "nullsCount" : 2567.0, + "min" : 9522, + "max" : 29931793 + }, + "wp_rec_start_date" : { + "distinctValuesCount" : 4.0, + "nullsCount" : 39.0, + "min" : "1997-09-04", + "max" : "2001-09-04" }, "wp_char_count" : { "distinctValuesCount" : 2887.0, - "nullsCount" : 52.000000, + "nullsCount" : 52.0, "min" : 303, "max" : 8523 }, - "wp_rec_start_date" : { - "distinctValuesCount" : 4.0, - "nullsCount" : 39.000000, - "min" : "1997-09-04", - "max" : "2001-09-04" + "wp_access_date_sk" : { + "distinctValuesCount" : 63.0, + "nullsCount" : 39.0, + "min" : 2452548, + "max" : 2452648 }, - "wp_customer_sk" : { - "distinctValuesCount" : 822.0, - "nullsCount" : 2567.000000, - "min" : 9522, - "max" : 29931793 + "wp_type" : { + "dataSize" : 22704.0, + "nullsCount" : 38.0, + "distinctValuesCount" : 6.0 + }, + "wp_max_ad_count" : { + "distinctValuesCount" : 5.0, + "nullsCount" : 41.0, + "min" : 0, + "max" : 4 + }, + "wp_url" : { + "dataSize" : 64115.99999999999, + "nullsCount" : 38.0, + "distinctValuesCount" : 1.0 }, "dummyColumn" : {} } diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/web_returns.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/web_returns.json index 4012247f69eb0..a15ae379b72d5 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/web_returns.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/web_returns.json @@ -1,149 +1,149 @@ { "rowCount" : 2.16003761E8, "columns" : { - "wr_return_amt_inc_tax" : { - "distinctValuesCount" : 1835839.0, - "nullsCount" : 9717393.000000, - "min" : 0, - "max" : 3104742 - }, - "wr_refunded_hdemo_sk" : { - "distinctValuesCount" : 9299.0, - "nullsCount" : 9718519.000000, - "min" : 1, - "max" : 7200 - }, - "wr_returned_time_sk" : { - "distinctValuesCount" : 125124.0, - "nullsCount" : 9718368.000000, - "min" : 0, - "max" : 86399 - }, - "wr_refunded_cdemo_sk" : { - "distinctValuesCount" : 1835839.0, - "nullsCount" : 9719404.000000, - "min" : 1, - "max" : 1920800 - }, - "wr_item_sk" : { - "distinctValuesCount" : 385937.0, - "nullsCount" : 0.000000, - "min" : 1, - "max" : 360000 - }, - "wr_returning_customer_sk" : { - "distinctValuesCount" : 4.5300013E7, - "nullsCount" : 9714066.000000, - "min" : 1, - "max" : 30000000 - }, - "wr_returning_addr_sk" : { - "distinctValuesCount" : 1.9889561E7, - "nullsCount" : 9716775.000000, - "min" : 1, - "max" : 15000000 - }, - "wr_net_loss" : { - "distinctValuesCount" : 1355607.0, - "nullsCount" : 9716393.000000, - "min" : 50, - "max" : 1673332 - }, - "wr_return_tax" : { - "distinctValuesCount" : 192968.0, - "nullsCount" : 9714571.000000, - "min" : 0, - "max" : 255116 - }, - "wr_returning_hdemo_sk" : { - "distinctValuesCount" : 9299.0, - "nullsCount" : 9716319.000000, + "wr_web_page_sk" : { + "distinctValuesCount" : 4452.0, + "nullsCount" : 9722530.0, "min" : 1, - "max" : 7200 + "max" : 3600 }, "wr_fee" : { "distinctValuesCount" : 10590.0, - "nullsCount" : 9718500.000000, + "nullsCount" : 9718500.0, "min" : 50, "max" : 10000 }, "wr_return_ship_cost" : { "distinctValuesCount" : 621548.0, - "nullsCount" : 9718757.000000, + "nullsCount" : 9718757.0, "min" : 0, "max" : 1447852 }, + "wr_returning_hdemo_sk" : { + "distinctValuesCount" : 9299.0, + "nullsCount" : 9716319.0, + "min" : 1, + "max" : 7200 + }, "wr_refunded_cash" : { "distinctValuesCount" : 1543750.0, - "nullsCount" : 9718569.000000, + "nullsCount" : 9718569.0, "min" : 0, "max" : 2808582 }, - "wr_account_credit" : { - "distinctValuesCount" : 1190394.0, - "nullsCount" : 9721316.000000, - "min" : 0, - "max" : 2383198 - }, - "wr_reversed_charge" : { - "distinctValuesCount" : 1298134.0, - "nullsCount" : 9720779.000000, - "min" : 0, - "max" : 2356160 + "wr_returned_date_sk" : { + "distinctValuesCount" : 2647.0, + "nullsCount" : 9721182.0, + "min" : 2450819, + "max" : 2453002 }, "wr_refunded_addr_sk" : { "distinctValuesCount" : 1.9889561E7, - "nullsCount" : 9720949.000000, + "nullsCount" : 9720949.0, "min" : 1, "max" : 15000000 }, + "wr_returning_addr_sk" : { + "distinctValuesCount" : 1.9889561E7, + "nullsCount" : 9716775.0, + "min" : 1, + "max" : 15000000 + }, + "wr_refunded_cdemo_sk" : { + "distinctValuesCount" : 1835839.0, + "nullsCount" : 9719404.0, + "min" : 1, + "max" : 1920800 + }, + "wr_returning_customer_sk" : { + "distinctValuesCount" : 4.5300013E7, + "nullsCount" : 9714066.0, + "min" : 1, + "max" : 30000000 + }, + "wr_returned_time_sk" : { + "distinctValuesCount" : 125124.0, + "nullsCount" : 9718368.0, + "min" : 0, + "max" : 86399 + }, "wr_return_quantity" : { "distinctValuesCount" : 63.0, - "nullsCount" : 9720613.000000, + "nullsCount" : 9720613.0, "min" : 1, "max" : 100 }, + "wr_reason_sk" : { + "distinctValuesCount" : 47.0, + "nullsCount" : 9719509.0, + "min" : 1, + "max" : 67 + }, + "wr_returning_cdemo_sk" : { + "distinctValuesCount" : 1835839.0, + "nullsCount" : 9718132.0, + "min" : 1, + "max" : 1920800 + }, + "wr_order_number" : { + "distinctValuesCount" : 1.12512351E8, + "nullsCount" : 0.0, + "min" : 1, + "max" : 179999999 + }, + "wr_net_loss" : { + "distinctValuesCount" : 1355607.0, + "nullsCount" : 9716393.0, + "min" : 50, + "max" : 1673332 + }, "wr_refunded_customer_sk" : { "distinctValuesCount" : 4.5300013E7, - "nullsCount" : 9721855.000000, + "nullsCount" : 9721855.0, "min" : 1, "max" : 30000000 }, "wr_return_amt" : { "distinctValuesCount" : 1045316.0, - "nullsCount" : 9719128.000000, + "nullsCount" : 9719128.0, "min" : 0, "max" : 2919100 }, - "wr_web_page_sk" : { - "distinctValuesCount" : 4452.0, - "nullsCount" : 9722530.000000, + "wr_item_sk" : { + "distinctValuesCount" : 385937.0, + "nullsCount" : 0.0, "min" : 1, - "max" : 3600 + "max" : 360000 }, - "wr_returned_date_sk" : { - "distinctValuesCount" : 2647.0, - "nullsCount" : 9721182.000000, - "min" : 2450819, - "max" : 2453002 + "wr_return_amt_inc_tax" : { + "distinctValuesCount" : 1835839.0, + "nullsCount" : 9717393.0, + "min" : 0, + "max" : 3104742 }, - "wr_order_number" : { - "distinctValuesCount" : 1.12512351E8, - "nullsCount" : 0.000000, + "wr_refunded_hdemo_sk" : { + "distinctValuesCount" : 9299.0, + "nullsCount" : 9718519.0, "min" : 1, - "max" : 179999999 + "max" : 7200 }, - "wr_reason_sk" : { - "distinctValuesCount" : 47.0, - "nullsCount" : 9719509.000000, - "min" : 1, - "max" : 67 + "wr_reversed_charge" : { + "distinctValuesCount" : 1298134.0, + "nullsCount" : 9720779.0, + "min" : 0, + "max" : 2356160 }, - "wr_returning_cdemo_sk" : { - "distinctValuesCount" : 1835839.0, - "nullsCount" : 9718132.000000, - "min" : 1, - "max" : 1920800 + "wr_account_credit" : { + "distinctValuesCount" : 1190394.0, + "nullsCount" : 9721316.0, + "min" : 0, + "max" : 2383198 + }, + "wr_return_tax" : { + "distinctValuesCount" : 192968.0, + "nullsCount" : 9714571.0, + "min" : 0, + "max" : 255116 }, "dummyColumn" : {} } diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/web_sales.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/web_sales.json index 4775d2c0a2ac7..6b562ad892451 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/web_sales.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/web_sales.json @@ -1,209 +1,209 @@ { "rowCount" : 2.159968881E9, "columns" : { - "ws_bill_customer_sk" : { - "distinctValuesCount" : 4.5300013E7, - "nullsCount" : 540060.000000, - "min" : 1, - "max" : 30000000 - }, - "ws_web_site_sk" : { - "distinctValuesCount" : 45.0, - "nullsCount" : 540166.000000, - "min" : 1, - "max" : 66 + "ws_ext_sales_price" : { + "distinctValuesCount" : 1243097.0, + "nullsCount" : 540534.0, + "min" : 0, + "max" : 2997000 }, - "ws_promo_sk" : { - "distinctValuesCount" : 1507.0, - "nullsCount" : 541047.000000, + "ws_warehouse_sk" : { + "distinctValuesCount" : 18.0, + "nullsCount" : 540303.0, "min" : 1, - "max" : 1800 + "max" : 22 }, "ws_sold_date_sk" : { "distinctValuesCount" : 2226.0, - "nullsCount" : 540293.000000, + "nullsCount" : 540293.0, "min" : 2450816, "max" : 2452642 }, "ws_sales_price" : { "distinctValuesCount" : 25189.0, - "nullsCount" : 540390.000000, + "nullsCount" : 540390.0, "min" : 0, "max" : 30000 }, - "ws_bill_addr_sk" : { + "ws_ship_addr_sk" : { "distinctValuesCount" : 1.9889561E7, - "nullsCount" : 539531.000000, + "nullsCount" : 539862.0, "min" : 1, "max" : 15000000 }, - "ws_ext_wholesale_cost" : { - "distinctValuesCount" : 545798.0, - "nullsCount" : 540678.000000, - "min" : 100, - "max" : 1000000 - }, - "ws_ext_sales_price" : { - "distinctValuesCount" : 1243097.0, - "nullsCount" : 540534.000000, - "min" : 0, - "max" : 2997000 - }, - "ws_ext_ship_cost" : { - "distinctValuesCount" : 621548.0, - "nullsCount" : 540617.000000, - "min" : 0, - "max" : 1495000 - }, - "ws_web_page_sk" : { - "distinctValuesCount" : 4452.0, - "nullsCount" : 539709.000000, + "ws_bill_customer_sk" : { + "distinctValuesCount" : 4.5300013E7, + "nullsCount" : 540060.0, "min" : 1, - "max" : 3600 + "max" : 30000000 }, - "ws_net_paid_inc_ship_tax" : { - "distinctValuesCount" : 3671678.0, - "nullsCount" : 0.000000, - "min" : 0, - "max" : 4638984 + "ws_ship_mode_sk" : { + "distinctValuesCount" : 18.0, + "nullsCount" : 540512.0, + "min" : 1, + "max" : 20 }, - "ws_order_number" : { - "distinctValuesCount" : 1.52370476E8, - "nullsCount" : 0.000000, + "ws_bill_cdemo_sk" : { + "distinctValuesCount" : 1835839.0, + "nullsCount" : 539400.0, "min" : 1, - "max" : 180000000 + "max" : 1920800 }, "ws_bill_hdemo_sk" : { "distinctValuesCount" : 9299.0, - "nullsCount" : 540153.000000, + "nullsCount" : 540153.0, "min" : 1, "max" : 7200 }, - "ws_ship_mode_sk" : { - "distinctValuesCount" : 18.0, - "nullsCount" : 540512.000000, + "ws_ship_customer_sk" : { + "distinctValuesCount" : 4.5300013E7, + "nullsCount" : 540042.0, "min" : 1, - "max" : 20 + "max" : 30000000 }, - "ws_warehouse_sk" : { - "distinctValuesCount" : 18.0, - "nullsCount" : 540303.000000, + "ws_net_paid_inc_ship" : { + "distinctValuesCount" : 3516010.0, + "nullsCount" : 0.0, + "min" : 0, + "max" : 4426300 + }, + "ws_web_site_sk" : { + "distinctValuesCount" : 45.0, + "nullsCount" : 540166.0, "min" : 1, - "max" : 22 + "max" : 66 }, - "ws_net_paid_inc_tax" : { - "distinctValuesCount" : 2380788.0, - "nullsCount" : 540631.000000, - "min" : 0, - "max" : 3249290 + "ws_promo_sk" : { + "distinctValuesCount" : 1507.0, + "nullsCount" : 541047.0, + "min" : 1, + "max" : 1800 }, - "ws_sold_time_sk" : { - "distinctValuesCount" : 125124.0, - "nullsCount" : 540530.000000, - "min" : 0, - "max" : 86399 + "ws_order_number" : { + "distinctValuesCount" : 1.52370476E8, + "nullsCount" : 0.0, + "min" : 1, + "max" : 180000000 }, "ws_coupon_amt" : { "distinctValuesCount" : 2001996.0, - "nullsCount" : 539810.000000, + "nullsCount" : 539810.0, "min" : 0, "max" : 2882400 }, "ws_net_paid" : { "distinctValuesCount" : 2090632.0, - "nullsCount" : 540425.000000, + "nullsCount" : 540425.0, "min" : 0, "max" : 2997000 }, - "ws_item_sk" : { - "distinctValuesCount" : 385937.0, - "nullsCount" : 0.000000, - "min" : 1, - "max" : 360000 - }, "ws_list_price" : { "distinctValuesCount" : 25189.0, - "nullsCount" : 540397.000000, + "nullsCount" : 540397.0, "min" : 100, "max" : 30000 }, + "ws_ship_date_sk" : { + "distinctValuesCount" : 2324.0, + "nullsCount" : 540220.0, + "min" : 2450817, + "max" : 2452762 + }, + "ws_ship_cdemo_sk" : { + "distinctValuesCount" : 1835839.0, + "nullsCount" : 540787.0, + "min" : 1, + "max" : 1920800 + }, + "ws_ext_tax" : { + "distinctValuesCount" : 219750.0, + "nullsCount" : 539357.0, + "min" : 0, + "max" : 268290 + }, + "ws_ship_hdemo_sk" : { + "distinctValuesCount" : 9299.0, + "nullsCount" : 539449.0, + "min" : 1, + "max" : 7200 + }, "ws_wholesale_cost" : { "distinctValuesCount" : 10590.0, - "nullsCount" : 540191.000000, + "nullsCount" : 540191.0, "min" : 100, "max" : 10000 }, "ws_ext_discount_amt" : { "distinctValuesCount" : 1243097.0, - "nullsCount" : 540249.000000, + "nullsCount" : 540249.0, "min" : 0, "max" : 2998200 }, - "ws_ship_hdemo_sk" : { - "distinctValuesCount" : 9299.0, - "nullsCount" : 539449.000000, + "ws_item_sk" : { + "distinctValuesCount" : 385937.0, + "nullsCount" : 0.0, "min" : 1, - "max" : 7200 + "max" : 360000 + }, + "ws_sold_time_sk" : { + "distinctValuesCount" : 125124.0, + "nullsCount" : 540530.0, + "min" : 0, + "max" : 86399 + }, + "ws_ext_list_price" : { + "distinctValuesCount" : 1355607.0, + "nullsCount" : 539882.0, + "min" : 100, + "max" : 3000000 + }, + "ws_net_paid_inc_ship_tax" : { + "distinctValuesCount" : 3671678.0, + "nullsCount" : 0.0, + "min" : 0, + "max" : 4638984 }, "ws_quantity" : { "distinctValuesCount" : 63.0, - "nullsCount" : 539966.000000, + "nullsCount" : 539966.0, "min" : 1, "max" : 100 }, - "ws_ext_tax" : { - "distinctValuesCount" : 219750.0, - "nullsCount" : 539357.000000, - "min" : 0, - "max" : 268290 + "ws_ext_wholesale_cost" : { + "distinctValuesCount" : 545798.0, + "nullsCount" : 540678.0, + "min" : 100, + "max" : 1000000 }, - "ws_net_profit" : { - "distinctValuesCount" : 2596268.0, - "nullsCount" : 0.000000, - "min" : -1000000, - "max" : 1998000 + "ws_net_paid_inc_tax" : { + "distinctValuesCount" : 2380788.0, + "nullsCount" : 540631.0, + "min" : 0, + "max" : 3249290 }, - "ws_ship_addr_sk" : { + "ws_bill_addr_sk" : { "distinctValuesCount" : 1.9889561E7, - "nullsCount" : 539862.000000, + "nullsCount" : 539531.0, "min" : 1, "max" : 15000000 }, - "ws_bill_cdemo_sk" : { - "distinctValuesCount" : 1835839.0, - "nullsCount" : 539400.000000, - "min" : 1, - "max" : 1920800 - }, - "ws_ship_date_sk" : { - "distinctValuesCount" : 2324.0, - "nullsCount" : 540220.000000, - "min" : 2450817, - "max" : 2452762 - }, - "ws_ext_list_price" : { - "distinctValuesCount" : 1355607.0, - "nullsCount" : 539882.000000, - "min" : 100, - "max" : 3000000 - }, - "ws_net_paid_inc_ship" : { - "distinctValuesCount" : 3516010.0, - "nullsCount" : 0.000000, - "min" : 0, - "max" : 4426300 + "ws_net_profit" : { + "distinctValuesCount" : 2596268.0, + "nullsCount" : 0.0, + "min" : -10000.00, + "max" : 1998000 }, - "ws_ship_customer_sk" : { - "distinctValuesCount" : 4.5300013E7, - "nullsCount" : 540042.000000, + "ws_web_page_sk" : { + "distinctValuesCount" : 4452.0, + "nullsCount" : 539709.0, "min" : 1, - "max" : 30000000 + "max" : 3600 }, - "ws_ship_cdemo_sk" : { - "distinctValuesCount" : 1835839.0, - "nullsCount" : 540787.000000, - "min" : 1, - "max" : 1920800 + "ws_ext_ship_cost" : { + "distinctValuesCount" : 621548.0, + "nullsCount" : 540617.0, + "min" : 0, + "max" : 1495000 }, "dummyColumn" : {} } diff --git a/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/web_site.json b/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/web_site.json index 3cb50b7c837b7..810eb0845b244 100644 --- a/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/web_site.json +++ b/presto-tpcds/src/main/resources/tpcds/statistics/sf3000/web_site.json @@ -1,127 +1,144 @@ { "rowCount" : 66.0, "columns" : { - "web_mkt_id" : { - "distinctValuesCount" : 5.0, - "nullsCount" : 1.000000, - "min" : 1, - "max" : 6 + "web_suite_number" : { + "dataSize" : 523.0, + "nullsCount" : 0.0, + "distinctValuesCount" : 49.0 }, - "web_mkt_desc" : { - "distinctValuesCount" : 45.0, - "nullsCount" : 0.000000 + "web_class" : { + "dataSize" : 455.0, + "nullsCount" : 1.0, + "distinctValuesCount" : 1.0 }, - "web_market_manager" : { - "distinctValuesCount" : 49.0, - "nullsCount" : 1.000000 + "web_zip" : { + "dataSize" : 330.0, + "nullsCount" : 0.0, + "distinctValuesCount" : 34.0 }, - "web_street_name" : { - "distinctValuesCount" : 82.0, - "nullsCount" : 1.000000 + "web_mkt_class" : { + "dataSize" : 2255.0, + "nullsCount" : 1.0, + "distinctValuesCount" : 66.0 }, "web_company_id" : { "distinctValuesCount" : 5.0, - "nullsCount" : 0.000000, + "nullsCount" : 0.0, "min" : 1, "max" : 6 }, - "web_suite_number" : { - "distinctValuesCount" : 49.0, - "nullsCount" : 0.000000 - }, - "web_street_type" : { - "distinctValuesCount" : 23.0, - "nullsCount" : 0.000000 - }, - "web_rec_start_date" : { - "distinctValuesCount" : 4.0, - "nullsCount" : 2.000000, - "min" : "1997-08-17", - "max" : "2001-08-17" + "web_street_name" : { + "dataSize" : 602.0, + "nullsCount" : 1.0, + "distinctValuesCount" : 82.0 }, - "web_zip" : { - "distinctValuesCount" : 34.0, - "nullsCount" : 0.000000 + "web_street_number" : { + "dataSize" : 190.0, + "nullsCount" : 1.0, + "distinctValuesCount" : 43.0 }, - "web_mkt_class" : { - "distinctValuesCount" : 66.0, - "nullsCount" : 1.000000 + "web_company_name" : { + "dataSize" : 253.0, + "nullsCount" : 2.0, + "distinctValuesCount" : 7.0 }, "web_county" : { - "distinctValuesCount" : 28.0, - "nullsCount" : 1.000000 + "dataSize" : 874.0, + "nullsCount" : 1.0, + "distinctValuesCount" : 28.0 }, - "web_tax_percentage" : { - "distinctValuesCount" : 15.0, - "nullsCount" : 1.000000, - "min" : 0, - "max" : 12 + "web_manager" : { + "dataSize" : 835.0, + "nullsCount" : 1.0, + "distinctValuesCount" : 47.0 }, - "web_gmt_offset" : { - "distinctValuesCount" : 3.0, - "nullsCount" : 1.000000, - "min" : -800, - "max" : -500 + "web_market_manager" : { + "dataSize" : 829.0, + "nullsCount" : 1.0, + "distinctValuesCount" : 49.0 }, - "web_open_date_sk" : { - "distinctValuesCount" : 26.0, - "nullsCount" : 1.000000, - "min" : 2450271, - "max" : 2450807 + "web_street_type" : { + "dataSize" : 252.0, + "nullsCount" : 0.0, + "distinctValuesCount" : 23.0 }, "web_rec_end_date" : { "distinctValuesCount" : 3.0, - "nullsCount" : 33.000000, + "nullsCount" : 33.0, "min" : "1999-08-17", "max" : "2001-08-16" }, - "web_manager" : { - "distinctValuesCount" : 47.0, - "nullsCount" : 1.000000 - }, "web_close_date_sk" : { "distinctValuesCount" : 25.0, - "nullsCount" : 12.000000, + "nullsCount" : 12.0, "min" : 2441163, "max" : 2446218 }, "web_site_sk" : { "distinctValuesCount" : 45.0, - "nullsCount" : 0.000000, + "nullsCount" : 0.0, "min" : 1, "max" : 66 }, - "web_city" : { - "distinctValuesCount" : 49.0, - "nullsCount" : 1.000000 - }, - "web_street_number" : { - "distinctValuesCount" : 43.0, - "nullsCount" : 1.000000 + "web_state" : { + "dataSize" : 132.0, + "nullsCount" : 0.0, + "distinctValuesCount" : 29.0 }, "web_name" : { - "distinctValuesCount" : 12.0, - "nullsCount" : 2.000000 + "dataSize" : 390.0, + "nullsCount" : 2.0, + "distinctValuesCount" : 12.0 }, - "web_state" : { - "distinctValuesCount" : 29.0, - "nullsCount" : 0.000000 + "web_gmt_offset" : { + "distinctValuesCount" : 3.0, + "nullsCount" : 1.0, + "min" : -8.00, + "max" : -5.00 + }, + "web_tax_percentage" : { + "distinctValuesCount" : 15.0, + "nullsCount" : 1.0, + "min" : 0, + "max" : 12 }, "web_site_id" : { - "distinctValuesCount" : 30.0, - "nullsCount" : 0.000000 + "dataSize" : 1056.0, + "nullsCount" : 0.0, + "distinctValuesCount" : 30.0 }, - "web_company_name" : { - "distinctValuesCount" : 7.0, - "nullsCount" : 2.000000 + "web_country" : { + "dataSize" : 845.0, + "nullsCount" : 1.0, + "distinctValuesCount" : 1.0 }, - "web_class" : { - "distinctValuesCount" : 1.0, - "nullsCount" : 1.000000 + "web_mkt_desc" : { + "dataSize" : 4242.0, + "nullsCount" : 0.0, + "distinctValuesCount" : 45.0 }, - "web_country" : { - "distinctValuesCount" : 1.0, - "nullsCount" : 1.000000 + "web_rec_start_date" : { + "distinctValuesCount" : 4.0, + "nullsCount" : 2.0, + "min" : "1997-08-17", + "max" : "2001-08-17" + }, + "web_mkt_id" : { + "distinctValuesCount" : 5.0, + "nullsCount" : 1.0, + "min" : 1, + "max" : 6 + }, + "web_open_date_sk" : { + "distinctValuesCount" : 26.0, + "nullsCount" : 1.0, + "min" : 2450271, + "max" : 2450807 + }, + "web_city" : { + "dataSize" : 621.0, + "nullsCount" : 1.0, + "distinctValuesCount" : 49.0 }, "dummyColumn" : {} } diff --git a/presto-tpcds/src/test/java/com/facebook/presto/tpcds/TestTpcdsMetadataStatistics.java b/presto-tpcds/src/test/java/com/facebook/presto/tpcds/TestTpcdsMetadataStatistics.java index 44bcbe49cd903..38c50c7c234eb 100644 --- a/presto-tpcds/src/test/java/com/facebook/presto/tpcds/TestTpcdsMetadataStatistics.java +++ b/presto-tpcds/src/test/java/com/facebook/presto/tpcds/TestTpcdsMetadataStatistics.java @@ -125,6 +125,7 @@ public void testTableStatsDetails() .setDistinctValuesCount(new Estimate(3)) .setLowValue(Optional.of(Slices.utf8Slice("AAAAAAAABAAAAAAA"))) .setHighValue(Optional.of(Slices.utf8Slice("AAAAAAAAEAAAAAAA"))) + .setDataSize(new Estimate(48.0)) .build()) .build()); @@ -138,6 +139,7 @@ public void testTableStatsDetails() .setDistinctValuesCount(new Estimate(1)) .setLowValue(Optional.of(Slices.utf8Slice("31904"))) .setHighValue(Optional.of(Slices.utf8Slice("31904"))) + .setDataSize(new Estimate(5.0)) .build()) .build()); diff --git a/presto-tpcds/src/test/java/com/facebook/presto/tpcds/statistics/ColumnStatisticsRecorder.java b/presto-tpcds/src/test/java/com/facebook/presto/tpcds/statistics/ColumnStatisticsRecorder.java index b8ce057d04c6d..89b957746a578 100644 --- a/presto-tpcds/src/test/java/com/facebook/presto/tpcds/statistics/ColumnStatisticsRecorder.java +++ b/presto-tpcds/src/test/java/com/facebook/presto/tpcds/statistics/ColumnStatisticsRecorder.java @@ -14,14 +14,24 @@ package com.facebook.presto.tpcds.statistics; +import com.teradata.tpcds.column.ColumnType; + import java.util.Optional; import java.util.TreeSet; +import static java.util.Objects.requireNonNull; + class ColumnStatisticsRecorder { private final TreeSet nonNullValues = new TreeSet<>(); + private final ColumnType type; private long nullsCount; + public ColumnStatisticsRecorder(ColumnType type) + { + this.type = requireNonNull(type, "type is null"); + } + public void record(Comparable value) { if (value != null) { @@ -38,7 +48,8 @@ public ColumnStatisticsData getRecording() getDistinctValuesCount(), getNullsCount(), getLowestValue(), - getHighestValue()); + getHighestValue(), + getDataSize()); } private long getDistinctValuesCount() @@ -60,4 +71,21 @@ private Optional getHighestValue() { return nonNullValues.size() > 0 ? Optional.of(nonNullValues.last()) : Optional.empty(); } + + public Optional getDataSize() + { + if (type.getBase() == ColumnType.Base.VARCHAR || type.getBase() == ColumnType.Base.CHAR) { + return Optional.of(nonNullValues.stream() + .map(String.class::cast) + .map(value -> { + if (type.getBase() == ColumnType.Base.CHAR) { + return value.replaceFirst(" +$", ""); + } + return value; + }) + .mapToLong(String::length) + .sum()); + } + return Optional.empty(); + } } diff --git a/presto-tpcds/src/test/java/com/facebook/presto/tpcds/statistics/TableStatisticsRecorder.java b/presto-tpcds/src/test/java/com/facebook/presto/tpcds/statistics/TableStatisticsRecorder.java index 237235f4af583..f9ca1411d7ec5 100644 --- a/presto-tpcds/src/test/java/com/facebook/presto/tpcds/statistics/TableStatisticsRecorder.java +++ b/presto-tpcds/src/test/java/com/facebook/presto/tpcds/statistics/TableStatisticsRecorder.java @@ -66,7 +66,7 @@ public TableStatisticsData recordStatistics(Table table, double scaleFactor) private List createStatisticsRecorders(List columns) { return columns.stream() - .map(column -> new ColumnStatisticsRecorder()) + .map(column -> new ColumnStatisticsRecorder(column.getType())) .collect(toImmutableList()); } From bd4b70f0cd6e130f49fdcfbf45df32f10c6eb791 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Osipiuk?= Date: Mon, 26 Mar 2018 15:27:55 +0200 Subject: [PATCH 13/13] Add statistics test for table partitioned by varchar column --- .../tests/hive/HiveTableDefinitions.java | 42 ++++- .../tests/hive/TestExternalHiveTable.java | 6 +- .../tests/hive/TestHiveTableStatistics.java | 153 +++++++++++++++++- .../hive/TestTablePartitioningInsertInto.java | 6 +- .../nation_region_1.textfile | 0 .../nation_region_2.textfile | 0 .../nation_region_3.textfile | 0 .../nation_region_america.textfile | 5 + .../nation_region_asia.textfile | 5 + .../nation_region_europe.textfile | 5 + 10 files changed, 204 insertions(+), 18 deletions(-) rename presto-product-tests/src/main/resources/com/facebook/presto/tests/hive/data/{partitioned_nation => partitioned_nation_bigint}/nation_region_1.textfile (100%) rename presto-product-tests/src/main/resources/com/facebook/presto/tests/hive/data/{partitioned_nation => partitioned_nation_bigint}/nation_region_2.textfile (100%) rename presto-product-tests/src/main/resources/com/facebook/presto/tests/hive/data/{partitioned_nation => partitioned_nation_bigint}/nation_region_3.textfile (100%) create mode 100644 presto-product-tests/src/main/resources/com/facebook/presto/tests/hive/data/partitioned_nation_varchar/nation_region_america.textfile create mode 100644 presto-product-tests/src/main/resources/com/facebook/presto/tests/hive/data/partitioned_nation_varchar/nation_region_asia.textfile create mode 100644 presto-product-tests/src/main/resources/com/facebook/presto/tests/hive/data/partitioned_nation_varchar/nation_region_europe.textfile diff --git a/presto-product-tests/src/main/java/com/facebook/presto/tests/hive/HiveTableDefinitions.java b/presto-product-tests/src/main/java/com/facebook/presto/tests/hive/HiveTableDefinitions.java index f4e0d0f27f68f..df1f073c471f3 100644 --- a/presto-product-tests/src/main/java/com/facebook/presto/tests/hive/HiveTableDefinitions.java +++ b/presto-product-tests/src/main/java/com/facebook/presto/tests/hive/HiveTableDefinitions.java @@ -16,6 +16,7 @@ import io.prestodb.tempto.fulfillment.table.hive.HiveTableDefinition; import static io.prestodb.tempto.fulfillment.table.hive.InlineDataSource.createResourceDataSource; +import static java.lang.String.format; public class HiveTableDefinitions { @@ -25,7 +26,7 @@ public class HiveTableDefinitions public static final int NATION_PARTITIONED_BY_REGIONKEY_NUMBER_OF_LINES_PER_SPLIT = 5; - public static final HiveTableDefinition NATION_PARTITIONED_BY_REGIONKEY = + public static final HiveTableDefinition NATION_PARTITIONED_BY_BIGINT_REGIONKEY = HiveTableDefinition.builder(NATION_PARTITIONED_BY_REGIONKEY_TABLE_NAME) .setCreateTableDDLTemplate( "CREATE %EXTERNAL% TABLE %NAME%(" + @@ -39,24 +40,53 @@ public class HiveTableDefinitions createResourceDataSource( NATION_PARTITIONED_BY_REGIONKEY_TABLE_NAME, DATA_REVISION, - partitionDataFileResource(1))) + partitionDataFileResource("bigint", "1"))) .addPartition( "p_regionkey=2", createResourceDataSource( NATION_PARTITIONED_BY_REGIONKEY_TABLE_NAME, DATA_REVISION, - partitionDataFileResource(2))) + partitionDataFileResource("bigint", "2"))) .addPartition( "p_regionkey=3", createResourceDataSource( NATION_PARTITIONED_BY_REGIONKEY_TABLE_NAME, DATA_REVISION, - partitionDataFileResource(3))) + partitionDataFileResource("bigint", "3"))) .build(); - private static String partitionDataFileResource(int region) + public static final HiveTableDefinition NATION_PARTITIONED_BY_VARCHAR_REGIONKEY = + HiveTableDefinition.builder(NATION_PARTITIONED_BY_REGIONKEY_TABLE_NAME) + .setCreateTableDDLTemplate( + "CREATE %EXTERNAL% TABLE %NAME%(" + + " p_nationkey BIGINT," + + " p_name VARCHAR(25)," + + " p_comment VARCHAR(152)) " + + "PARTITIONED BY (p_regionkey VARCHAR(20))" + + "ROW FORMAT DELIMITED FIELDS TERMINATED BY '|' ") + .addPartition( + "p_regionkey='AMERICA'", + createResourceDataSource( + NATION_PARTITIONED_BY_REGIONKEY_TABLE_NAME, + DATA_REVISION, + partitionDataFileResource("varchar", "america"))) + .addPartition( + "p_regionkey='ASIA'", + createResourceDataSource( + NATION_PARTITIONED_BY_REGIONKEY_TABLE_NAME, + DATA_REVISION, + partitionDataFileResource("varchar", "asia"))) + .addPartition( + "p_regionkey='EUROPE'", + createResourceDataSource( + NATION_PARTITIONED_BY_REGIONKEY_TABLE_NAME, + DATA_REVISION, + partitionDataFileResource("varchar", "europe"))) + .build(); + + private static String partitionDataFileResource(String key, String partition) { - return "com/facebook/presto/tests/hive/data/partitioned_nation/nation_region_" + region + ".textfile"; + return format("com/facebook/presto/tests/hive/data/partitioned_nation_%s/nation_region_%s.textfile", key, partition); } private HiveTableDefinitions() diff --git a/presto-product-tests/src/main/java/com/facebook/presto/tests/hive/TestExternalHiveTable.java b/presto-product-tests/src/main/java/com/facebook/presto/tests/hive/TestExternalHiveTable.java index 26cba57e8e826..af52aa87b68de 100644 --- a/presto-product-tests/src/main/java/com/facebook/presto/tests/hive/TestExternalHiveTable.java +++ b/presto-product-tests/src/main/java/com/facebook/presto/tests/hive/TestExternalHiveTable.java @@ -21,7 +21,7 @@ import org.testng.annotations.Test; import static com.facebook.presto.tests.TestGroups.HIVE_CONNECTOR; -import static com.facebook.presto.tests.hive.HiveTableDefinitions.NATION_PARTITIONED_BY_REGIONKEY; +import static com.facebook.presto.tests.hive.HiveTableDefinitions.NATION_PARTITIONED_BY_BIGINT_REGIONKEY; import static com.facebook.presto.tests.hive.HiveTableDefinitions.NATION_PARTITIONED_BY_REGIONKEY_NUMBER_OF_LINES_PER_SPLIT; import static com.facebook.presto.tests.utils.QueryExecutors.onHive; import static com.facebook.presto.tests.utils.QueryExecutors.onPresto; @@ -41,7 +41,7 @@ public Requirement getRequirements(Configuration configuration) { return compose( mutableTable(NATION), - mutableTable(NATION_PARTITIONED_BY_REGIONKEY)); + mutableTable(NATION_PARTITIONED_BY_BIGINT_REGIONKEY)); } @Test(groups = {HIVE_CONNECTOR}) @@ -68,7 +68,7 @@ public void testDeleteFromExternalTable() @Test(groups = {HIVE_CONNECTOR}) public void testDeleteFromExternalPartitionedTableTable() { - TableInstance nation = mutableTablesState().get(NATION_PARTITIONED_BY_REGIONKEY.getName()); + TableInstance nation = mutableTablesState().get(NATION_PARTITIONED_BY_BIGINT_REGIONKEY.getName()); onHive().executeQuery("DROP TABLE IF EXISTS " + EXTERNAL_TABLE_NAME); onHive().executeQuery("CREATE EXTERNAL TABLE " + EXTERNAL_TABLE_NAME + " LIKE " + nation.getNameInDatabase() + " LOCATION '/tmp/" + EXTERNAL_TABLE_NAME + "_" + nation.getNameInDatabase() + "'"); insertNationPartition(nation, 1); diff --git a/presto-product-tests/src/main/java/com/facebook/presto/tests/hive/TestHiveTableStatistics.java b/presto-product-tests/src/main/java/com/facebook/presto/tests/hive/TestHiveTableStatistics.java index 949f0dac17135..fb317eb26afdc 100644 --- a/presto-product-tests/src/main/java/com/facebook/presto/tests/hive/TestHiveTableStatistics.java +++ b/presto-product-tests/src/main/java/com/facebook/presto/tests/hive/TestHiveTableStatistics.java @@ -32,7 +32,8 @@ import static com.facebook.presto.tests.TestGroups.HIVE_CONNECTOR; import static com.facebook.presto.tests.TestGroups.SKIP_ON_CDH; import static com.facebook.presto.tests.hive.AllSimpleTypesTableDefinitions.ALL_HIVE_SIMPLE_TYPES_TEXTFILE; -import static com.facebook.presto.tests.hive.HiveTableDefinitions.NATION_PARTITIONED_BY_REGIONKEY; +import static com.facebook.presto.tests.hive.HiveTableDefinitions.NATION_PARTITIONED_BY_BIGINT_REGIONKEY; +import static com.facebook.presto.tests.hive.HiveTableDefinitions.NATION_PARTITIONED_BY_VARCHAR_REGIONKEY; import static io.prestodb.tempto.assertions.QueryAssert.Row.row; import static io.prestodb.tempto.assertions.QueryAssert.anyOf; import static io.prestodb.tempto.assertions.QueryAssert.assertThat; @@ -59,14 +60,27 @@ public Requirement getRequirements(Configuration configuration) } } - private static class PartitionedNationTable + private static class NationPartitionedByBigintTable implements RequirementsProvider { @Override public Requirement getRequirements(Configuration configuration) { return mutableTable( - HiveTableDefinition.from(NATION_PARTITIONED_BY_REGIONKEY) + HiveTableDefinition.from(NATION_PARTITIONED_BY_BIGINT_REGIONKEY) + .injectStats(false) + .build()); + } + } + + private static class NationPartitionedByVarcharTable + implements RequirementsProvider + { + @Override + public Requirement getRequirements(Configuration configuration) + { + return mutableTable( + HiveTableDefinition.from(NATION_PARTITIONED_BY_VARCHAR_REGIONKEY) .injectStats(false) .build()); } @@ -199,10 +213,10 @@ public void testStatisticsForUnpartitionedTable() } @Test(groups = {HIVE_CONNECTOR}) - @Requires(PartitionedNationTable.class) - public void testStatisticsForPartitionedTable() + @Requires(NationPartitionedByBigintTable.class) + public void testStatisticsForTablePartitionedByBigint() { - String tableNameInDatabase = mutableTablesState().get(NATION_PARTITIONED_BY_REGIONKEY.getName()).getNameInDatabase(); + String tableNameInDatabase = mutableTablesState().get(NATION_PARTITIONED_BY_BIGINT_REGIONKEY.getName()).getNameInDatabase(); String showStatsWholeTable = "SHOW STATS FOR " + tableNameInDatabase; String showStatsPartitionOne = "SHOW STATS FOR (SELECT * FROM " + tableNameInDatabase + " WHERE p_regionkey = 1)"; @@ -325,6 +339,133 @@ public void testStatisticsForPartitionedTable() row(null, null, null, null, 5.0, null, null)); } + @Test(groups = {HIVE_CONNECTOR}) + @Requires(NationPartitionedByVarcharTable.class) + public void testStatisticsForTablePartitionedByVarchar() + { + String tableNameInDatabase = mutableTablesState().get(NATION_PARTITIONED_BY_VARCHAR_REGIONKEY.getName()).getNameInDatabase(); + + String showStatsWholeTable = "SHOW STATS FOR " + tableNameInDatabase; + String showStatsPartitionOne = "SHOW STATS FOR (SELECT * FROM " + tableNameInDatabase + " WHERE p_regionkey = 'AMERICA')"; + String showStatsPartitionTwo = "SHOW STATS FOR (SELECT * FROM " + tableNameInDatabase + " WHERE p_regionkey = 'ASIA')"; + + // table not analyzed + + assertThat(query(showStatsWholeTable)).containsOnly( + row("p_nationkey", null, null, null, null, null, null), + row("p_name", null, null, null, null, null, null), + row("p_regionkey", null, 3.0, null, null, null, null), + row("p_comment", null, null, null, null, null, null), + row(null, null, null, null, null, null, null)); + + assertThat(query(showStatsPartitionOne)).containsOnly( + row("p_nationkey", null, null, null, null, null, null), + row("p_name", null, null, null, null, null, null), + row("p_regionkey", null, 1.0, null, null, null, null), + row("p_comment", null, null, null, null, null, null), + row(null, null, null, null, null, null, null)); + + // basic analysis for single partition + + onHive().executeQuery("ANALYZE TABLE " + tableNameInDatabase + " PARTITION (p_regionkey = \"AMERICA\") COMPUTE STATISTICS"); + + assertThat(query(showStatsWholeTable)).containsOnly( + row("p_nationkey", null, null, null, null, null, null), + row("p_name", null, null, null, null, null, null), + row("p_regionkey", 85.0, 3.0, 0.0, null, null, null), + row("p_comment", null, null, null, null, null, null), + row(null, null, null, null, 15.0, null, null)); + + assertThat(query(showStatsPartitionOne)).containsOnly( + row("p_nationkey", null, null, null, null, null, null), + row("p_name", null, null, null, null, null, null), + row("p_regionkey", 35.0, 1.0, 0.0, null, null, null), + row("p_comment", null, null, null, null, null, null), + row(null, null, null, null, 5.0, null, null)); + + assertThat(query(showStatsPartitionTwo)).containsOnly( + row("p_nationkey", null, null, null, null, null, null), + row("p_name", null, null, null, null, null, null), + row("p_regionkey", null, 1.0, null, null, null, null), + row("p_comment", null, null, null, null, null, null), + row(null, null, null, null, null, null, null)); + + // basic analysis for all partitions + + onHive().executeQuery("ANALYZE TABLE " + tableNameInDatabase + " PARTITION (p_regionkey) COMPUTE STATISTICS"); + + assertThat(query(showStatsWholeTable)).containsOnly( + row("p_nationkey", null, null, null, null, null, null), + row("p_name", null, null, null, null, null, null), + row("p_regionkey", 85.0, 3.0, 0.0, null, null, null), + row("p_comment", null, null, null, null, null, null), + row(null, null, null, null, 15.0, null, null)); + + assertThat(query(showStatsPartitionOne)).containsOnly( + row("p_nationkey", null, null, null, null, null, null), + row("p_name", null, null, null, null, null, null), + row("p_regionkey", 35.0, 1.0, 0.0, null, null, null), + row("p_comment", null, null, null, null, null, null), + row(null, null, null, null, 5.0, null, null)); + + assertThat(query(showStatsPartitionTwo)).containsOnly( + row("p_nationkey", null, null, null, null, null, null), + row("p_name", null, null, null, null, null, null), + row("p_regionkey", 20.0, 1.0, 0.0, null, null, null), + row("p_comment", null, null, null, null, null, null), + row(null, null, null, null, 5.0, null, null)); + + // column analysis for single partition + + onHive().executeQuery("ANALYZE TABLE " + tableNameInDatabase + " PARTITION (p_regionkey = \"AMERICA\") COMPUTE STATISTICS FOR COLUMNS"); + + assertThat(query(showStatsWholeTable)).containsOnly( + row("p_nationkey", null, 5.0, 0.0, null, "1", "24"), + row("p_name", 114.0, 6.0, 0.0, null, null, null), + row("p_regionkey", 85.0, 3.0, 0.0, null, null, null), + row("p_comment", 1497.0, 7.0, 0.0, null, null, null), + row(null, null, null, null, 15.0, null, null)); + + assertThat(query(showStatsPartitionOne)).containsOnly( + row("p_nationkey", null, 5.0, 0.0, null, "1", "24"), + row("p_name", 38.0, 6.0, 0.0, null, null, null), + row("p_regionkey", 35.0, 1.0, 0.0, null, null, null), + row("p_comment", 499.0, 7.0, 0.0, null, null, null), + row(null, null, null, null, 5.0, null, null)); + + assertThat(query(showStatsPartitionTwo)).containsOnly( + row("p_nationkey", null, null, null, null, null, null), + row("p_name", null, null, null, null, null, null), + row("p_regionkey", 20.0, 1.0, 0.0, null, null, null), + row("p_comment", null, null, null, null, null, null), + row(null, null, null, null, 5.0, null, null)); + + // column analysis for all partitions + + onHive().executeQuery("ANALYZE TABLE " + tableNameInDatabase + " PARTITION (p_regionkey) COMPUTE STATISTICS FOR COLUMNS"); + + assertThat(query(showStatsWholeTable)).containsOnly( + row("p_nationkey", null, 5.0, 0.0, null, "1", "24"), + row("p_name", 109.0, 6.0, 0.0, null, null, null), + row("p_regionkey", 85.0, 3.0, 0.0, null, null, null), + row("p_comment", 1197.0, 7.0, 0.0, null, null, null), + row(null, null, null, null, 15.0, null, null)); + + assertThat(query(showStatsPartitionOne)).containsOnly( + row("p_nationkey", null, 5.0, 0.0, null, "1", "24"), + row("p_name", 38.0, 6.0, 0.0, null, null, null), + row("p_regionkey", 35.0, 1.0, 0.0, null, null, null), + row("p_comment", 499.0, 7.0, 0.0, null, null, null), + row(null, null, null, null, 5.0, null, null)); + + assertThat(query(showStatsPartitionTwo)).containsOnly( + row("p_nationkey", null, 4.0, 0.0, null, "8", "21"), + row("p_name", 31.0, 6.0, 0.0, null, null, null), + row("p_regionkey", 20.0, 1.0, 0.0, null, null, null), + row("p_comment", 351.0, 5.0, 0.0, null, null, null), + row(null, null, null, null, 5.0, null, null)); + } + // This covers also stats calculation for unpartitioned table @Test(groups = {HIVE_CONNECTOR, SKIP_ON_CDH}) // skip on cdh due to no support for date column and stats @Requires(AllTypesTable.class) diff --git a/presto-product-tests/src/main/java/com/facebook/presto/tests/hive/TestTablePartitioningInsertInto.java b/presto-product-tests/src/main/java/com/facebook/presto/tests/hive/TestTablePartitioningInsertInto.java index da463cf6ac709..2c4513d8b1d3b 100644 --- a/presto-product-tests/src/main/java/com/facebook/presto/tests/hive/TestTablePartitioningInsertInto.java +++ b/presto-product-tests/src/main/java/com/facebook/presto/tests/hive/TestTablePartitioningInsertInto.java @@ -21,7 +21,7 @@ import static com.facebook.presto.tests.TestGroups.HIVE_CONNECTOR; import static com.facebook.presto.tests.TestGroups.SMOKE; -import static com.facebook.presto.tests.hive.HiveTableDefinitions.NATION_PARTITIONED_BY_REGIONKEY; +import static com.facebook.presto.tests.hive.HiveTableDefinitions.NATION_PARTITIONED_BY_BIGINT_REGIONKEY; import static com.facebook.presto.tests.hive.HiveTableDefinitions.NATION_PARTITIONED_BY_REGIONKEY_NUMBER_OF_LINES_PER_SPLIT; import static io.prestodb.tempto.Requirements.compose; import static io.prestodb.tempto.fulfillment.table.MutableTableRequirement.State.CREATED; @@ -41,7 +41,7 @@ public class TestTablePartitioningInsertInto public Requirement getRequirements(Configuration configuration) { return compose( - mutableTable(NATION_PARTITIONED_BY_REGIONKEY), + mutableTable(NATION_PARTITIONED_BY_BIGINT_REGIONKEY), mutableTable(NATION, TARGET_NATION_NAME, CREATED)); } @@ -70,7 +70,7 @@ public void selectFromPartitionedNation() private void testQuerySplitsNumber(String condition, int expectedProcessedSplits) throws Exception { - String partitionedNation = mutableTablesState().get(NATION_PARTITIONED_BY_REGIONKEY.getTableHandle()).getNameInDatabase(); + String partitionedNation = mutableTablesState().get(NATION_PARTITIONED_BY_BIGINT_REGIONKEY.getTableHandle()).getNameInDatabase(); String targetNation = mutableTablesState().get(TARGET_NATION_NAME).getNameInDatabase(); String query = String.format( "INSERT INTO %s SELECT p_nationkey, p_name, p_regionkey, p_comment FROM %s WHERE %s", diff --git a/presto-product-tests/src/main/resources/com/facebook/presto/tests/hive/data/partitioned_nation/nation_region_1.textfile b/presto-product-tests/src/main/resources/com/facebook/presto/tests/hive/data/partitioned_nation_bigint/nation_region_1.textfile similarity index 100% rename from presto-product-tests/src/main/resources/com/facebook/presto/tests/hive/data/partitioned_nation/nation_region_1.textfile rename to presto-product-tests/src/main/resources/com/facebook/presto/tests/hive/data/partitioned_nation_bigint/nation_region_1.textfile diff --git a/presto-product-tests/src/main/resources/com/facebook/presto/tests/hive/data/partitioned_nation/nation_region_2.textfile b/presto-product-tests/src/main/resources/com/facebook/presto/tests/hive/data/partitioned_nation_bigint/nation_region_2.textfile similarity index 100% rename from presto-product-tests/src/main/resources/com/facebook/presto/tests/hive/data/partitioned_nation/nation_region_2.textfile rename to presto-product-tests/src/main/resources/com/facebook/presto/tests/hive/data/partitioned_nation_bigint/nation_region_2.textfile diff --git a/presto-product-tests/src/main/resources/com/facebook/presto/tests/hive/data/partitioned_nation/nation_region_3.textfile b/presto-product-tests/src/main/resources/com/facebook/presto/tests/hive/data/partitioned_nation_bigint/nation_region_3.textfile similarity index 100% rename from presto-product-tests/src/main/resources/com/facebook/presto/tests/hive/data/partitioned_nation/nation_region_3.textfile rename to presto-product-tests/src/main/resources/com/facebook/presto/tests/hive/data/partitioned_nation_bigint/nation_region_3.textfile diff --git a/presto-product-tests/src/main/resources/com/facebook/presto/tests/hive/data/partitioned_nation_varchar/nation_region_america.textfile b/presto-product-tests/src/main/resources/com/facebook/presto/tests/hive/data/partitioned_nation_varchar/nation_region_america.textfile new file mode 100644 index 0000000000000..7fd3d7b5ae4b5 --- /dev/null +++ b/presto-product-tests/src/main/resources/com/facebook/presto/tests/hive/data/partitioned_nation_varchar/nation_region_america.textfile @@ -0,0 +1,5 @@ +1|ARGENTINA|al foxes promise slyly according to the regular accounts. bold requests alon +2|BRAZIL|y alongside of the pending deposits. carefully special packages are about the ironic forges. slyly special +3|CANADA|eas hang ironic, silent packages. slyly regular packages are furiously over the tithes. fluffily bold +17|PERU|platelets. blithely pending dependencies use fluffily across the even pinto beans. carefully silent accoun +24|UNITED STATES|y final packages. slow foxes cajole quickly. quickly silent platelets breach ironic accounts. unusual pinto be diff --git a/presto-product-tests/src/main/resources/com/facebook/presto/tests/hive/data/partitioned_nation_varchar/nation_region_asia.textfile b/presto-product-tests/src/main/resources/com/facebook/presto/tests/hive/data/partitioned_nation_varchar/nation_region_asia.textfile new file mode 100644 index 0000000000000..fdaf6c062c7cd --- /dev/null +++ b/presto-product-tests/src/main/resources/com/facebook/presto/tests/hive/data/partitioned_nation_varchar/nation_region_asia.textfile @@ -0,0 +1,5 @@ +8|INDIA|ss excuses cajole slyly across the packages. deposits print aroun +9|INDONESIA| slyly express asymptotes. regular deposits haggle slyly. carefully ironic hockey players sleep blithely. carefull +12|JAPAN|ously. final, express gifts cajole a +18|CHINA|c dependencies. furiously express notornis sleep slyly regular accounts. ideas sleep. depos +21|VIETNAM|hely enticingly express accounts. even, final diff --git a/presto-product-tests/src/main/resources/com/facebook/presto/tests/hive/data/partitioned_nation_varchar/nation_region_europe.textfile b/presto-product-tests/src/main/resources/com/facebook/presto/tests/hive/data/partitioned_nation_varchar/nation_region_europe.textfile new file mode 100644 index 0000000000000..7c8e05e996ccd --- /dev/null +++ b/presto-product-tests/src/main/resources/com/facebook/presto/tests/hive/data/partitioned_nation_varchar/nation_region_europe.textfile @@ -0,0 +1,5 @@ +6|FRANCE|refully final requests. regular, ironi +7|GERMANY|l platelets. regular accounts x-ray: unusual, regular acco +19|ROMANIA|ular asymptotes are about the furious multipliers. express dependencies nag above the ironically ironic account +22|RUSSIA| requests against the platelets use never according to the quickly regular pint +23|UNITED KINGDOM|eans boost carefully special requests. accounts are. carefull