Closed AkhilGNair closed 7 years ago
hey Akhil. I'm not sure what it really means to define a case class inside a function, but I suspect that's your problem. Try this code block:
object thing {
implicit val cluster = Cluster.builder.addContactPoint("localhost").build()
implicit val session = cluster.connect()
val sSession = ScalaSession("spark")(session) // if mykeyspace already exists
case class MyTable(s: String, i: Int, l: Option[Long])
case class Query(s: String, i: Int)
def test( a:Any* ) : Iterator[Row] = sSession.select("mytable", Query("asdf", 123), false, Option(1L))
}
and let me know how it goes!
oh and just so you know, you've sort of stumbled on a generic error regarding implicits that could mean a myriad of things...and the compiler won't tell you anything more specific than that. It's not the friendliest error to run into, and you're definitely not the only one to have run into it. But hopefully doing the above will resolve your problem
Ahh it worked! Thank you! I think the main error was that I was using the wrong version of your code - the latest on bintray was 2.0.0, but I was following the readme for 0.6.14.
Awesome, I'm sure this will be super useful to me :)
oh yeah, that would do it. Sorry, that 2.0.0-M1 is not production ready, which is why I hadn't referenced it in the readme
Hi,
I'm trying to run a select statement from the
README
and I'm hitting an error. I'm very new to scala, so I'm not certain what it means - is this something easily recifiable?The whole error contains some other fluff as I'm compiling this as an R extension, but the root is this compile time error
This is pretty much all the code I have which hits the compile error.
This package looks great btw, I hope I'll be able to use it!
Thanks very much, Akhil