NLinker icon

spark

NLinker | PRO | 11/24/17 07:21:23 AM UTC | 0 ⭐ | 6796 👁️ | Never ⏰ | []
Scala |

1.66 KB

|

None

|

0 👍

/

0 👎

      import spark.implicits._
      implicit val enc: Encoder[(Long, UUID)] = tupleEncoder
      val ds1: Dataset[(Long,UUID)] = Seq(
        (313091L, UUID.fromString("05e5570c-b562-3d68-9a94-02f5cf2b42e1")),
        (313101L, UUID.fromString("0573bcd3-19f3-3db0-96ca-ded30ee4509b")),
        (313109L, UUID.fromString("058ec146-f86a-3169-81b2-1cadc6ad186f")),
        (278164271L, UUID.fromString("05ffd55c-fd93-3748-b5e5-57194e6891b0")),
        (1277353955L, UUID.fromString("05c434b9-ece8-36d6-8787-1befdfd17a8c")),
        (3908350L, UUID.fromString("05c8bf96-e65c-3ea4-8426-b06a51f6eb0f"))
      ).toDS
      val ds2: Dataset[(Long,UUID)] = Seq(
        (1287552888L, UUID.fromString("050d5118-53dc-3454-bcdf-c2eba4d01dea")),
        (1282608172L, UUID.fromString("052d1f68-ed43-3e58-bc78-5ffb43972816")),
        (315473472L, UUID.fromString("0541f606-73e9-30ed-a229-d06e3f3e0921")),
        (315971472L, UUID.fromString("0513eefd-dc24-34b5-9ece-89bdfdf985ef")),
        (288325066L, UUID.fromString("052b7bf9-c2f5-3e4f-b0f3-97ca0aeadaa5")),
        (314833704L, UUID.fromString("05ee3184-a3b8-35c3-bc50-a0a9e790e457"))
      ).toDS
      val ds3: Dataset[(Long,UUID)] = Seq(
        (1040033272L, UUID.fromString("05e469c3-ef68-310a-8514-7416e36467f1")),
        (1113173592L, UUID.fromString("055dd247-992f-3827-912e-091f1c67ca2d")),
        (1256460648L, UUID.fromString("05666146-0258-33e8-85f3-44cea3653ec3")),
        (440302520L, UUID.fromString("05cc7f7f-64ac-3ebd-9fc1-74daa5bfea6b")),
        (1281088273L, UUID.fromString("053bb72b-3ce7-329c-bebb-531306201e8e")),
        (1281088274L, UUID.fromString("051e5667-3a00-39a6-9ff1-ec816cef13b7"))
      ).toDS

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎