Skip to content

Commit 9d23481

Browse files
committed
Back to a numeric mapping
1 parent 7ee0f55 commit 9d23481

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

repository/repository_test.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -152,17 +152,17 @@ func ExampleRepository_Write() {
152152
}
153153
// Output:
154154
// cells-for_contact-101
155-
// front:d s
156-
// front:d s
157-
// front:d s
155+
// front:d 1
156+
// front:d 1
157+
// front:d 1
158158
// front:e 13
159159
// front:e 12
160160
// front:e 11
161161
// front:u https://example.org/some/product
162162
// front:u https://example.org/some/product
163163
// front:u https://example.org/some/product
164164
// cells-for_contact-102
165-
// front:d c
165+
// front:d 2
166166
// front:e 12
167167
// front:u https://example.org/some/product
168168
// mapped-event-for_contact-102
@@ -680,19 +680,19 @@ func getRows() []bigtable.Row {
680680
{
681681
Row: "contact-3",
682682
Column: "d",
683-
Value: []byte("s"),
683+
Value: []byte("1"),
684684
Timestamp: t1,
685685
},
686686
{
687687
Row: "contact-3",
688688
Column: "d",
689-
Value: []byte("s"),
689+
Value: []byte("1"),
690690
Timestamp: t2,
691691
},
692692
{
693693
Row: "contact-3",
694694
Column: "d",
695-
Value: []byte("s"),
695+
Value: []byte("1"),
696696
Timestamp: t3,
697697
},
698698
},
@@ -713,7 +713,7 @@ func (a mockAdapter) ReadRow(_ context.Context, row string, _ ...bigtable.ReadOp
713713
Row: row,
714714
Column: "d",
715715
Timestamp: t1,
716-
Value: []byte("s"),
716+
Value: []byte("1"),
717717
},
718718
{
719719
Row: row,
@@ -731,7 +731,7 @@ func (a mockAdapter) ReadRow(_ context.Context, row string, _ ...bigtable.ReadOp
731731
Row: row,
732732
Column: "d",
733733
Timestamp: t2,
734-
Value: []byte("s"),
734+
Value: []byte("1"),
735735
},
736736
{
737737
Row: row,

repository/testdata/mapping.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
"d": {
77
"name": "device_type",
88
"values": {
9-
"s": "Smartphone",
10-
"c": "Computer"
9+
"1": "Smartphone",
10+
"2": "Computer"
1111
}
1212
},
1313
"e": {

0 commit comments

Comments
 (0)