mihaibudiu commented on code in PR #275:
URL: https://github.com/apache/calcite-avatica/pull/275#discussion_r2294867022


##########
core/src/main/java/org/apache/calcite/avatica/util/AbstractCursor.java:
##########
@@ -288,18 +293,38 @@ public byte getByte() throws SQLException {
       return (byte) getLong();
     }
 
+    @Override
+    public UByte getUByte() throws SQLException {
+      return UByte.valueOf(getLong());
+    }
+
     public short getShort() throws SQLException {
       return (short) getLong();
     }
 
+    @Override
+    public UShort getUShort() throws SQLException {
+      return UShort.valueOf(String.valueOf(getLong()));

Review Comment:
   this seems a bit convoluted



##########
core/src/test/java/org/apache/calcite/avatica/CursorFactoryDeduceTest.java:
##########
@@ -244,6 +260,88 @@ protected static class SimplePOJO {
       assertFalse(cursor.next());
     }
   }
+
+  @Test public void deduceRecordCursorFactoryProjectedSignedField() throws 
Exception {
+    List<ColumnMetaData> columnsMetaDataList = Arrays.asList(
+        MetaImpl.columnMetaData("byteField", 1, ColumnMetaData.scalar(
+            Types.TINYINT, "TINYINT", ColumnMetaData.Rep.BYTE), true, true),
+        MetaImpl.columnMetaData("shortField", 2, ColumnMetaData.scalar(
+            Types.SMALLINT, "SMALLINT", ColumnMetaData.Rep.SHORT), true, true),
+        MetaImpl.columnMetaData("intField", 3, ColumnMetaData.scalar(

Review Comment:
   this we don't have, right?



-- 
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]

Reply via email to