vlsi commented on a change in pull request #2154:
URL: https://github.com/apache/calcite/pull/2154#discussion_r504472921
##########
File path: core/src/test/java/org/apache/calcite/test/RelMetadataTest.java
##########
@@ -3102,6 +3108,69 @@ private void checkNodeTypeCount(String sql, Map<Class<?
extends RelNode>, Intege
is("=($0, $1)"));
}
+ @Test void testColumnStatistics() {
+ final FrameworkConfig config = RelBuilderTest.config().build();
+ final RelBuilder builder = RelBuilder.create(config);
+ final RelOptCluster cluster = builder.getCluster();
+ final RelDataTypeFactory typeFactory = cluster.getTypeFactory();
+
+ final RelDataType stringType = typeFactory.createJavaType(String.class);
+ final RelDataType integerType = typeFactory.createJavaType(Integer.class);
+
+ final Map<String, ColStatistics> colStatistics = new HashMap<>();
+ final String col1 = "key";
+ final String col2 = "count";
+
+ final ColStatistics colStats = new ColStatistics() {
+ @Override public Long getCountDistinct() {
+ return 5L;
+ }
+
+ @Override public Double getAvgColLen() {
+ return 2D;
+ }
+
+ @Override public Long getNumNulls() {
+ return null;
+ }
+
+ @Override public <C> C unwrap(Class<C> aClass) {
+ return null;
Review comment:
I believe `unwrap` should have a default implementation.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]