You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by "Jay Yang (Jira)" <ji...@apache.org> on 2021/05/12 01:58:00 UTC

[jira] [Created] (CALCITE-4604) value of AvaticaSeverity.UNKNOWN lost after deserializing serialized ErrorResponse objects

Jay Yang created CALCITE-4604:
---------------------------------

             Summary: value of AvaticaSeverity.UNKNOWN lost after deserializing serialized ErrorResponse objects
                 Key: CALCITE-4604
                 URL: https://issues.apache.org/jira/browse/CALCITE-4604
             Project: Calcite
          Issue Type: Bug
          Components: avatica
    Affects Versions: avatica-1.17.0
            Reporter: Jay Yang


Hi team, recently I encountered a potential bug that after deserialization of serialized ErrorResponse objects, the value of AvaticaSeverity lost, eg. became null.

Here is a simple scala test I used:

 
{code:java}
val translator = new ProtobufTranslationImpl
val response = new Service.ErrorResponse(Lists.newArrayList(), "error message", 500, SqlState.INVALID_SQL_STATEMENT.toString ,AvaticaSeverity.UNKNOWN, null)
val parsedSerializedResponse = translator.parseResponse(translator.serializeResponse(response))
assert(response.severity == parsedSerializedResponse.asInstanceOf[Service.ErrorResponse].severity){code}
This test only fails for AvaticaSeverity.UNKOWN but not FATAL, ERROR and WARNING, so I suspect there is a bug during the serialization/deserialization process.

 

 

 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)