Jin>In ReflectiveSchema, Statistics of FieldTable is given as UNKNOWN[1][2].
Please check [CALCITE-3661] Derive rowCount statistics for tables in ReflectiveSchema that are based on arrays/collections and [CALCITE-3680] Add ability to express unique constraints in ReflectiveSchema commits in https://github.com/apache/calcite/pull/1702/commits The commits enable the optimizer to see the proper row count for tables in ReflectiveSchema. Vladimir