if (ssup->comparator == ssup_datum_signed_cmp)
{
- norm_datum1 = orig + ((uint64) PG_INT64_MAX) + 1;
+ norm_datum1 = orig + (Int64GetDatum(PG_INT64_MAX)) + 1;
}
else if (ssup->comparator == ssup_datum_int32_cmp)
{
* Radix sort by (pass-by-value) datum1, diverting to qsort_tuple()
* for tiebreaks.
*
- * This is a modification of
- * ska_byte_sort() from https://github.com/skarupke/ska_sort
+ * This is a modification of ska_byte_sort() from
+ * https://github.com/skarupke/ska_sort
* The original copyright notice follows:
*
* Copyright Malte Skarupke 2016.
else
next_level = level + 1;
+ Assert(next_level > level);
+
for (uint8 *rp = remaining_partitions;
rp < remaining_partitions + num_partitions;
rp++)
/*
* Find the first NOT NULL if NULLS FIRST, or first NULL if NULLS LAST.
* This also serves as a quick check for the common case where all tuples
- * are NOT NULL in the first sort key.
+ * are NOT NULL in the first sort key with the default order ASC NULLS
+ * LAST.
*/
while (d1 < n && data[d1].isnull1 == nulls_first)
{