turboFei commented on code in PR #4372:
URL: https://github.com/apache/kyuubi/pull/4372#discussion_r1111551805


##########
kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/v1/OperationsResource.scala:
##########
@@ -183,19 +183,47 @@ private[v1] class OperationsResource extends 
ApiRequestContext with Logging {
             i.getSetField.name(),
             i.getSetField match {
               case TColumnValue._Fields.STRING_VAL =>
-                i.getStringVal.getFieldValue(TStringValue._Fields.VALUE)
+                if (i.getStringVal.isSetValue) {

Review Comment:
   With 
   ```
                 case TColumnValue._Fields.STRING_VAL =>
                   if (i.isSetStringVal) {
                     i.getStringVal.getFieldValue(TStringValue._Fields.VALUE)
                   } else {
                     null
                   }
                 case TColumnValue._Fields.BOOL_VAL =>
                   if (i.isSetBoolVal) {
                     i.getBoolVal.getFieldValue(TBoolValue._Fields.VALUE)
                   } else {
                     null
                   }
                 case TColumnValue._Fields.BYTE_VAL =>
                   if (i.isSetByteVal) {
                     i.getByteVal.getFieldValue(TByteValue._Fields.VALUE)
                   } else {
                     null
                   }
                 case TColumnValue._Fields.DOUBLE_VAL =>
                   if (i.isSetDoubleVal) {
                     i.getDoubleVal.getFieldValue(TDoubleValue._Fields.VALUE)
                   } else {
                     null
                   }
                 case TColumnValue._Fields.I16_VAL =>
                   if (i.isSetI16Val) {
                     i.getI16Val.getFieldValue(TI16Value._Fields.VALUE)
                   } else {
                     null
                   }
                 case TColumnValue._Fields.I32_VAL =>
                   if (i.isSetI32Val) {
                     i.getI32Val.getFieldValue(TI32Value._Fields.VALUE)
                   } else {
                     null
                   }
                 case TColumnValue._Fields.I64_VAL =>
                   if (i.isSetI64Val) {
                     i.getI64Val.getFieldValue(TI64Value._Fields.VALUE)
                   } else {
                     null
                   }
   ```
   
   The result is:
   
   ```
   ArrayBuffer(null, false, 0, 0.0, 0, 0, 0)
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to