amrishlal commented on pull request #8243:
URL: https://github.com/apache/pinot/pull/8243#issuecomment-1049508906


   We are trying to support offline ingestion. Transforming avro file 
containing complex types into a Pinot segment containing JSON column. The test 
case JsonIngestionFromAvroQueriesTest mimics our offline ingestion usecase 
well. cc: @jackjlli.
   
   > Where exactly is the error thrown? Can you share the exception trace?
   
   If you run the test case from this PR without any of the other changes, the 
following exception given below is produced. The changes in the PR is for 
making the test case pass.
   
   ```
   java.lang.RuntimeException: Caught exception while transforming data type 
for column: jsonColumn
   
        at 
org.apache.pinot.segment.local.recordtransformer.DataTypeTransformer.transform(DataTypeTransformer.java:95)
        at 
org.apache.pinot.segment.local.recordtransformer.CompositeTransformer.transform(CompositeTransformer.java:83)
        at 
org.apache.pinot.segment.local.segment.creator.RecordReaderSegmentCreationDataSource.gatherStats(RecordReaderSegmentCreationDataSource.java:80)
        at 
org.apache.pinot.segment.local.segment.creator.RecordReaderSegmentCreationDataSource.gatherStats(RecordReaderSegmentCreationDataSource.java:42)
        at 
org.apache.pinot.segment.local.segment.creator.impl.SegmentIndexCreationDriverImpl.init(SegmentIndexCreationDriverImpl.java:173)
        at 
org.apache.pinot.segment.local.segment.creator.impl.SegmentIndexCreationDriverImpl.init(SegmentIndexCreationDriverImpl.java:155)
        at 
org.apache.pinot.queries.JsonIngestionFromAvroQueriesTest.setUp(JsonIngestionFromAvroQueriesTest.java:200)
        at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at 
org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:108)
        at 
org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:523)
        at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:224)
        at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:146)
        at 
org.testng.internal.TestMethodWorker.invokeBeforeClassMethods(TestMethodWorker.java:166)
        at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:105)
        at org.testng.TestRunner.privateRun(TestRunner.java:744)
        at org.testng.TestRunner.run(TestRunner.java:602)
        at org.testng.SuiteRunner.runTest(SuiteRunner.java:380)
        at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:375)
        at org.testng.SuiteRunner.privateRun(SuiteRunner.java:340)
        at org.testng.SuiteRunner.run(SuiteRunner.java:289)
        at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
        at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
        at org.testng.TestNG.runSuitesSequentially(TestNG.java:1301)
        at org.testng.TestNG.runSuitesLocally(TestNG.java:1226)
        at org.testng.TestNG.runSuites(TestNG.java:1144)
        at org.testng.TestNG.run(TestNG.java:1115)
        at com.intellij.rt.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:66)
        at 
com.intellij.rt.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:109)
   Caused by: java.lang.IllegalArgumentException: Cannot read single-value from 
Object[]: [this, is, a, test] for column: jsonColumn
        at 
org.apache.pinot.segment.local.recordtransformer.DataTypeTransformer.standardize(DataTypeTransformer.java:145)
        at 
org.apache.pinot.segment.local.recordtransformer.DataTypeTransformer.transform(DataTypeTransformer.java:63)
        ... 30 more
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to