RE: SQL cannot find data of new class definition

2018-06-25 Thread slava.koptilin
Hello, > So when we need to add a new field, say in "addr", we can use current > ALTER TABLE to add a normal column, > but now the problem is how to map the new field to the column. Yes, that is a problem. ALTER TABLE command does not support adding new columns to nested objects. So, if you need

RE: SQL cannot find data of new class definition

2018-06-21 Thread Cong Guo
Now we cannot modify the QueryEntity dynamically, right? I think the problem is to support dynamic update of fields in QueryEntity. -Original Message- From: slava.koptilin [mailto:slava.kopti...@gmail.com] Sent: 2018年6月21日 11:27 To: user@ignite.apache.org Subject: RE: SQL cannot find data

RE: SQL cannot find data of new class definition

2018-06-21 Thread slava.koptilin
Hello Cong, > when we add a field to the first-level value object and add a column to > the table dynamically, they can be connected automatically. Yes, that is correct. > So now the problem is when we add a field to the nested object and add a > column to the table, > they cannot be connected

RE: SQL cannot find data of new class definition

2018-06-21 Thread slava.koptilin
Hello, > How should I write the "alter table Person" statement if I want to add a > new member > to class Address after the cache has been created? I don't think that there is a way to do it for nested objects, unfortunately. In that case, I think that you need to update your configuration [1]

RE: SQL cannot find data of new class definition

2018-06-20 Thread slava.koptilin
Hello, > Can I add fields without restarting the cluster? Yes, It can be done via DDL command, as Ilya Kasnacheev mentioned. Let's assume that you created a cache: CacheConfiguration cfg = new CacheConfiguration(PERSON_CACHE_NAME) .setIndexedTypes(Long.class, Person.class);

RE: SQL cannot find data of new class definition

2018-06-18 Thread Cong Guo
Can I add fields without restarting the cluster? My requirement is to do rolling upgrade. From: Вячеслав Коптилин [mailto:slava.kopti...@gmail.com] Sent: 2018年6月18日 17:35 To: user@ignite.apache.org Subject: Re: SQL cannot find data of new class definition Hello, > I use BinaryObj

Re: SQL cannot find data of new class definition

2018-06-18 Thread Вячеслав Коптилин
Cong Guo > *Sent:* 2018年6月15日 10:12 > *To:* 'user@ignite.apache.org' > *Subject:* RE: SQL cannot find data of new class definition > > > > I run the SQL query only after the cache size has changed. The new data > should be already in the cache when I run the query. > >

RE: SQL cannot find data of new class definition

2018-06-18 Thread Cong Guo
find data of new class definition I run the SQL query only after the cache size has changed. The new data should be already in the cache when I run the query. From: Cong Guo Sent: 2018年6月15日 10:01 To: user@ignite.apache.org<mailto:user@ignite.apache.org> Subject: RE: SQL cannot find data

RE: SQL cannot find data of new class definition

2018-06-15 Thread Cong Guo
I run the SQL query only after the cache size has changed. The new data should be already in the cache when I run the query. From: Cong Guo Sent: 2018年6月15日 10:01 To: user@ignite.apache.org Subject: RE: SQL cannot find data of new class definition Hi, Thank you for the reply. In my original

RE: SQL cannot find data of new class definition

2018-06-15 Thread Cong Guo
; System.out.println(bObj2.type().field("firstName").value(bObj2) + " " + bObj2.type().field("salary").value(bObj2)); System.out.println("" + bObj2.type().field("addON").value(bObj2)); Thanks, Cong From: Ilya Kasnacheev [mailto:ilya.kasnach...@gmail

Re: SQL cannot find data of new class definition

2018-06-15 Thread Ilya Kasnacheev
Hello! You can add fields to existing SQL-backed cache using ALTER TABLE ... ADD COLUMN command: https://apacheignite-sql.readme.io/docs/alter-table The recommendation for your use case, where the layout of dat1a is expected to change, is to just use SQL (DDL) defined tables and forget about