Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-4604

value of AvaticaSeverity.UNKNOWN lost after deserializing serialized ErrorResponse objects

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: avatica-1.17.0
    • Fix Version/s: None
    • Component/s: avatica
    • Labels:
      None

      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:

      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)

      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.

       

       

       

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              kluns1206 Jay Yang
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: