@@ -545,6 +545,9 @@ class TableStats(object):
545
545
def __init__ (self ):
546
546
self .partitions = None
547
547
self .store_size = 0
548
+ self .rows_estimate = 0
549
+ self .creation_time = None
550
+ self .modification_time = None
548
551
549
552
def with_store_size (self , store_size ):
550
553
self .store_size = store_size
@@ -554,6 +557,18 @@ def with_partitions(self, partitions):
554
557
self .partitions = partitions
555
558
return self
556
559
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
+
557
572
558
573
class ReadReplicasSettings (object ):
559
574
def __init__ (self ):
@@ -1577,7 +1592,22 @@ def __init__(
1577
1592
1578
1593
self .table_stats = None
1579
1594
if table_stats is not None :
1595
+ from ._grpc .grpcwrapper .common_utils import datetime_from_proto_timestamp
1596
+
1580
1597
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
+
1581
1611
if table_stats .partitions != 0 :
1582
1612
self .table_stats = self .table_stats .with_partitions (table_stats .partitions )
1583
1613
0 commit comments