Github user zsxwing commented on a diff in the pull request:

    https://github.com/apache/spark/pull/13335#discussion_r65411387
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/Offset.scala 
---
    @@ -17,11 +17,14 @@
     
     package org.apache.spark.sql.execution.streaming
     
    +import com.fasterxml.jackson.annotation.JsonTypeInfo
    +
     /**
      * An offset is a monotonically increasing metric used to track progress 
in the computation of a
      * stream. An [[Offset]] must be comparable, and the result of `compareTo` 
must be consistent
      * with `equals` and `hashcode`.
      */
    +@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = 
JsonTypeInfo.As.PROPERTY, property = "@class")
    --- End diff --
    
    > What does this mean? What JSON does this produce?
    
    This is for polymorphic serialization. It will write the class name to the 
field `@class` (set by property = "@class"). When deserializing an object, it 
needs the class name to know the concrete class since the reflection APIs will 
only provide the interface name.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to