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

Trino Support #850

Open
PaulWoitaschek opened this issue Aug 30, 2024 · 1 comment
Open

Trino Support #850

PaulWoitaschek opened this issue Aug 30, 2024 · 1 comment
Assignees
Labels
databases JDBC related issues enhancement New feature or request
Milestone

Comments

@PaulWoitaschek
Copy link

PaulWoitaschek commented Aug 30, 2024

We're using Trino (previously called Presto) and it would be great to have first party support for Trino in dataframe.

With this little hack (delegating it to Postgre) it's already working for us but this is probably not a solution for all cases:

object Trino : DbType("trino") {

  override val driverClassName: String = "io.trino.jdbc.TrinoDriver"

  override fun buildTableMetadata(tables: ResultSet): TableMetadata = PostgreSql.buildTableMetadata(tables)

  override fun convertSqlTypeToColumnSchemaValue(tableColumnMetadata: TableColumnMetadata): ColumnSchema? =
    PostgreSql.convertSqlTypeToColumnSchemaValue(tableColumnMetadata)

  override fun convertSqlTypeToKType(tableColumnMetadata: TableColumnMetadata): KType? =
    PostgreSql.convertSqlTypeToKType(tableColumnMetadata)

  override fun isSystemTable(tableMetadata: TableMetadata): Boolean = PostgreSql.isSystemTable(tableMetadata)
}
@zaleslaw zaleslaw self-assigned this Sep 3, 2024
@zaleslaw zaleslaw added this to the 0.15.0 milestone Sep 3, 2024
@zaleslaw zaleslaw added databases JDBC related issues enhancement New feature or request labels Sep 3, 2024
@zaleslaw
Copy link
Collaborator

zaleslaw commented Sep 3, 2024

Dear @PaulWoitaschek thanks for suggestions, we have a blocker in our plugins (symbol-processor) and could not provide for now free registration for any SQL sources, but I believe it will be a goal for next release, because it's a high demand there.

When we will finish the system redesign, we will provide a simple how-to in the spirit of your code snippet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
databases JDBC related issues enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants