All Downloads are FREE. Search and download functionalities are using the official Maven repository.

tech.ytsaurus.spyt.wrapper.table.OptimizeMode.scala Maven / Gradle / Ivy

The newest version!
package tech.ytsaurus.spyt.wrapper.table

import tech.ytsaurus.ysontree.{YTreeBuilder, YTreeNode}

sealed abstract class OptimizeMode(val name: String) extends Serializable {
  def node: YTreeNode = new YTreeBuilder().value(name).build()
}

object OptimizeMode {
  case object Scan extends OptimizeMode("scan")
  case object Lookup extends OptimizeMode("lookup")

  def fromName(name: String): OptimizeMode = {
    Seq(Scan, Lookup).find(_.name == name).getOrElse(throw new IllegalArgumentException)
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy