question: private static void sparseFullRepresentationTest ( final ISchemaVersion schemaVersion ) throws IOException { final Writer output = openOutput ( schemaVersion , "sparse_full_representation" , TestType . UNION ) ; final HLL emptyHLL1 = newHLL ( HLLType . EMPTY ) ; final HLL emptyHLL2 = newHLL ( HLLType . EMPTY ) ; cumulativeUnionLine ( output , emptyHLL1 , emptyHLL2 , schemaVersion ) ; final HLL fullHLL = newHLL ( HLLType . FULL ) ; fullHLL . addRaw ( constructHLLValue ( LOG2M , 0 , 1 ) ) ; final HLL sparseHLL = newHLL ( HLLType . SPARSE ) ; sparseHLL . addRaw ( constructHLLValue ( LOG2M , 0 , 1 ) ) ; output . write ( stringCardinality ( fullHLL ) + "," + toByteA ( fullHLL , schemaVersion ) + "," + stringCardinality ( sparseHLL ) + "," + toByteA ( sparseHLL , schemaVersion ) + "\n" ) ; output . flush ( ) ; final HLL fullHLL2 = newHLL ( HLLType . FULL ) ; fullHLL2 . addRaw ( constructHLLValue ( LOG2M , 1 , 1 ) ) ; sparseHLL . addRaw ( constructHLLValue ( LOG2M , 1 , 1 ) ) ; output . write ( stringCardinality ( fullHLL2 ) + "," + toByteA ( fullHLL2 , schemaVersion ) + "," + stringCardinality ( sparseHLL ) + "," + toByteA ( sparseHLL , schemaVersion ) + "\n" ) ; output . flush ( ) ; final HLL fullHLL3 = newHLL ( HLLType . FULL ) ; for ( int i = 2 ; i < ( SPARSE_THRESHOLD + 1 ) ; i ++ ) { fullHLL3 . addRaw ( constructHLLValue ( LOG2M , i , 1 ) ) ; sparseHLL . addRaw ( constructHLLValue ( LOG2M , i , 1 ) ) ; } output . write ( stringCardinality ( fullHLL3 ) + "," + toByteA ( fullHLL3 , schemaVersion ) + "," + stringCardinality ( sparseHLL ) + "," + toByteA ( sparseHLL , schemaVersion ) + "\n" ) ; output . flush ( ) ; }
target:  Cumulatively unions "underpopulated" FULL HLLs into the accumulator to verify the correct behavior from the PostgreSQL implementation. The PostgreSQL implementation's representations of probabilistic HLLs should depend exclusively on the chosen SPARSE-to-FULL cutoff. Format: cumulative union Tests: - EMPTY U "underpopulated" FULL => SPARSE - SPARSE U "underpopulated" FULL => SPARSE - SPARSE U "barely underpopulated" FULL => FULL