bamcis-io / PrestoClient

A .NET client for Prestodb written targetting .NET Standard 2.0.
MIT License
19 stars 18 forks source link

Error 'The query submission response could not be parsed' while connecting to Presto 0.262 #13

Closed VitaliyMF closed 3 years ago

VitaliyMF commented 3 years ago

I'm trying to connect to ahanaio/prestodb-sandbox container which runs Presto 0.262 and got this:

      ---> BAMCIS.PrestoClient.Model.PrestoException: The query submission response could not be parsed.
       ---> System.ArgumentException: Requested value 'WAITING_FOR_PREREQUISITES' was not found.
         at System.Enum.TryParseByName(RuntimeType enumType, String originalValueString, ReadOnlySpan`1 value, Boolean ignoreCase, Boolean throwOnFailure, UInt6
4& result)
         at System.Enum.TryParseInt32Enum(RuntimeType enumType, String originalValueString, ReadOnlySpan`1 value, Int32 minInclusive, Int32 maxInclusive, Boolean ignoreCase, Boolean throwOnFailure, TypeCode type, Int32& result)
         at System.Enum.TryParse(Type enumType, String value, Boolean ignoreCase, Boolean throwOnFailure, Object& result)
         at System.Enum.Parse(Type enumType, String value)
         at BAMCIS.PrestoClient.Model.Client.StatementStats..ctor(String state,Boolean queued, Boolean scheduled, Int32 nodes, Int32 totalSplits, Int32 queuedSplits, Int32 runningSplits, Int32 completedSplits, Int64 userTimeMillis, Int64 cpuTimeMillis, Int64 wallTimeMillis, Int64 queuedTimeMillis, Int64 elapsedTimeMillis, Int64 processedRows, Int64 processedBytes, Int64 eakMemoryBytes, StageStats rootStage)

          ................

         at BAMCIS.PrestoClient.Model.Statement.QueryResultsV1.TryParse(String content, QueryResultsV1& result, Exception& ex)
         --- End of inner exception stack trace ---
         at BAMCIS.PrestoClient.PrestodbClient.ExecuteQueryV1(ExecuteQueryV1Request request, CancellationToken cancellationToken)
         at NReco.PrestoAdo.PrestoConnection.ExecuteQueryAsync(PrestoCommand cmd, CancellationToken ct)

I',m using the latest nuget package PrestoClient 0.198.5. Does this mean that ExecuteQueryV1 cannot be used with the latest PrestoDB?

VitaliyMF commented 3 years ago

It seems this is known issue that is already fixed in the 0.256 branch. Is it possible to publish PrestoClient 0.256.0-beta on nuget.org? I need to reference it from my ADO provider implementation https://github.com/nreco/presto-ado

hakenmt commented 3 years ago

I added the 0.256.0-beta release to nuget just now. The nuget package is also on the releases page. https://github.com/bamcis-io/PrestoClient/releases/tag/0.256.