.Net MethodVisitor ambiguous exception during get StringMethod "Contains"

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

.Net MethodVisitor ambiguous exception during get StringMethod "Contains"

Tâm Nguyễn Mạnh
Hi,

There are more than 1 Contains method for string, that lead into Ambiguous
exception

modules\platforms\dotnet\Apache.Ignite.Linq\Impl\MethodVisitor.cs:57
``` C#
GetStringMethod("Contains", del: (e, v) => VisitSqlLike(e, v, "'%' || ? ||
'%'")),
```

I think it should be:
``` C#
GetStringMethod("Contains", del: (e, v) => VisitSqlLike(e, v, "'%' || ? ||
'%'"), argTypes:new []{typeof(string)}),
```

--
Thanks & Best Regards

Tam, Nguyen Manh
Reply | Threaded
Open this post in threaded view
|

Re: .Net MethodVisitor ambiguous exception during get StringMethod "Contains"

Pavel Tupitsyn
Hi,

Do you mean that you can't compile the code?
It certainly compiles (under full .NET, .NET Core, and Mono, on Windows and
Linux), so it seems like some issue with your environment.
Can you do a fresh git checkout, then run `build.bat`?

Pavel

On Fri, Sep 7, 2018 at 5:16 AM Tâm Nguyễn Mạnh <[hidden email]>
wrote:

> Hi,
>
> There are more than 1 Contains method for string, that lead into Ambiguous
> exception
>
> modules\platforms\dotnet\Apache.Ignite.Linq\Impl\MethodVisitor.cs:57
> ``` C#
> GetStringMethod("Contains", del: (e, v) => VisitSqlLike(e, v, "'%' || ? ||
> '%'")),
> ```
>
> I think it should be:
> ``` C#
> GetStringMethod("Contains", del: (e, v) => VisitSqlLike(e, v, "'%' || ? ||
> '%'"), argTypes:new []{typeof(string)}),
> ```
>
> --
> Thanks & Best Regards
>
> Tam, Nguyen Manh
>
Reply | Threaded
Open this post in threaded view
|

Re: .Net MethodVisitor ambiguous exception during get StringMethod "Contains"

Tâm Nguyễn Mạnh
Hi Paven,

This is not compile error, this is runtime error. I got this while i try to
use linq to query name contains (.NET core)

On Sun, Sep 9, 2018 at 5:29 PM Pavel Tupitsyn <[hidden email]> wrote:

> Hi,
>
> Do you mean that you can't compile the code?
> It certainly compiles (under full .NET, .NET Core, and Mono, on Windows and
> Linux), so it seems like some issue with your environment.
> Can you do a fresh git checkout, then run `build.bat`?
>
> Pavel
>
> On Fri, Sep 7, 2018 at 5:16 AM Tâm Nguyễn Mạnh <[hidden email]
> >
> wrote:
>
> > Hi,
> >
> > There are more than 1 Contains method for string, that lead into
> Ambiguous
> > exception
> >
> > modules\platforms\dotnet\Apache.Ignite.Linq\Impl\MethodVisitor.cs:57
> > ``` C#
> > GetStringMethod("Contains", del: (e, v) => VisitSqlLike(e, v, "'%' || ?
> ||
> > '%'")),
> > ```
> >
> > I think it should be:
> > ``` C#
> > GetStringMethod("Contains", del: (e, v) => VisitSqlLike(e, v, "'%' || ?
> ||
> > '%'"), argTypes:new []{typeof(string)}),
> > ```
> >
> > --
> > Thanks & Best Regards
> >
> > Tam, Nguyen Manh
> >
>


--
Thanks & Best Regards

Tam, Nguyen Manh
Reply | Threaded
Open this post in threaded view
|

Re: .Net MethodVisitor ambiguous exception during get StringMethod "Contains"

Pavel Tupitsyn
Can you provide a reproducer please?

On Mon, Sep 10, 2018 at 9:15 AM Tâm Nguyễn Mạnh <[hidden email]>
wrote:

> Hi Paven,
>
> This is not compile error, this is runtime error. I got this while i try to
> use linq to query name contains (.NET core)
>
> On Sun, Sep 9, 2018 at 5:29 PM Pavel Tupitsyn <[hidden email]>
> wrote:
>
> > Hi,
> >
> > Do you mean that you can't compile the code?
> > It certainly compiles (under full .NET, .NET Core, and Mono, on Windows
> and
> > Linux), so it seems like some issue with your environment.
> > Can you do a fresh git checkout, then run `build.bat`?
> >
> > Pavel
> >
> > On Fri, Sep 7, 2018 at 5:16 AM Tâm Nguyễn Mạnh <
> [hidden email]
> > >
> > wrote:
> >
> > > Hi,
> > >
> > > There are more than 1 Contains method for string, that lead into
> > Ambiguous
> > > exception
> > >
> > > modules\platforms\dotnet\Apache.Ignite.Linq\Impl\MethodVisitor.cs:57
> > > ``` C#
> > > GetStringMethod("Contains", del: (e, v) => VisitSqlLike(e, v, "'%' || ?
> > ||
> > > '%'")),
> > > ```
> > >
> > > I think it should be:
> > > ``` C#
> > > GetStringMethod("Contains", del: (e, v) => VisitSqlLike(e, v, "'%' || ?
> > ||
> > > '%'"), argTypes:new []{typeof(string)}),
> > > ```
> > >
> > > --
> > > Thanks & Best Regards
> > >
> > > Tam, Nguyen Manh
> > >
> >
>
>
> --
> Thanks & Best Regards
>
> Tam, Nguyen Manh
>