@@ -545,6 +545,9 @@ class TableStats(object):
545545 def __init__ (self ):
546546 self .partitions = None
547547 self .store_size = 0
548+ self .rows_estimate = 0
549+ self .creation_time = None
550+ self .modification_time = None
548551
549552 def with_store_size (self , store_size ):
550553 self .store_size = store_size
@@ -554,6 +557,18 @@ def with_partitions(self, partitions):
554557 self .partitions = partitions
555558 return self
556559
560+ def with_rows_estimate (self , rows_estimate ):
561+ self .rows_estimate = rows_estimate
562+ return self
563+
564+ def with_creation_time (self , creation_time ):
565+ self .creation_time = creation_time
566+ return self
567+
568+ def with_modification_time (self , modification_time ):
569+ self .modification_time = modification_time
570+ return self
571+
557572
558573class ReadReplicasSettings (object ):
559574 def __init__ (self ):
@@ -1577,7 +1592,22 @@ def __init__(
15771592
15781593 self .table_stats = None
15791594 if table_stats is not None :
1595+ from ._grpc .grpcwrapper .common_utils import datetime_from_proto_timestamp
1596+
15801597 self .table_stats = TableStats ()
1598+ if table_stats .creation_time :
1599+ self .table_stats = self .table_stats .with_creation_time (
1600+ datetime_from_proto_timestamp (table_stats .creation_time )
1601+ )
1602+
1603+ if table_stats .modification_time :
1604+ self .table_stats = self .table_stats .with_modification_time (
1605+ datetime_from_proto_timestamp (table_stats .modification_time )
1606+ )
1607+
1608+ if table_stats .rows_estimate != 0 :
1609+ self .table_stats = self .table_stats .with_rows_estimate (table_stats .rows_estimate )
1610+
15811611 if table_stats .partitions != 0 :
15821612 self .table_stats = self .table_stats .with_partitions (table_stats .partitions )
15831613
0 commit comments