treasure-data / prestogres

PostgreSQL protocol gateway for Presto distributed SQL query engine
Other
292 stars 61 forks source link

Convert tinyint to integer because postgresql does't support tinyint #53

Closed wyukawa closed 8 years ago

wyukawa commented 8 years ago

Presto 0.148 supports the TINYINT type.

https://prestodb.io/docs/current/release/release-0.148.html

Because postgresql does't support tinyint, the followining error occurs.

< 2016-06-20 16:26:35.763 JST >ERROR:  spiexceptions.UndefinedObject: type "tinyint" does not exist at character 84
< 2016-06-20 16:26:35.763 JST >QUERY:  create table hoge.test (
          ...
          aaa tinyint,
          ...
        )
< 2016-06-20 16:26:35.763 JST >CONTEXT:  Traceback (most recent call last):
          PL/Python function "setup_system_catalog", line 4, in <module>
            presto_server, presto_user, presto_catalog, presto_schema, access_role)
          PL/Python function "setup_system_catalog", line 329, in setup_system_catalog
        PL/Python function "setup_system_catalog"

Prior to 0.148, presto returns integer type if there is the tinyint type. So the error doesn't occur.

wyukawa commented 8 years ago

Thanks!