Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query: Explicit convert throws exception #15950

Closed
smitpatel opened this issue Jun 4, 2019 · 0 comments
Closed

Query: Explicit convert throws exception #15950

smitpatel opened this issue Jun 4, 2019 · 0 comments
Labels
closed-out-of-scope This is not something that will be fixed/implemented and the issue is closed.

Comments

@smitpatel
Copy link
Contributor

[ConditionalTheory]
        [MemberData(nameof(IsAsyncData))]
        public virtual async Task Where_bitwise_and_integral(bool isAsync)
        {
            await AssertQuery<Gear>(
                isAsync,
                gs => gs.Where(g => ((char)g.Rank & '\x0001') == '\x0001'));
        }
Message: 
    Microsoft.Data.SqlClient.SqlException : The data types nvarchar and nvarchar are incompatible in the '&' operator.
  Stack Trace: 
    at SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
    at SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
    at TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
    at TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
    at SqlDataReader.TryConsumeMetaData()
    at SqlDataReader.get_MetaData()
    at SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
    at SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean isAsync, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
    at SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry, String method)
    at SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
    at SqlCommand.ExecuteReader(CommandBehavior behavior)
    at SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
    at DbCommand.ExecuteReader()
    at RelationalCommand.Execute(IRelationalConnection connection, DbCommandMethod executeMethod, IReadOnlyDictionary`2 parameterValues, IDiagnosticsLogger`1 logger) in RelationalCommand.cs line: 239
    at RelationalCommand.ExecuteReader(IRelationalConnection connection, IReadOnlyDictionary`2 parameterValues, IDiagnosticsLogger`1 logger) in RelationalCommand.cs line: 158
    at Enumerator.MoveNext() in QueryingEnumerable.cs line: 103
    at LargeArrayBuilder`1.AddRange(IEnumerable`1 items)
    at EnumerableHelpers.ToArray[T](IEnumerable`1 source)
    at Enumerable.ToArray[TSource](IEnumerable`1 source)
    at QueryAsserter`1.AssertQuery[TItem1](Func`2 actualQuery, Func`2 expectedQuery, Func`2 elementSorter, Action`2 elementAsserter, Boolean assertOrder, Int32 entryCount, Boolean isAsync, String testMethodName) in QueryAsserter.cs line: 349
    at GearsOfWarQueryTestBase`1.Where_bitwise_and_integral(Boolean isAsync) in GearsOfWarQueryTestBase.cs line: 702
    at GearsOfWarQuerySqlServerTest.Where_bitwise_and_integral(Boolean isAsync) in GearsOfWarQuerySqlServerTest.cs line: 627
    at --- End of stack trace from previous location where exception was thrown ---
smitpatel added a commit that referenced this issue Jun 6, 2019
Remove test for #15950
Remove ToLookup API for #15916
Resolves #15924
smitpatel added a commit that referenced this issue Jun 6, 2019
Remove test for #15950
Remove ToLookup API for #15916
Resolves #15924
@ajcvickers ajcvickers added the closed-out-of-scope This is not something that will be fixed/implemented and the issue is closed. label Mar 10, 2022
@ajcvickers ajcvickers reopened this Oct 16, 2022
@ajcvickers ajcvickers closed this as not planned Won't fix, can't repro, duplicate, stale Oct 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-out-of-scope This is not something that will be fixed/implemented and the issue is closed.
Projects
None yet
Development

No branches or pull requests

2 participants