private static OptionalLong fromMetastoreDistinctValuesCount ( OptionalLong distinctValuesCount , OptionalLong nullsCount , OptionalLong rowCount ) { if ( distinctValuesCount . isPresent ( ) && nullsCount . isPresent ( ) && rowCount . isPresent ( ) ) { return OptionalLong . of ( fromMetastoreDistinctValuesCount ( distinctValuesCount . getAsLong ( ) , nullsCount . getAsLong ( ) , rowCount . getAsLong ( ) ) ) ; } return OptionalLong . empty ( ) ; }
Hive calculates NDV considering null as a distinct value