@@ -10,6 +10,7 @@ import (
10
10
"github.com/stretchr/testify/require"
11
11
12
12
"github.com/grafana/loki/v3/pkg/dataobj"
13
+ "github.com/grafana/loki/v3/pkg/engine/internal/datatype"
13
14
"github.com/grafana/loki/v3/pkg/engine/internal/types"
14
15
"github.com/grafana/loki/v3/pkg/engine/planner/physical"
15
16
"github.com/grafana/loki/v3/pkg/logproto"
@@ -20,7 +21,6 @@ import (
20
21
var (
21
22
labelMD = buildMetadata (types .ColumnTypeLabel )
22
23
metadataMD = buildMetadata (types .ColumnTypeMetadata )
23
- builtinMD = buildMetadata (types .ColumnTypeBuiltin )
24
24
)
25
25
26
26
func buildMetadata (ty types.ColumnType ) arrow.Metadata {
@@ -77,8 +77,8 @@ func Test_dataobjScan(t *testing.T) {
77
77
{Name : "service" , Type : arrow .BinaryTypes .String , Metadata : labelMD , Nullable : true },
78
78
{Name : "guid" , Type : arrow .BinaryTypes .String , Metadata : metadataMD , Nullable : true },
79
79
{Name : "pod" , Type : arrow .BinaryTypes .String , Metadata : metadataMD , Nullable : true },
80
- {Name : "timestamp" , Type : arrow .FixedWidthTypes .Timestamp_ns , Metadata : builtinMD , Nullable : true },
81
- {Name : "message" , Type : arrow .BinaryTypes .String , Metadata : builtinMD , Nullable : true },
80
+ {Name : "timestamp" , Type : arrow .FixedWidthTypes .Timestamp_ns , Metadata : datatype . ColumnMetadataBuiltinTimestamp , Nullable : true },
81
+ {Name : "message" , Type : arrow .BinaryTypes .String , Metadata : datatype . ColumnMetadataBuiltinMessage , Nullable : true },
82
82
}
83
83
84
84
expectCSV := `prod,notloki,NULL,notloki-pod-1,1970-01-01 00:00:02,hello world
@@ -106,7 +106,7 @@ prod,loki,eeee-ffff-aaaa-bbbb,NULL,1970-01-01 00:00:10,goodbye world`
106
106
})
107
107
108
108
expectFields := []arrow.Field {
109
- {Name : "timestamp" , Type : arrow .FixedWidthTypes .Timestamp_ns , Metadata : builtinMD , Nullable : true },
109
+ {Name : "timestamp" , Type : arrow .FixedWidthTypes .Timestamp_ns , Metadata : datatype . ColumnMetadataBuiltinTimestamp , Nullable : true },
110
110
{Name : "env" , Type : arrow .BinaryTypes .String , Metadata : labelMD , Nullable : true },
111
111
}
112
112
@@ -206,8 +206,8 @@ func Test_dataobjScan_DuplicateColumns(t *testing.T) {
206
206
{Name : "namespace" , Type : arrow .BinaryTypes .String , Metadata : metadataMD , Nullable : true },
207
207
{Name : "pod" , Type : arrow .BinaryTypes .String , Metadata : metadataMD , Nullable : true },
208
208
209
- {Name : "timestamp" , Type : arrow .FixedWidthTypes .Timestamp_ns , Metadata : builtinMD , Nullable : true },
210
- {Name : "message" , Type : arrow .BinaryTypes .String , Metadata : builtinMD , Nullable : true },
209
+ {Name : "timestamp" , Type : arrow .FixedWidthTypes .Timestamp_ns , Metadata : datatype . ColumnMetadataBuiltinTimestamp , Nullable : true },
210
+ {Name : "message" , Type : arrow .BinaryTypes .String , Metadata : datatype . ColumnMetadataBuiltinMessage , Nullable : true },
211
211
}
212
212
213
213
expectCSV := `prod,NULL,pod-1,loki,NULL,override,1970-01-01 00:00:01,message 1
0 commit comments