Skip to content

Conversation

@pajaks
Copy link
Member

@pajaks pajaks commented May 22, 2024

Description

In case failing of argument checks in CsvDeserializerFactory and CsvDeserializer changing IllegalArgumentException to TrinoException with more clear error type.

Additional context and related issues

Example stack trace:

 "type": "java.lang.IllegalArgumentException",
  "message": "CSV only supports VARCHAR columns: Column[name=.......],
  "suppressed": [],
  "stack": [
    "com.google.common.base.Preconditions.checkArgument(Preconditions.java:220)",
    "io.trino.hive.formats.line.csv.CsvDeserializer.lambda$new$0(CsvDeserializer.java:54)",
    "com.google.common.collect.ImmutableList.forEach(ImmutableList.java:423)",
    "io.trino.hive.formats.line.csv.CsvDeserializer.<init>(CsvDeserializer.java:54)",
    "io.trino.hive.formats.line.csv.CsvDeserializerFactory.create(CsvDeserializerFactory.java:59)",
    "io.trino.plugin.hive.line.LinePageSourceFactory.createPageSource(LinePageSourceFactory.java:122)",
    "io.trino.plugin.hive.HivePageSourceProvider.createHivePageSource(HivePageSourceProvider.java:266)",
    "io.trino.plugin.hive.HivePageSourceProvider.createPageSource(HivePageSourceProvider.java:132)",
 "io.trino.plugin.base.classloader.ClassLoaderSafeConnectorPageSourceProvider.createPageSource(ClassLoaderSafeConnectorPageSourceProvider.java:49)",

Release notes

(x) This is not user-visible or is docs only, and no release notes are required.
( ) Release notes are required. Please propose a release note for me.
( ) Release notes are required, with the following suggested text:

# Section
* Fix some things. ({issue}`issuenumber`)

@cla-bot cla-bot bot added the cla-signed label May 22, 2024
@pajaks pajaks requested review from ebyhr, losipiuk and wendigo May 22, 2024 11:19
@ebyhr

This comment was marked as resolved.

@wendigo
Copy link
Contributor

wendigo commented May 23, 2024

Failure in test-other-modules is related

@pajaks pajaks force-pushed the pajaks/csv_not_supported branch from 442e4de to f2d43c2 Compare May 23, 2024 11:53
@wendigo wendigo merged commit df454db into trinodb:master May 23, 2024
@github-actions github-actions bot added this to the 449 milestone May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants