in core/src/main/scala/org/apache/spark/sql/eventhubs/EventHubsSourceOffset.scala [38:46]
def getPartitionSeqNos(offset: Offset): Map[NameAndPartition, SequenceNumber] = {
offset match {
case o: EventHubsSourceOffset => o.partitionToSeqNos
case so: SerializedOffset => EventHubsSourceOffset(so).partitionToSeqNos
case _ =>
throw new IllegalArgumentException(
s"Invalid conversion from offset of ${offset.getClass} to EventHubsSourceOffset")
}
}