public class FunctionHelper extends Object
Constructor | Description |
---|---|
FunctionHelper() |
Modifier and Type | Method | Description |
---|---|---|
static void |
arithmeticOperation(AbstractArithmeticOperation aOp,
DynamicContext dCtx,
TaggedValuePointable tvp1,
TaggedValuePointable tvp2,
org.apache.hyracks.data.std.api.IPointable result,
TypedPointables tp1,
TypedPointables tp2) |
|
static boolean |
arraysEqual(byte[] bytes1,
int offset1,
int length1,
byte[] bytes2,
int offset2,
int length2) |
|
static boolean |
arraysEqual(org.apache.hyracks.data.std.api.IPointable p1,
org.apache.hyracks.data.std.api.IPointable p2) |
|
static boolean |
compareTaggedValues(AbstractValueComparisonOperation aOp,
TaggedValuePointable tvp1,
TaggedValuePointable tvp2,
DynamicContext dCtx,
TypedPointables tp1,
TypedPointables tp2) |
|
static int |
getBaseTypeForArithmetics(int tid) |
|
static int |
getBaseTypeForComparisons(int tid) |
|
static int |
getBaseTypeForGeneralComparisons(int tid) |
|
static void |
getDoublePointable(TaggedValuePointable tvp,
DataOutput dOut,
TypedPointables tp) |
|
static void |
getIntegerPointable(TaggedValuePointable tvp,
DataOutput dOut,
TypedPointables tp) |
|
static int |
getLocalNodeId(TaggedValuePointable tvp1,
TypedPointables tp) |
Get the local node id from a tagged value pointable when available.
|
static int |
getNumberOfDigits(long value) |
Returns the number of digits in a long.
|
static long |
getPowerOf10(double value,
long max,
long min) |
|
static String |
getStringFromPointable(org.apache.hyracks.data.std.primitive.UTF8StringPointable stringp,
org.apache.hyracks.dataflow.common.comm.util.ByteBufferInputStream bbis,
DataInputStream di) |
|
static long |
getTimezone(ITimezone timezonep) |
|
static boolean |
isDerivedFromDouble(int tid) |
|
static boolean |
isDerivedFromInteger(int tid) |
|
static boolean |
isDerivedFromString(int tid) |
|
static boolean |
isNumberPostive(long value) |
Returns 0 if positive, nonzero if negative.
|
static void |
printUTF8String(org.apache.hyracks.data.std.primitive.UTF8StringPointable stringp) |
|
static void |
readInDocFromPointable(org.apache.hyracks.data.std.primitive.UTF8StringPointable stringp,
org.apache.hyracks.dataflow.common.comm.util.ByteBufferInputStream bbis,
DataInputStream di,
org.apache.hyracks.data.std.util.ArrayBackedValueStorage abvs,
XMLParser parser) |
|
static boolean |
transformThenCompareMinMaxTaggedValues(AbstractValueComparisonOperation aOp,
TaggedValuePointable tvp1,
TaggedValuePointable tvp2,
DynamicContext dCtx,
TypedPointables tp1,
TypedPointables tp2) |
|
static void |
writeChar(char c,
DataOutput dOut) |
|
static void |
writeCharArray(char[] ch,
int start,
int length,
DataOutput dOut) |
|
static void |
writeCharSequence(CharSequence charSequence,
DataOutput dOut) |
|
static void |
writeDateAsString(IDate date,
DataOutput dOut) |
|
static void |
writeNumberWithPadding(long value,
int padding,
DataOutput dOut) |
Writes a number to the DataOutput with zeros as place holders if the number is too small to fill the padding.
|
static void |
writeTimeAsString(ITime time,
DataOutput dOut) |
|
static void |
writeTimezoneAsString(ITimezone timezone,
DataOutput dOut) |
public static void arithmeticOperation(AbstractArithmeticOperation aOp, DynamicContext dCtx, TaggedValuePointable tvp1, TaggedValuePointable tvp2, org.apache.hyracks.data.std.api.IPointable result, TypedPointables tp1, TypedPointables tp2) throws SystemException
SystemException
public static boolean arraysEqual(org.apache.hyracks.data.std.api.IPointable p1, org.apache.hyracks.data.std.api.IPointable p2)
public static boolean arraysEqual(byte[] bytes1, int offset1, int length1, byte[] bytes2, int offset2, int length2)
public static boolean compareTaggedValues(AbstractValueComparisonOperation aOp, TaggedValuePointable tvp1, TaggedValuePointable tvp2, DynamicContext dCtx, TypedPointables tp1, TypedPointables tp2) throws SystemException
SystemException
public static int getBaseTypeForArithmetics(int tid) throws SystemException
SystemException
public static int getBaseTypeForComparisons(int tid) throws SystemException
SystemException
public static int getBaseTypeForGeneralComparisons(int tid) throws SystemException
SystemException
public static void getDoublePointable(TaggedValuePointable tvp, DataOutput dOut, TypedPointables tp) throws SystemException, IOException
SystemException
IOException
public static void getIntegerPointable(TaggedValuePointable tvp, DataOutput dOut, TypedPointables tp) throws SystemException, IOException
SystemException
IOException
public static int getLocalNodeId(TaggedValuePointable tvp1, TypedPointables tp)
tvp1
- pointabletp
- Typed pointablepublic static int getNumberOfDigits(long value)
value
- valuepublic static long getPowerOf10(double value, long max, long min)
public static String getStringFromPointable(org.apache.hyracks.data.std.primitive.UTF8StringPointable stringp, org.apache.hyracks.dataflow.common.comm.util.ByteBufferInputStream bbis, DataInputStream di) throws SystemException
SystemException
public static long getTimezone(ITimezone timezonep)
public static boolean isDerivedFromDouble(int tid)
public static boolean isDerivedFromInteger(int tid)
public static boolean isDerivedFromString(int tid)
public static boolean isNumberPostive(long value)
value
- valuepublic static void printUTF8String(org.apache.hyracks.data.std.primitive.UTF8StringPointable stringp)
public static void readInDocFromPointable(org.apache.hyracks.data.std.primitive.UTF8StringPointable stringp, org.apache.hyracks.dataflow.common.comm.util.ByteBufferInputStream bbis, DataInputStream di, org.apache.hyracks.data.std.util.ArrayBackedValueStorage abvs, XMLParser parser) throws org.apache.hyracks.api.exceptions.HyracksDataException
org.apache.hyracks.api.exceptions.HyracksDataException
public static boolean transformThenCompareMinMaxTaggedValues(AbstractValueComparisonOperation aOp, TaggedValuePointable tvp1, TaggedValuePointable tvp2, DynamicContext dCtx, TypedPointables tp1, TypedPointables tp2) throws SystemException
SystemException
public static void writeChar(char c, DataOutput dOut)
public static void writeCharSequence(CharSequence charSequence, DataOutput dOut)
public static void writeCharArray(char[] ch, int start, int length, DataOutput dOut)
public static void writeDateAsString(IDate date, DataOutput dOut)
public static void writeNumberWithPadding(long value, int padding, DataOutput dOut)
value
- valuepadding
- paddingdOut
- data outputpublic static void writeTimeAsString(ITime time, DataOutput dOut)
public static void writeTimezoneAsString(ITimezone timezone, DataOutput dOut)
Copyright © 2019 Apache Software Foundation. All rights reserved.