[
https://issues.apache.org/jira/browse/DRILL-5248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15861921#comment-15861921
]
Aman Sinha commented on DRILL-5248:
-----------------------------------
Not sure if this will help but can you try the following option:
{noformat}
alter session set `store.mongo.read_numbers_as_double` = true;
{noformat}
> You tried to write a VarChar type when you are
> ------------------------------------------------
>
> Key: DRILL-5248
> URL: https://issues.apache.org/jira/browse/DRILL-5248
> Project: Apache Drill
> Issue Type: Bug
> Components: Client - JDBC, Storage - MongoDB
> Reporter: Prasengupta
> Priority: Blocker
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> We have weird problem while executing the query. below is the exception where
> we are facing the issue, the weird part is we can execute the same query
> while we are configuring the dev mongo database, we are only facing issue
> when we configure the production Mongo db, Could you please help us on this
> immediately.
> Query :
> SELECT q.productDetails.quantity from mongo.LAM.`Quotes` as q
> DATA_READ ERROR: You tried to write a VarChar type when you are using a
> ValueWriter of type NullableFloat8WriterImpl.
> Line 1
> Column 208
> Field quantity
> Fragment 0:0
> [Error Id: e13ab75b-b915-410b-8af8-50cd0bcacebe on FNB-127:31010]
> class java.sql.SQLException
> org.apache.drill.jdbc.impl.DrillCursor.nextRowInternally(DrillCursor.java:232)
> org.apache.drill.jdbc.impl.DrillCursor.loadInitialSchema(DrillCursor.java:275)
> org.apache.drill.jdbc.impl.DrillResultSetImpl.execute(DrillResultSetImpl.java:1943)
> org.apache.drill.jdbc.impl.DrillResultSetImpl.execute(DrillResultSetImpl.java:76)
> oadd.org.apache.calcite.avatica.AvaticaConnection$1.execute(AvaticaConnection.java:473)
> org.apache.drill.jdbc.impl.DrillMetaImpl.prepareAndExecute(DrillMetaImpl.java:465)
> oadd.org.apache.calcite.avatica.AvaticaConnection.prepareAndExecuteInternal(AvaticaConnection.java:477)
> org.apache.drill.jdbc.impl.DrillConnectionImpl.prepareAndExecuteInternal(DrillConnectionImpl.java:169)
> oadd.org.apache.calcite.avatica.AvaticaStatement.executeInternal(AvaticaStatement.java:109)
> oadd.org.apache.calcite.avatica.AvaticaStatement.execute(AvaticaStatement.java:121)
> org.apache.drill.jdbc.impl.DrillStatementImpl.execute(DrillStatementImpl.java:101)
> org.apache.zeppelin.jdbc.JDBCInterpreter.executeSql(JDBCInterpreter.java:322)
> org.apache.zeppelin.jdbc.JDBCInterpreter.interpret(JDBCInterpreter.java:408)
> org.apache.zeppelin.interpreter.LazyOpenInterpreter.interpret(LazyOpenInterpreter.java:94)
> org.apache.zeppelin.interpreter.remote.RemoteInterpreterServer$InterpretJob.jobRun(RemoteInterpreterServer.java:341)
> org.apache.zeppelin.scheduler.Job.run(Job.java:176)
> org.apache.zeppelin.scheduler.ParallelScheduler$JobRunner.run(ParallelScheduler.java:162)
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> java.util.concurrent.FutureTask.run(FutureTask.java:266)
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> java.lang.Thread.run(Thread.java:745)
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)