MCPcopy Create free account
hub / github.com/questdb/questdb / compare

Method compare

core/src/main/java/io/questdb/std/Decimal256.java:289–303  ·  view source on GitHub ↗

Compares 2 Decimal256, ignoring scaling.

(long aHH, long aHL, long aLH, long aLL, long bHH, long bHL, long bLH, long bLL)

Source from the content-addressed store, hash-verified

287 * Compares 2 Decimal256, ignoring scaling.
288 */
289 public static int compare(long aHH, long aHL, long aLH, long aLL, long bHH, long bHL, long bLH, long bLL) {
290 int s = Long.compare(aHH, bHH);
291 if (s != 0) {
292 return s;
293 }
294 s = Long.compareUnsigned(aHL, bHL);
295 if (s != 0) {
296 return s;
297 }
298 s = Long.compareUnsigned(aLH, bLH);
299 if (s != 0) {
300 return s;
301 }
302 return Long.compareUnsigned(aLL, bLL);
303 }
304
305 public static int compare(Decimal256 a, Decimal256 b) {
306 int s = Long.compare(a.getHh(), b.getHh());

Callers 8

shouldStoreAMethod · 0.95
overflowsLongMethod · 0.95
overflowsShortMethod · 0.95
overflowsByteMethod · 0.95
overflowsIntMethod · 0.95
getDecimal256Method · 0.95
compareToMethod · 0.95
compareTo0Method · 0.95

Calls 6

compareUnsignedMethod · 0.80
getHhMethod · 0.80
getHlMethod · 0.80
getLhMethod · 0.80
getLlMethod · 0.80
compareMethod · 0.65

Tested by

no test coverage detected