class NaiveEncoder extends BytesEncoder with Logging
This is the naive non-order preserving encoder/decoder. Due to the inconsistency of the order between java primitive types and their bytearray. The data type has to be passed in so that the filter can work correctly, which is done by wrapping the type into the first byte of the serialized array.
- Annotations
- @Private()
- Alphabetic
- By Inheritance
- NaiveEncoder
- Logging
- BytesEncoder
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new NaiveEncoder()
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val BinaryEnc: Byte
- val BooleanEnc: Byte
- val DoubleEnc: Byte
- val FloatEnc: Byte
- val IntEnc: Byte
- val LongEnc: Byte
- val ShortEnc: Byte
- val StringEnc: Byte
- val TimestampEnc: Byte
- val UnknownEnc: Byte
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
- var code: Int
- def compare(c: Int, ops: JavaBytesEncoder): Boolean
-
def
encode(dt: DataType, value: Any): Array[Byte]
encode the data type into byte array.
encode the data type into byte array. Note that it is a naive implementation with the data type byte appending to the head of the serialized byte array.
- returns
the byte array with the first byte indicating the data type.
- Definition Classes
- NaiveEncoder → BytesEncoder
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
filter(input: Array[Byte], offset1: Int, length1: Int, filterBytes: Array[Byte], offset2: Int, length2: Int, ops: JavaBytesEncoder): Boolean
The function performing real filtering operations.
The function performing real filtering operations. The format of filterBytes depends on the implementation of the BytesEncoder.
- returns
true: the record satisfies the predicates false: the record does not satisfy the predicates.
- Definition Classes
- NaiveEncoder → BytesEncoder
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
initializeLogIfNecessary(isInterpreter: Boolean, silent: Boolean): Boolean
- Attributes
- protected
- Definition Classes
- Logging
-
def
initializeLogIfNecessary(isInterpreter: Boolean): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isTraceEnabled(): Boolean
- Attributes
- protected
- Definition Classes
- Logging
-
def
log: Logger
- Attributes
- protected
- Definition Classes
- Logging
-
def
logDebug(msg: ⇒ String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logDebug(msg: ⇒ String): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logError(msg: ⇒ String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logError(msg: ⇒ String): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logInfo(msg: ⇒ String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logInfo(msg: ⇒ String): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logName: String
- Attributes
- protected
- Definition Classes
- Logging
-
def
logTrace(msg: ⇒ String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logTrace(msg: ⇒ String): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logWarning(msg: ⇒ String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logWarning(msg: ⇒ String): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def nextCode: Byte
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
ranges(in: Any): Option[BoundRanges]
Evaluate the java primitive type and return the BoundRanges.
Evaluate the java primitive type and return the BoundRanges. For one value, it may have multiple output ranges because of the inconsistency of order between java primitive type and its byte array order.
For short, integer, and long, the order of number is consistent with byte array order if two number has the same sign bit. But the negative number is larger than positive number in byte array.
For double and float, the order of positive number is consistent with its byte array order. But the order of negative number is the reverse order of byte array. Please refer to IEEE-754 and https://en.wikipedia.org/wiki/Single-precision_floating-point_format
- Definition Classes
- NaiveEncoder → BytesEncoder
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()