[ 
https://issues.apache.org/jira/browse/CALCITE-4604?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jay Yang updated CALCITE-4604:
------------------------------
    Description: 
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.

 

 

 

  was:
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.

 

 

 


> 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
>            Priority: Minor
>
> 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)

Reply via email to