[
https://issues.apache.org/jira/browse/DRILL-7960?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17568673#comment-17568673
]
ASF GitHub Bot commented on DRILL-7960:
---------------------------------------
jnturton commented on PR #2597:
URL: https://github.com/apache/drill/pull/2597#issuecomment-1189411225
> @jnturton, I meant the test case that reproduces the issue from the
ticket, when an error is thrown during creating a row set with results of the
query execution. It is also possible that we have other places which should be
updated.
The error in the ticket does arise from this column metadata code path.
There is no problem creating a row set of results themselves for the test
query, eg the test query runs fine over JDBC since this meta data code path is
not called then.
I can add another unit test that runs a SQL query including a UNION of
VARDECIMALs specifically through the REST API if that is better?
> Column metadata DECIMAL precision can exceed max supported value
> ----------------------------------------------------------------
>
> Key: DRILL-7960
> URL: https://issues.apache.org/jira/browse/DRILL-7960
> Project: Apache Drill
> Issue Type: Bug
> Components: Client - HTTP
> Affects Versions: 1.20.0
> Environment: Drill in Docker
> Parquet Files with VARDECIMAL(29,6)
>
> Reporter: Nick Stenroos-Dam
> Assignee: James Turton
> Priority: Major
> Fix For: 1.20.2
>
>
> We are using a lot of decimals in our data and keep running into issues.
> The latest issue is this error message:
> {code:java}
> SYSTEM ERROR: Drill Remote Exception
> Please, refer to logs for more information.
> (java.lang.IllegalArgumentException) VARDECIMAL(40, 6) exceeds maximum
> suppored precision of 38
> org.apache.drill.exec.record.metadata.MetadataUtils.newDecimal():228
> org.apache.drill.exec.record.metadata.MetadataUtils.fromField():66
>
> org.apache.drill.exec.physical.resultSet.model.single.SingleSchemaInference.inferVector():86
>
> org.apache.drill.exec.physical.resultSet.model.single.SingleSchemaInference.infer():64
> org.apache.drill.exec.physical.rowSet.DirectRowSet.fromContainer():80
>
> org.apache.drill.exec.physical.resultSet.impl.PushResultSetReaderImpl.createRowSet():100
>
> org.apache.drill.exec.physical.resultSet.impl.PushResultSetReaderImpl.start():85
>
> org.apache.drill.exec.server.rest.stream.StreamingHttpConnection.sendData():116
> org.apache.drill.exec.ops.AccountingUserConnection.sendData():43
> org.apache.drill.exec.physical.impl.ScreenCreator$ScreenRoot.innerNext():106
> org.apache.drill.exec.physical.impl.BaseRootExec.next():93
> org.apache.drill.exec.work.fragment.FragmentExecutor$1.run():323
> org.apache.drill.exec.work.fragment.FragmentExecutor$1.run():310
> .......():0
> org.apache.hadoop.security.UserGroupInformation.doAs():1762
> org.apache.drill.exec.work.fragment.FragmentExecutor.run():310
> org.apache.drill.common.SelfCleaningRunnable.run():38
> .......():0
> {code}
> I have now been able to reproduce the issue.
> Apparently the issue only occurs when using the Web API (query.json) and not
> the Web interface.
> To reproduce the issue run
> {code:java}
> curl -X POST http://localhost:8047/query.json -d '{ "queryType": "SQL",
> "query": "SELECT CAST(10 AS DECIMAL(38, 4)) AS `Col1`\nUNION ALL \nSELECT
> CAST(22 AS DECIMAL(29, 6)) AS `Col1`", "autoLimit": null, "defaultSchema":
> "data" }' -H 'Content-Type: application/json'{code}
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)