I’m getting the following exception when trying to run the following code. Does the driver support the Trino JSON type? I don’t see json referenced in GetResultTypeData method source.
string sql = "SELECT _id, CAST(extra_columns AS JSON) as extra_columns FROM hive.default.measures";
PrestoCommand cmd = new PrestoCommand(sql, connection);
PrestoDataReader rdr = cmd.ExecuteReader();
Message:
Test method Juniper.Test.Trino.TrinoClientTests.PrestoAdoRead threw exception:
System.Data.CData.Presto.PrestoException: c500] Could not execute the specified command: Unknown datatype: JSON. ---> oro230j.TC: Unknown datatype: JSON.
Stack Trace:
ZN.GetResultDataType(FormulaEvaluationContext )
RqC.K(SqlFormulaColumn )
RqC.mI(SqlTable , SqlColumn )
Rod.C(SqlCollection`1 )
Rod.Nd(LLB`2 )
Roh.Nd(LLB`2 )
KJ.U(SQLQuery , Int32 , RRq )
KJ.d(IDataStatement , SQLQuery , QueryParameterCollection , Int32 , String , LeW )
RUJ.ExecuteQuery(IDataStatement , QueryParameterCollection , Int32 )
RUG.ExecuteQuery(IDataStatement , QueryParameterCollection , Int32 )
<9 more frames...>
PrestoCommand.ExecuteDataReader(CommandBehavior behavior)
PrestoCommand.ExecuteDbDataReader(CommandBehavior behavior)
DbCommand.ExecuteReader()
PrestoCommand.ExecuteReader()
<PrestoAdoRead>d__5.MoveNext() line 106
--- End of stack trace from previous location where exception was thrown ---
ExceptionDispatchInfo.Throw()
TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
TaskAwaiter.GetResult()
ThreadOperations.ExecuteWithAbortSafety(Action action)