@@ -598,6 +598,160 @@ def flatten(
598598 )
599599 return self ._to_series (cast (series .Series , result ))
600600
601+ def bool_ (
602+ self ,
603+ * ,
604+ session : Optional [bigframes .session .Session ] = None ,
605+ ) -> S :
606+ """Converts a JSON boolean to a SQL BOOL value."""
607+ from bigframes .operations .googlesql .global_namespace .conversion import (
608+ bool_ as bool__impl ,
609+ )
610+
611+ bf_series = self ._bf_from_series (session )
612+ result = bool__impl (
613+ bf_series ,
614+ )
615+ return self ._to_series (cast (series .Series , result ))
616+
617+ def double (
618+ self ,
619+ wide_number_mode : Union [
620+ series .Series ,
621+ bigframes .core .col .Expression ,
622+ Union [Literal [sentinels .Sentinel .ARGUMENT_DEFAULT ], str ],
623+ ] = sentinels .Sentinel .ARGUMENT_DEFAULT ,
624+ * ,
625+ session : Optional [bigframes .session .Session ] = None ,
626+ ) -> S :
627+ """Converts a JSON number to a SQL FLOAT64 value."""
628+ from bigframes .operations .googlesql .global_namespace .conversion import (
629+ double as double_impl ,
630+ )
631+
632+ # Resolve session from other arguments if not passed
633+ if session is None :
634+ import bigframes .core .googlesql as googlesql
635+
636+ session = googlesql ._find_session (
637+ wide_number_mode ,
638+ )
639+
640+ bf_series = self ._bf_from_series (session )
641+ result = double_impl (
642+ bf_series ,
643+ wide_number_mode ,
644+ )
645+ return self ._to_series (cast (series .Series , result ))
646+
647+ def float64 (
648+ self ,
649+ wide_number_mode : Union [
650+ series .Series ,
651+ bigframes .core .col .Expression ,
652+ Union [Literal [sentinels .Sentinel .ARGUMENT_DEFAULT ], str ],
653+ ] = sentinels .Sentinel .ARGUMENT_DEFAULT ,
654+ * ,
655+ session : Optional [bigframes .session .Session ] = None ,
656+ ) -> S :
657+ """Converts a JSON number to a SQL FLOAT64 value."""
658+ from bigframes .operations .googlesql .global_namespace .conversion import (
659+ float64 as float64_impl ,
660+ )
661+
662+ # Resolve session from other arguments if not passed
663+ if session is None :
664+ import bigframes .core .googlesql as googlesql
665+
666+ session = googlesql ._find_session (
667+ wide_number_mode ,
668+ )
669+
670+ bf_series = self ._bf_from_series (session )
671+ result = float64_impl (
672+ bf_series ,
673+ wide_number_mode ,
674+ )
675+ return self ._to_series (cast (series .Series , result ))
676+
677+ def int64 (
678+ self ,
679+ * ,
680+ session : Optional [bigframes .session .Session ] = None ,
681+ ) -> S :
682+ """Converts a JSON number to a SQL INT64 value."""
683+ from bigframes .operations .googlesql .global_namespace .conversion import (
684+ int64 as int64_impl ,
685+ )
686+
687+ bf_series = self ._bf_from_series (session )
688+ result = int64_impl (
689+ bf_series ,
690+ )
691+ return self ._to_series (cast (series .Series , result ))
692+
693+ def parse_bignumeric (
694+ self ,
695+ * ,
696+ session : Optional [bigframes .session .Session ] = None ,
697+ ) -> S :
698+ """Converts a STRING to a BIGNUMERIC value."""
699+ from bigframes .operations .googlesql .global_namespace .conversion import (
700+ parse_bignumeric as parse_bignumeric_impl ,
701+ )
702+
703+ bf_series = self ._bf_from_series (session )
704+ result = parse_bignumeric_impl (
705+ bf_series ,
706+ )
707+ return self ._to_series (cast (series .Series , result ))
708+
709+ def parse_numeric (
710+ self ,
711+ * ,
712+ session : Optional [bigframes .session .Session ] = None ,
713+ ) -> S :
714+ """Converts a STRING to a NUMERIC value."""
715+ from bigframes .operations .googlesql .global_namespace .conversion import (
716+ parse_numeric as parse_numeric_impl ,
717+ )
718+
719+ bf_series = self ._bf_from_series (session )
720+ result = parse_numeric_impl (
721+ bf_series ,
722+ )
723+ return self ._to_series (cast (series .Series , result ))
724+
725+ def string (
726+ self ,
727+ timezone : Union [
728+ series .Series ,
729+ bigframes .core .col .Expression ,
730+ Union [Literal [sentinels .Sentinel .ARGUMENT_DEFAULT ], str ],
731+ ] = sentinels .Sentinel .ARGUMENT_DEFAULT ,
732+ * ,
733+ session : Optional [bigframes .session .Session ] = None ,
734+ ) -> S :
735+ """Converts a value to a STRING value."""
736+ from bigframes .operations .googlesql .global_namespace .conversion import (
737+ string as string_impl ,
738+ )
739+
740+ # Resolve session from other arguments if not passed
741+ if session is None :
742+ import bigframes .core .googlesql as googlesql
743+
744+ session = googlesql ._find_session (
745+ timezone ,
746+ )
747+
748+ bf_series = self ._bf_from_series (session )
749+ result = string_impl (
750+ bf_series ,
751+ timezone ,
752+ )
753+ return self ._to_series (cast (series .Series , result ))
754+
601755
602756class AeadSeriesAccessor (AbstractBigQuerySeriesAccessor [S ]):
603757 """Series accessor for BigQuery aead functions."""
0 commit comments