Integer type mishandled in DDL statements
See original GitHub issueAthena uses different names for the integer type depending on whether the statement is a DML or DDL one. In the former it uses the regular INTEGER
name, but in DDL it uses the name INT
.
Currently PyAthena does not distinguish DDL from DML statements, which produces syntax errors when emitting CREATE TABLE
statements.
Note that in other places (e.g. pyathena.pandas.utils
) this has been correctly handled.
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Types of SQL Statements
The tables in the following sections provide a functional summary of SQL statements and are divided into these categories: Data Definition Language (DDL) ......
Read more >Data definition language (DDL) statements in ... - Google Cloud
Data definition language (DDL) statements let you create and modify BigQuery resources using Google Standard SQL query syntax. You can use DDL commands...
Read more >Using DDL Statements - Tutorialspoint
Using DDL Statements to Create and Manage Tables. A schema is the collection of multiple database objects,which are known as schema objects.
Read more >Database Design - DDL & DML
SQL statements are divided into two major categories: data definition language ... numeric types such as NUMBER or INTEGER, which will usually specify...
Read more >INTEGER, INT, SMALLINT, TINYINT, MEDIUMINT, BIGINT
MySQL supports the SQL standard integer types INTEGER (or INT ) and SMALLINT . As an extension to the standard, MySQL also supports...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I am sorry but we did have syntax errors with the INTEGER type at some point.
Maybe it also depends on the storage format from some weird reason, or something else. I am looking into it with a colleague to provide an example. If we find out that we had it wrong and cannot reproduce the issue, we’ll close the issue obviously. Just give us the day, please. Thanks.
For memory’s sake: some DDL statements do not handle INTEGER, like:
This is not something that is yet implemented in PyAthena, but we have started implementing some Alembic support for it.