I saved some Spark dataset in IgniteRDD with key and Value both as BinaryObject and it works fine also I am able to query in back using Ignite code with %ignite interpreter sample below.
%ignite
import org.apache.ignite._
import org.apache.ignite.binary._
import org.apache.ignite.cache.query._
import org.apache.ignite.configuration._
import scala.collection.JavaConversions._
val cache: IgniteCache[BinaryObject, BinaryObject] = ignite.cache("test123")
val qry = new SqlFieldsQuery(
"select _val from testValue",
true)
val res = cache.withKeepBinary().query(qry).getAll()
collectionAsScalaIterable(res).foreach(println _)
But when I try to query same with %ignite.ignitesql interpreter
%ignite.ignitesql
select * from testValue
it fails with "Failed resolve class for ID: -1422444403"
To me it seems difference in both way is that in First I specified withKeepBinary() , how similar can be done in %ignite.ignitesql so that can use sql directly
This is not possible now, I created a ticket to fix this: https://issues.apache.org/jira/browse/IGNITE-4141
But in any case, I would recommend to avoid select *
queries when working with Ignite, because the result set will include predefined _key
and _val
fields that represent full object. It's better to explicitly list the fields that you need in the result set so that you do not fetch the data you don't need.