This method can be used as a user defined function to aid the querying binary values.
This method can be used as a user defined function to aid the querying binary values.
Usage example:
sqlContext.udf.register("Binary", udf.binary _) df.filter(s"binary = Binary('$base64')")
the base 64 string that represents a binary value
a fieldType that can be used to query against
This method can be used as a user defined function to aid the querying of binary values that contain a sub type.
This method can be used as a user defined function to aid the querying of binary values that contain a sub type.
Usage example:
sqlContext.udf.register("BinaryWithSubType", udf.binaryWithSubType _) df.filter(s"binaryWithSubType = BinaryWithSubType($subType, '$base64')")
the binary sub type
the base 64 string that represents a binary value
a fieldType that can be used to query against
This method can be used as a user defined function to aid the querying of DbPointer values.
This method can be used as a user defined function to aid the querying of DbPointer values.
Usage example:
sqlContext.udf.register("DbPointer", udf.dbPointer _) df.filter(s"dbPointer = DbPointer('$ref', '$oid')")
the namespace string
the ObjectId string
a fieldType that can be used to query against
This method can be used as a user defined function to aid the querying of JavaScript values.
This method can be used as a user defined function to aid the querying of JavaScript values.
Usage example:
sqlContext.udf.register("JavaScript", udf.javaScript _) df.filter(s"code = JavaScript('$code')")
the JavaScript code
a fieldType that can be used to query against
This method can be used as a user defined function to aid the querying of JavaScript with scope values.
This method can be used as a user defined function to aid the querying of JavaScript with scope values.
Usage example:
sqlContext.udf.register("JavaScript", udf.javaScriptWithScope _) df.filter(s"codeWithScope = JavaScript('$code', '$scope')")
the JavaScript code
the Json representation of the scope
a fieldType that can be used to query against
This method can be used as a user defined function to aid the querying of maxKey values.
This method can be used as a user defined function to aid the querying of maxKey values.
Usage example:
sqlContext.udf.register("maxKey", udf.maxKey _) df.filter(s"maxKey = maxKey()")
a fieldType that can be used to query against
This method can be used as a user defined function to aid the querying of minKey values.
This method can be used as a user defined function to aid the querying of minKey values.
Usage example:
sqlContext.udf.register("minKey", udf.minKey _) df.filter(s"minKey = minKey()")
a fieldType that can be used to query against
This method can be used as a user defined function to aid the querying of ObjectId values.
This method can be used as a user defined function to aid the querying of ObjectId values.
Usage example:
sqlContext.udf.register("ObjectId", udf.objectId _) df.filter(s"objectId = ObjectId('$oid')")
the ObjectId string
a fieldType that can be used to query against
This method can be used as a user defined function to aid the querying of regular expression values.
This method can be used as a user defined function to aid the querying of regular expression values.
Usage example:
sqlContext.udf.register("Regex", udf.regularExpression _) df.filter(s"regex = Regex('$regex')")
the regular expression string
a fieldType that can be used to query against
This method can be used as a user defined function to aid the querying of regular expression values with options.
This method can be used as a user defined function to aid the querying of regular expression values with options.
Usage example:
sqlContext.udf.register("Regex", udf.regularExpressionWithOptions _) df.filter(s"regexWithOptions = Regex('$regex', '$options')")
the regular expression string
the options
a fieldType that can be used to query against
This method can be used as a user defined function to aid the querying of Symbol values.
This method can be used as a user defined function to aid the querying of Symbol values.
Usage example:
sqlContext.udf.register("Symbol", udf.symbol _) df.filter(s"symbol = Symbol('$symbol')")
the symbol
a fieldType that can be used to query against
This method can be used as a user defined function to aid the querying of Timestamp values.
This method can be used as a user defined function to aid the querying of Timestamp values.
Usage example:
sqlContext.udf.register("Timestamp", udf.timestamp _) df.filter(s"timestamp = Timestamp($time, $inc)")
the time in seconds since epoch
an incrementing ordinal for operations within a given second
a fieldType that can be used to query against
The udf package provides User Defined Functions that can be used to support querying unsupported Bson Types in Spark.
The unsupported types follow the MongoDB Extended Json format.
1.1.0
the StructFields helpers which convert unsupported bson types into
StructTypes
so that they can be queried