Skip to content

The data type is not compatible with other system, for example spark or PG database #1379

@liukun4515

Description

@liukun4515

Describe the bug
In the doc, we can know the datatypes supported in the datafusion.

In other system, such as PG database and spark, the systems just support signed numeric datatypes.

But in the datafusion, we can create a table with unsigned numeric, this is not compatible with the doc and other system.

In the code, we also consider the case of unsigned numeric datatypes.

To Reproduce

❯ create table test as select count(1);
0 rows in set. Query took 0.004 seconds.
❯ \d test
+---------------+--------------+------------+-----------------+-----------+-------------+
| table_catalog | table_schema | table_name | column_name     | data_type | is_nullable |
+---------------+--------------+------------+-----------------+-----------+-------------+
| datafusion    | public       | test       | COUNT(UInt8(1)) | UInt64    | YES         |
+---------------+--------------+------------+-----------------+-----------+-------------+
1 row in set. Query took 0.008 seconds.
❯

From example, we can can see that the datatype is UINT64.

Expected behavior
A clear and concise description of what you expected to happen.

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions