Xikui Wang created ASTERIXDB-1421:
-------------------------------------
Summary: Not-null attribute inserting problem.
Key: ASTERIXDB-1421
URL: https://issues.apache.org/jira/browse/ASTERIXDB-1421
Project: Apache AsterixDB
Issue Type: Bug
Reporter: Xikui Wang
Priority: Minor
When constructing record using data output, if assigning not-null
(non-optional) attribute null value(through code manipulating data output), for
other data type other than string, the record will not be stored to db. For
string type, and derived type, the record will be stored, and will cause
problem when trying to read record.
For the string case, UTF8Util will print the null value as \u0000, however,
when there are some non-null attributes result, it will cause exception at L60
UTF8StringUtil.java
For the derived data type case, the read record will cause exception at
{quote}
Caused by: java.lang.IllegalStateException: java.lang.IndexOutOfBoundsException
at
org.apache.asterix.om.pointables.ARecordVisitablePointable.set(ARecordVisitablePointable.java:266)
at
org.apache.asterix.dataflow.data.nontagged.printers.adm.ARecordPrinterFactory$1.print(ARecordPrinterFactory.java:65)
at
org.apache.hyracks.algebricks.runtime.writers.PrinterBasedWriterFactory$1.printTuple(PrinterBasedWriterFactory.java:66)
at
org.apache.hyracks.algebricks.runtime.serializer.ResultSerializerFactoryProvider$1$1.appendTuple(ResultSerializerFactoryProvider.java:64)
at
org.apache.hyracks.dataflow.std.result.ResultWriterOperatorDescriptor$1.nextFrame(ResultWriterOperatorDescriptor.java:101)
at
org.apache.hyracks.dataflow.common.comm.io.AbstractFrameAppender.write(AbstractFrameAppender.java:93)
at
org.apache.hyracks.algebricks.runtime.operators.base.AbstractOneInputOneOutputOneFramePushRuntime.flushAndReset(AbstractOneInputOneOutputOneFramePushRuntime.java:63)
at
org.apache.hyracks.algebricks.runtime.operators.base.AbstractOneInputOneOutputOneFramePushRuntime.flushIfNotFailed(AbstractOneInputOneOutputOneFramePushRuntime.java:69)
at
org.apache.hyracks.algebricks.runtime.operators.base.AbstractOneInputOneOutputOneFramePushRuntime.close(AbstractOneInputOneOutputOneFramePushRuntime.java:55)
at
org.apache.hyracks.algebricks.runtime.operators.std.StreamLimitRuntimeFactory$1.close(StreamLimitRuntimeFactory.java:136)
at
org.apache.hyracks.algebricks.runtime.operators.base.AbstractOneInputOneOutputOneFramePushRuntime.close(AbstractOneInputOneOutputOneFramePushRuntime.java:57)
at
org.apache.hyracks.algebricks.runtime.operators.meta.AlgebricksMetaOperatorDescriptor$2.close(AlgebricksMetaOperatorDescriptor.java:153)
at org.apache.hyracks.control.nc.Task.pushFrames(Task.java:356)
... 4 more
Caused by: java.lang.IndexOutOfBoundsException
at
org.apache.hyracks.data.std.util.ByteArrayAccessibleOutputStream.write(ByteArrayAccessibleOutputStream.java:73)
at java.io.DataOutputStream.write(DataOutputStream.java:107)
at
org.apache.asterix.om.pointables.ARecordVisitablePointable.set(ARecordVisitablePointable.java:225)
... 16 more
{quote}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)