Audit notes for expressions in this category that have been audited. Absence of an entry means the expression has not been audited yet, not that it is unsupported. See the user guide Spark Expression Support for current support status.
ReplaceCurrentLike).ReplaceCurrentLike).current_database; resolved to a literal by the analyzer.user.MonotonicallyIncreasingID() extends LeafExpression with Stateful; produces a Long that encodes the partition id in the upper 31 bits and a per-partition row counter in the lower 33 bits. Comet emits an empty MonotonicallyIncreasingId proto and the native side produces the same encoding.Rand(child, hideSeed) extends RDG (an UnaryExpression with ExpectsInputTypes with Nondeterministic with ExpressionWithRandomSeed); child is the seed expression, coerced to IntegerType or LongType via ImplicitCastInputTypes. Uses XORShiftRandom(seed + partitionIndex) per partition and returns nextDouble() in [0, 1). NULL seed evaluates to 0L (via null.asInstanceOf[Long]).RDG is refactored from an abstract class into a trait, and Rand now extends a new NondeterministicUnaryRDG base. ExpressionWithRandomSeed.expressionToSeed is hoisted as a shared helper and throws QueryCompilationErrors.invalidRandomSeedParameter for non-literal seeds at analysis time. Runtime semantics unchanged.getSupportLevel). Pre-4.0 Spark would otherwise silently fail at runtime; 4.0+ rejects at analysis time before the expression reaches Comet.Rand; differs only in the eval body (nextGaussian() instead of nextDouble()), producing values from the standard normal distribution.Rand; runtime unchanged.rand — the seed argument must be a literal.RandStr was added in Spark 4.0, so randstr does not exist before then.RandStr(length, seedExpression, hideSeed) extends ExpressionWithRandomSeed with BinaryLike with Nondeterministic. Both length (coerced to IntegerType) and seed (IntegerType or LongType) must be foldable; a non-foldable argument is rejected at analysis. Per partition it seeds new XORShiftRandom(seed + partitionIndex); per row it calls ExpressionImplUtils.randStr, which fills length bytes with abs(rng.nextInt() % 62) mapped onto 0-9/a-z/A-Z. A negative length raises INVALID_PARAMETER_VALUE.LENGTH at runtime. Comet emits a RandStr proto with the resolved length and seed and reproduces the XORShiftRandom and character mapping bit for bit; non-negative literal length and literal seed only (otherwise it falls back to Spark, which also raises the negative-length error).ExpressionImplUtils.randStr and the XORShiftRandom(seed + partitionIndex) seeding are byte-identical to 4.0.1; adds withShiftedSeed, no runtime change.current_user; resolved to a literal by the analyzer.SparkPartitionID() extends LeafExpression with Nondeterministic; returns the integer index of the partition being processed. Comet emits an empty SparkPartitionId proto.CurrentUser() extends LeafExpression with Unevaluable; the analyzer's ResolveCurrentLike rule replaces it with a StringType literal of the current user name before Comet sees the plan. No Comet serde needed; the literal flows through CometLiteral.Uuid(randomSeed: Option[Long]) extends LeafExpression with Nondeterministic with ExpressionWithRandomSeed. The analyzer's ResolveRandomSeed fills randomSeed with a random Long, so it is always defined before Comet sees the plan. Per partition it seeds RandomUUIDGenerator(randomSeed + partitionIndex), a Commons Math3 MersenneTwister, and per row draws two nextLong()s, masks in the RFC 4122 version 4 and variant bits, and formats via java.util.UUID.toString. Only the no-argument uuid() form exists (no seed constructor). Comet emits a Uuid proto with the resolved seed and reproduces the generator bit for bit via SparkMersenneTwister.def this(seed: Expression), exposing the uuid(seed) SQL form (the seed must be an integer or long literal, validated at analysis time). RandomUUIDGenerator and the per-row algorithm are unchanged, so results are identical to 3.4.3 for a given seed.withShiftedSeed. No runtime change.