I have tested with adding QuerySqlFields as well, it is enabling to add dynamic field and indexes on nested objects but if I restart the client again it is not able to join the grid because it is not able to find this column. But with the fix and maintaining proper aliases we are able to add fields and indexes dynamically on direct/ nested attribute. This functionality will be out of the box with this fix. Please let me know if you still see any issue.
Ignite does provide dynamic addition of columns and indexes but it is just that there is a bug on adding indexes dynamically on QuerySqlFields nested objects. With this small fix it will run with out any issues. SEVERE: Failed to reinitialize local partitions (rebalancing will be stopped): GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion [topVer=3, minorTopVer=0], discoEvt=DiscoveryEvent [evtNode=TcpDiscoveryNode [id=7af3d442-946f-4572-9fb7-08971b8d82cc, addrs=[0:0:0:0:0:0:0:1, 114.18.146.93, 127.0.0.1], sockAddrs=[/0:0:0:0:0:0:0:1:0, /127.0.0.1:0, DTC4C4A8C85A622.ent.wfb.bank.corp/114.18.146.93:0], discPort=0, order=3, intOrder=0, lastExchangeTime=1570647484111, loc=true, ver=2.7.6#20190911-sha1:21f7ca41, isClient=true], topVer=3, nodeId8=7af3d442, msg=null, type=NODE_JOINED, tstamp=1570647484265], nodeId=7af3d442, evt=NODE_JOINED] class org.apache.ignite.IgniteCheckedException: Field not found: Users.userName at org.apache.ignite.internal.processors.query.QueryIndexDescriptorImpl.addField(QueryIndexDescriptorImpl.java:124) at org.apache.ignite.internal.processors.query.QueryUtils.createIndexDescriptor(QueryUtils.java:735) at org.apache.ignite.internal.processors.query.QueryUtils.processIndex(QueryUtils.java:752) at org.apache.ignite.internal.processors.query.QueryUtils.processIndexes(QueryUtils.java:688) at org.apache.ignite.internal.processors.query.QueryUtils.processBinaryMeta(QueryUtils.java:612) at org.apache.ignite.internal.processors.query.QueryUtils.typeForQueryEntity(QueryUtils.java:480) at org.apache.ignite.internal.processors.query.GridQueryProcessor.onCacheStart0(GridQueryProcessor.java:706) at org.apache.ignite.internal.processors.query.GridQueryProcessor.onCacheStart(GridQueryProcessor.java:866) at org.apache.ignite.internal.processors.cache.GridCacheProcessor.startCache(GridCacheProcessor.java:1337) at org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:2172) at org.apache.ignite.internal.processors.cache.GridCacheProcessor.startCachesOnLocalJoin(GridCacheProcessor.java:2030) at org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.initCachesOnLocalJoin(GridDhtPartitionsExchangeFuture.java:927) at org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:769) at org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body0(GridCachePartitionExchangeManager.java:2681) at org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:2553) at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:120) at java.lang.Thread.run(Thread.java:748) -- Sent from: http://apache-ignite-users.70518.x6.nabble.com/