@@ -617,7 +617,32 @@ func (c *connectionImpl) getTableSchemaWithFilter(ctx context.Context, catalog *
617
617
metadata ["MaterializedView.Query" ] = md .MaterializedView .Query
618
618
metadata ["MaterializedView.RefreshInterval" ] = md .MaterializedView .RefreshInterval .String ()
619
619
metadata ["MaterializedView.AllowNonIncrementalDefinition" ] = strconv .FormatBool (md .MaterializedView .AllowNonIncrementalDefinition )
620
- metadata ["MaterializedView.MaxStaleness" ] = md .MaxStaleness .String ()
620
+ if md .MaxStaleness != nil {
621
+ metadata ["MaterializedView.MaxStaleness" ] = md .MaxStaleness .String ()
622
+ }
623
+ }
624
+ if md .TimePartitioning != nil {
625
+ // "DAY", "HOUR", "MONTH", "YEAR"
626
+ metadata ["TimePartitioning.Type" ] = string (md .TimePartitioning .Type )
627
+ if md .TimePartitioning .Expiration != 0 {
628
+ metadata ["TimePartitioning.Expiration" ] = md .TimePartitioning .Expiration .String ()
629
+ }
630
+ if md .TimePartitioning .Field != "" {
631
+ metadata ["TimePartitioning.Field" ] = md .TimePartitioning .Field
632
+ }
633
+ }
634
+ if md .RangePartitioning != nil {
635
+ if md .RangePartitioning .Field != "" {
636
+ metadata ["RangePartitioning.Field" ] = md .RangePartitioning .Field
637
+ }
638
+ if md .RangePartitioning .Range != nil {
639
+ metadata ["RangePartitioning.Range.Start" ] = strconv .FormatInt (md .RangePartitioning .Range .Start , 10 )
640
+ metadata ["RangePartitioning.Range.End" ] = strconv .FormatInt (md .RangePartitioning .Range .End , 10 )
641
+ metadata ["RangePartitioning.Range.Interval" ] = strconv .FormatInt (md .RangePartitioning .Range .Interval , 10 )
642
+ }
643
+ }
644
+ if md .RequirePartitionFilter {
645
+ metadata ["RequirePartitionFilter" ] = strconv .FormatBool (md .RequirePartitionFilter )
621
646
}
622
647
labels := ""
623
648
if len (md .Labels ) > 0 {
0 commit comments