Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DataType Error when connecting PostgreSQL Source: Unsupported precision for data type #446

Open
hennlo opened this issue Jun 7, 2023 · 0 comments
Labels
A-db Area: DB A-ui Area: UI C-bug Category: This is a bug. E-medium

Comments

@hennlo
Copy link
Member

hennlo commented Jun 7, 2023

Operating System (Polypheny-DB)

Linux

Polypheny-DB Version

v.0.9.0

Affected Areas

DB, UI

Browser

No response

Client Operating System

SLES 15 SP4

Bug Description

When connecting a PostgreSQL Data Source table containing a column with type timestamp without timezone
The creation fails with the following error:

Caused by: java.lang.RuntimeException: Unsupported precision for data type timestamp: 6

When looking at the source table the issue revolves around a column with the type: timestamp without timezone

Image Pasted at 2023-6-5 10-36

image

If we were to remove this column the connection and consequently the creation of the source is successful.

Reproduction Steps

  • Create a PSQL table containing a column with type: timestamp without timezone.
  • Within Polypheny add a new PostgreSQL Source Adapter on that specific table
  • Within the service log under linux journalctl -u polypheny.service observer an error similiar to:
Caused by: java.lang.RuntimeException: Unsupported precision for data type timestamp

Expected Behavior

Adapt and correctly translate the remote type to Polypheny Timestamp Type. Maybe even always assume UTC or convert it to string? Because a timestamp without timezone is meaningless anyway

Also the failure message could be improved instead of "Adapter could not be deployed" give a more insightful response without the need to consult the error log.

Relevant Log Output

Caused by: java.lang.RuntimeException: Unsupported precision for data type timestamp: 6
Jun 05 10:32:34 myVMInstance Polypheny[25395]:         at org.polypheny.db.adapter.jdbc.sources.AbstractJdbcSource.getExportedColumns(AbstractJdbcSource.java:251) ~[?:?]
Jun 05 10:32:34 myVMInstance Polypheny[25395]:         at org.polypheny.db.ddl.DdlManagerImpl.addAdapter(DdlManagerImpl.java:239) ~[Polypheny.jar:0.9.0]
Jun 05 10:32:34 myVMInstance Polypheny[25395]:         at org.polypheny.db.sql.language.ddl.SqlAlterAdaptersAdd.execute(SqlAlterAdaptersAdd.java:98) ~[?:?]
Jun 05 10:32:34 myVMInstance Polypheny[25395]:         at org.polypheny.db.processing.Processor.getResult(Processor.java:69) ~[Polypheny.jar:0.9.0]
Jun 05 10:32:34 myVMInstance Polypheny[25395]:         at org.polypheny.db.processing.Processor.prepareDdl(Processor.java:53) ~[Polypheny.jar:0.9.0]
Jun 05 10:32:34 myVMInstance Polypheny[25395]:         at org.polypheny.db.webui.Crud.processQuery(Crud.java:3425) ~[Polypheny.jar:0.9.0]
Jun 05 10:32:34 myVMInstance Polypheny[25395]:         at org.polypheny.db.webui.Crud.executeSqlUpdate(Crud.java:3454) ~[Polypheny.jar:0.9.0]
Jun 05 10:32:34 myVMInstance Polypheny[25395]:         ... 55 more
@hennlo hennlo added C-bug Category: This is a bug. A-ui Area: UI A-db Area: DB E-medium labels Jun 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-db Area: DB A-ui Area: UI C-bug Category: This is a bug. E-medium
Projects
None yet
Development

No branches or pull requests

1 participant