typhon-project / typhonql

Typhon Query Language
Eclipse Public License 2.0
4 stars 1 forks source link

Real data types are not returned in resultset #51

Closed dicorfu closed 4 years ago

dicorfu commented 4 years ago

Describe the bug

We select data from a table and the column log_aa which has real data type is not returned in the resultset. Screenshot attached.

Query

from FinesseLog o select o

Model ML entity:

entity FinesseLog{
    Log_date:String
    Log_Branch:String
    LOG_ServerName:String
    LOG_BBBMMK:String
    **Log_aa:Real**
    Log_ComputerName:String
    Log_time:String
    Log_user:int
    Log_RSTflag:int
    Log_TUN:String
    Log_trancode:String
    Log_data:String
    Log_BankID:String   
}

Table created in MariaDB:

CREATE TABLE `FinesseLog` (
  `FinesseLog.@id` char(36) NOT NULL,
  `FinesseLog.Log_ComputerName` text DEFAULT NULL,
  `FinesseLog.Log_data` text DEFAULT NULL,
  `FinesseLog.Log_user` int(11) DEFAULT NULL,
  `FinesseLog.Log_time` text DEFAULT NULL,
  `FinesseLog.Log_trancode` text DEFAULT NULL,
  **`FinesseLog.Log_aa` float DEFAULT NULL,**
  `FinesseLog.Log_Branch` text DEFAULT NULL,
  `FinesseLog.LOG_BBBMMK` text DEFAULT NULL,
  `FinesseLog.Log_RSTflag` int(11) DEFAULT NULL,
  `FinesseLog.LOG_ServerName` text DEFAULT NULL,
  `FinesseLog.Log_date` text DEFAULT NULL,
  `FinesseLog.Log_BankID` text DEFAULT NULL,
  `FinesseLog.Log_TUN` text DEFAULT NULL,
  PRIMARY KEY (`FinesseLog.@id`),
  UNIQUE KEY `FinesseLog.@id` (`FinesseLog.@id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

Expected behavior We have inserted data in MariaDB and column log_aa contains values.

We select data through Postman using api/query and we get the following response: { "response": "{"FinesseLog":[{"uuid":"1fab3a12-3c27-44fb-a112-ec915067d099","fields":{},"type":"FinesseLog"},{"uuid":"20c10018-8012-4698-89c0-5610cb1864bc","fields":{},"type":"FinesseLog"},{"uuid":"4c92f58b-3f09-480a-841d-b8705096fe6c","fields":{},"type":"FinesseLog"},{"uuid":"4d6a9c1b-0f99-402b-88b6-feffe3abc45d","fields":{"Log_user":111,"Log_data":"a text"},"type":"FinesseLog"},{"uuid":"7ac67f66-6f11-4424-a5d1-6653511a2852","fields":{},"type":"FinesseLog"},{"uuid":"93b1e36b-bdd4-499e-a4ee-3bc265b5810f","fields":{},"type":"FinesseLog"},{"uuid":"aa0c1c2f-13a0-465e-97ba-20f321f6d869","fields":{},"type":"FinesseLog"},{"uuid":"bac980f7-90c6-4ec6-9e20-9d732368850e","fields":{"Log_user":111,"Log_data":"a text"},"type":"FinesseLog"},{"uuid":"bea14e36-cff8-4832-8967-b1bd18b56b19","fields":{"Log_user":111,"Log_data":"test test 2"},"type":"FinesseLog"},{"uuid":"fb02dbd0-ef4b-4153-91d0-fe944691d47f","fields":{},"type":"FinesseLog"}]}" }, which does not contain log_aa field.

Screenshots MariaDB data:

image

Postman:

image

IDE

REST API

If the bug happens when calling the REST API:

DavyLandman commented 4 years ago

Ouch, that's bad.

We are in the process of changing how our queries are executed & how results are reported back, we'll come back to this bug after that work has been completly, hopefully it works by then.

tvdstorm commented 4 years ago

@dicorfu can you report whether this is still an issue? Thanks.

dicorfu commented 4 years ago

@tvdstorm this issue has been resolved. Thanks.

tvdstorm commented 4 years ago

Thanks!