ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pavel Tupitsyn <ptupit...@gridgain.com>
Subject Re: Ignite SQL syntax: key fields, scalars, nested fields
Date Mon, 25 Jan 2016 16:16:57 GMT
Thank you Sergi, more questions:

- How do I get the result of an aggregate? Via Fields query? Will it always
be a single value, or a value per node?
- If field names are flattened, what are QueryEntity.aliases for? Javadoc
talks about dot notation, I thought it is for nested fields.
- What is the purpose of SqlQuery.type? We use simple name of the class for
it everywhere. Does it relate to type id mapping somehow?
- I tried to use _key/_val aliases and could not get them to work:
   * "_val.Age > ?": Failed to parse query: SELECT
"cache".QueryPerson._key, "cache".QueryPerson._val FROM "cache".QueryPerson
WHERE _val.Age > ?
   * "_key > ?": Caused by: org.h2.jdbc.JdbcSQLException: Deserialization
failed, cause: "class org.apache.ignite.binary.BinaryObjectException: Not
enough data to read the value [position=1, requiredBytes=4,
remainingBytes=0]"; SQL statement: SELECT "cache".QUERYPERSON._KEY __C0,
"cache".QUERYPERSON._VAL __C1 FROM "cache".QUERYPERSON WHERE _KEY > ?1
[90027-175]



On Mon, Jan 25, 2016 at 6:38 PM, Sergi Vladykin <sergi.vladykin@gmail.com>
wrote:

> - Yes, in SQL it is possible to query cache key and value using aliases
> _key and _val respectively.
> - Aggregate functions like SUM, AVG, MIN, MAX are supported.
> - Nested fields are supported and they are flattened, so name collisions
> are prohibited.
>
> Sergi
>
> 2016-01-25 15:26 GMT+03:00 Pavel Tupitsyn <ptupitsyn@gridgain.com>:
>
> > Igniters,
> >
> > In relation to .NET LINQ task [1], I'd like to know as much as possible
> > about Ignite-specific SQL syntax. Our docs [2] do not cover everything.
> >
> > * Is it possible to query cache keys? E.g. "key > 10", or "key.field =
> 1"?
> > * Is it possible to query scalars, like "sum()"?
> > * What about nested fields? From examples, I see that nested fields get
> > flattened, so instead of Address.Zip you can just use Zip. Are there any
> > limitations? What if there is field name collision?
> >
> > Where should I look to understand this better?
> >
> > Thanks.
> >
> > [1] https://issues.apache.org/jira/browse/IGNITE-1630
> > [2] https://apacheignite.readme.io/docs/sql-queries
> >
> > --
> > --
> > Pavel Tupitsyn
> > GridGain Systems, Inc.
> > www.gridgain.com
> >
>



-- 
-- 
Pavel Tupitsyn
GridGain Systems, Inc.
www.gridgain.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message