Hi Shravya,
This is because of Ignite API allows to run query with having some cache instance. We are going to deprecate with API and implement SQL API on higher level to avoid dummy cache creation, but anyway old API can't be dropped until next major (3.0) version due to compatibility requirements. On Mon, Jan 15, 2018 at 5:12 PM, Shravya Nethula < [email protected]> wrote: > Hi guys, > > I am new to the world of Ignite. I am currently going through the examples > folder. > The following are the statements from example CacheQueryDdlExample > (apache-ignite-fabric-2.3.0-bin/examples/src/main/java/ > org/apache/ignite/examples/datagrid/CacheQueryDdlExample.java): > > cache.query(new SqlFieldsQuery( > "CREATE TABLE city (id LONG PRIMARY KEY, name VARCHAR) > WITH \"template=replicated\"")).getAll(); > > cache.query(new SqlFieldsQuery( > "CREATE TABLE person (id LONG, name VARCHAR, city_id > LONG, PRIMARY KEY (id, city_id)) " + > "WITH \"backups=1, affinityKey=city_id\"")).getAll(); > > From the above two statements, "cache" is used to create two other caches > "SQL_PUBLIC_CITY" and "SQL_PUBLIC_PERSON". Why do we need one cache to > create another cache? What is the main purpose of "cache"? > > I kindly request you guys to throw some light on this topic. Any related > information is appreciable. > > Regards, > Shravya Nethula. > > > > -- > Sent from: http://apache-ignite-users.70518.x6.nabble.com/ > -- Best regards, Andrey V. Mashenkov
