prestodb / presto

The official home of the Presto distributed SQL query engine for big data
http://prestodb.io
Apache License 2.0
15.97k stars 5.35k forks source link

Support for Apache Pinot BIG_DECIMAL data type #21459

Open cvinacuasonoc opened 10 months ago

cvinacuasonoc commented 10 months ago

Presto does not support Pinot data type BIG_DECIMAL. When a column is found with this data type, Presto fails with this message:

com.facebook.presto.pinot.PinotException: Cannot fetch from cache <table name>
  com.fasterxml.jackson.databind.JsonMappingException: Unsupported dimension/time data type: BIG_DECIMAL

Expected Behavior or Use Case

I would expect this fields to be mapped as Java BigDecimal

Presto Component, Service, or Connector

This behavior affects to the Pinot Connector

Possible Implementation

I guess, it can be mapped as a Java BigDecimal

Example Screenshots (if appropriate):

Context

BigDecimal data types are needed for monetary amounts where you want a decimal representation of the decimal places not a binary representation that may be different. Those monetary amounts also need decimal operations in base 10.

yyy1000 commented 10 months ago

I'd like a try to help with it.

Akanksha-kedia commented 10 months ago

i would like to work on this.

Akanksha-kedia commented 10 months ago

Even though BIG_DECIMAL can be mapped to BigDecimal in Java, it's about how Presto can understand and process the BIG_DECIMAL data type from your Pinot database.

Akanksha-kedia commented 10 months ago

Even though BIG_DECIMAL can be mapped to BigDecimal in Java, it's about how Presto can understand and process the BIG_DECIMAL data type from your Pinot database.

@tdcmeehan ?