Search code examples
ignitedevextreme

DataSourceLoader.Load Thrown exception "Failed to parse query"


I am using Devextreme loadoptions with Ignite CacheQueryable it is working fine with Grid get all data request but throwing exception when I select filter on grid's column.

"Message": "42000: Failed to parse query. Column "_T0.I0" not found; SQL statement: select count (_T0.*) , _T0.I0 from "Data".ABC as _T0 group by (_T0.FILENAME) order by (_T0.I0) asc limit ? [42122-197]".


Solution

  • It is a bug in Ignite, I've filed a ticket: IGNITE-17842.

    Devextreme generates the following expression:

                queryable
                    .GroupBy(obj => new { I0 = obj.Filename })
                    .OrderBy(g => g.Key.I0)
                    .Select(g => new { I0 = g.Count(), I1 = g.Key.I0 })
                    .Take(20);
    

    The problem is GroupBy(obj => new { I0 = obj.Filename }), Ignite does not (yet) support grouping by an anonymous type. It would work as GroupBy(obj => obj.Filename).