@@ -607,6 +607,16 @@ object functions {
607
607
def grouping_id (colName : String , colNames : String * ): Column =
608
608
grouping_id((Seq (colName) ++ colNames).map(n => Column (n)): _* )
609
609
610
+ /**
611
+ * Aggregate function: returns the updatable binary representation of the Datasketches HllSketch
612
+ * configured with lgConfigK arg.
613
+ *
614
+ * @group agg_funcs
615
+ * @since 3.5.0
616
+ */
617
+ def hll_sketch_agg (e : Column , lgConfigK : Column ): Column =
618
+ Column .fn(" hll_sketch_agg" , e, lgConfigK)
619
+
610
620
/**
611
621
* Aggregate function: returns the updatable binary representation of the Datasketches HllSketch
612
622
* configured with lgConfigK arg.
@@ -646,6 +656,18 @@ object functions {
646
656
*/
647
657
def hll_sketch_agg (columnName : String ): Column = hll_sketch_agg(Column (columnName))
648
658
659
+ /**
660
+ * Aggregate function: returns the updatable binary representation of the Datasketches
661
+ * HllSketch, generated by merging previously created Datasketches HllSketch instances via a
662
+ * Datasketches Union instance. Throws an exception if sketches have different lgConfigK values
663
+ * and allowDifferentLgConfigK is set to false.
664
+ *
665
+ * @group agg_funcs
666
+ * @since 3.5.0
667
+ */
668
+ def hll_union_agg (e : Column , allowDifferentLgConfigK : Column ): Column =
669
+ Column .fn(" hll_union_agg" , e, allowDifferentLgConfigK)
670
+
649
671
/**
650
672
* Aggregate function: returns the updatable binary representation of the Datasketches
651
673
* HllSketch, generated by merging previously created Datasketches HllSketch instances via a
@@ -3491,6 +3513,72 @@ object functions {
3491
3513
def aes_decrypt (input : Column , key : Column ): Column =
3492
3514
Column .fn(" aes_encrypt" , input, key)
3493
3515
3516
+ /**
3517
+ * This is a special version of `aes_decrypt` that performs the same operation, but returns a
3518
+ * NULL value instead of raising an error if the decryption cannot be performed.
3519
+ *
3520
+ * @param input
3521
+ * The binary value to decrypt.
3522
+ * @param key
3523
+ * The passphrase to use to decrypt the data.
3524
+ * @param mode
3525
+ * Specifies which block cipher mode should be used to decrypt messages. Valid modes: ECB,
3526
+ * GCM, CBC.
3527
+ * @param padding
3528
+ * Specifies how to pad messages whose length is not a multiple of the block size. Valid
3529
+ * values: PKCS, NONE, DEFAULT. The DEFAULT padding means PKCS for ECB, NONE for GCM and PKCS
3530
+ * for CBC.
3531
+ * @param aad
3532
+ * Optional additional authenticated data. Only supported for GCM mode. This can be any
3533
+ * free-form input and must be provided for both encryption and decryption.
3534
+ *
3535
+ * @group misc_funcs
3536
+ * @since 3.5.0
3537
+ */
3538
+ def try_aes_decrypt (
3539
+ input : Column ,
3540
+ key : Column ,
3541
+ mode : Column ,
3542
+ padding : Column ,
3543
+ aad : Column ): Column =
3544
+ Column .fn(" try_aes_decrypt" , input, key, mode, padding, aad)
3545
+
3546
+ /**
3547
+ * Returns a decrypted value of `input`.
3548
+ *
3549
+ * @see
3550
+ * `org.apache.spark.sql.functions.try_aes_decrypt(Column, Column, Column, Column, Column)`
3551
+ *
3552
+ * @group misc_funcs
3553
+ * @since 3.5.0
3554
+ */
3555
+ def try_aes_decrypt (input : Column , key : Column , mode : Column , padding : Column ): Column =
3556
+ Column .fn(" try_aes_decrypt" , input, key, mode, padding)
3557
+
3558
+ /**
3559
+ * Returns a decrypted value of `input`.
3560
+ *
3561
+ * @see
3562
+ * `org.apache.spark.sql.functions.try_aes_decrypt(Column, Column, Column, Column, Column)`
3563
+ *
3564
+ * @group misc_funcs
3565
+ * @since 3.5.0
3566
+ */
3567
+ def try_aes_decrypt (input : Column , key : Column , mode : Column ): Column =
3568
+ Column .fn(" try_aes_decrypt" , input, key, mode)
3569
+
3570
+ /**
3571
+ * Returns a decrypted value of `input`.
3572
+ *
3573
+ * @see
3574
+ * `org.apache.spark.sql.functions.try_aes_decrypt(Column, Column, Column, Column, Column)`
3575
+ *
3576
+ * @group misc_funcs
3577
+ * @since 3.5.0
3578
+ */
3579
+ def try_aes_decrypt (input : Column , key : Column ): Column =
3580
+ Column .fn(" try_aes_decrypt" , input, key)
3581
+
3494
3582
/**
3495
3583
* Returns a sha1 hash value as a hex string of the `col`.
3496
3584
*
@@ -4192,6 +4280,33 @@ object functions {
4192
4280
*/
4193
4281
def to_char (e : Column , format : Column ): Column = Column .fn(" to_char" , e, format)
4194
4282
4283
+ /**
4284
+ * Convert `e` to a string based on the `format`. Throws an exception if the conversion fails.
4285
+ *
4286
+ * @param e
4287
+ * A column of number to be converted
4288
+ * @param format
4289
+ * The format can consist of the following characters, case insensitive: <ul> <li> '0' or '9':
4290
+ * Specifies an expected digit between 0 and 9. A sequence of 0 or 9 in the format string
4291
+ * matches a sequence of digits in the input value, generating a result string of the same
4292
+ * length as the corresponding sequence in the format string. The result string is left-padded
4293
+ * with zeros if the 0/9 sequence comprises more digits than the matching part of the decimal
4294
+ * value, starts with 0, and is before the decimal point. Otherwise, it is padded with
4295
+ * spaces.</li> <li>'.' or 'D': Specifies the position of the decimal point (optional, only
4296
+ * allowed once).</li> <li>',' or 'G': Specifies the position of the grouping (thousands)
4297
+ * separator (,). There must be a 0 or 9 to the left and right of each grouping
4298
+ * separator.</li> <li>'$': Specifies the location of the $ currency sign. This character may
4299
+ * only be specified once.</li> <li>'S' or 'MI': Specifies the position of a '-' or '+' sign
4300
+ * (optional, only allowed once at the beginning or end of the format string). Note that 'S'
4301
+ * prints '+' for positive values but 'MI' prints a space.</li> <li>'PR': Only allowed at the
4302
+ * end of the format string; specifies that the result string will be wrapped by angle
4303
+ * brackets if the input value is negative.</li> </ul>
4304
+ *
4305
+ * @group string_funcs
4306
+ * @since 3.5.0
4307
+ */
4308
+ def to_varchar (e : Column , format : Column ): Column = Column .fn(" to_varchar" , e, format)
4309
+
4195
4310
/**
4196
4311
* Convert string 'e' to a number based on the string format 'format'. Throws an exception if
4197
4312
* the conversion fails.
0 commit comments