neilramaswamy commented on code in PR #48853:
URL: https://github.com/apache/spark/pull/48853#discussion_r1854806461
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/StateTypesEncoderUtils.scala:
##########
@@ -239,37 +240,15 @@ class CompositeKeyStateEncoder[K, V](
}
/** Class for TTL with single key serialization */
-class SingleKeyTTLEncoder(
- keyExprEnc: ExpressionEncoder[Any]) {
-
- private val ttlKeyProjection = UnsafeProjection.create(
- getSingleKeyTTLRowSchema(keyExprEnc.schema))
-
- def encodeTTLRow(expirationMs: Long, groupingKey: UnsafeRow): UnsafeRow = {
- ttlKeyProjection.apply(
- InternalRow(expirationMs, groupingKey.asInstanceOf[InternalRow]))
- }
-}
-
-/** Class for TTL with composite key serialization */
-class CompositeKeyTTLEncoder[K](
- keyExprEnc: ExpressionEncoder[Any],
- userKeyEnc: ExpressionEncoder[Any]) {
+class TTLEncoder(schema: StructType) {
Review Comment:
I actually think it's fine to keep here; we have all the other encoders in
this file.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]