Skip to content

Commit f55ccd3

Browse files
committed
Date Nanos implementation (#3933)
This datatype is an addition to the date datatype. However there is an important distinction between the two. The existing date datatype stores dates in millisecond resolution. The date_nanos data type stores dates in nanosecond resolution, which limits its range of dates from roughly 1970 to 2262, as dates are still stored as a long representing nanoseconds since the epoch.
1 parent b3880c5 commit f55ccd3

File tree

17 files changed

+398
-1
lines changed

17 files changed

+398
-1
lines changed

src/Nest/Aggregations/Metric/WeightedAverage/WeightedAverageValue.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
namespace Nest
88
{
99
/// <summary>
10-
/// The configuration for a field or scrip that provides a value or weight
10+
/// The configuration for a field or script that provides a value or weight
1111
/// for <see cref="WeightedAverageAggregation" />
1212
/// </summary>
1313
[InterfaceDataContract]
@@ -104,6 +104,9 @@ public enum ValueType
104104
/// <summary>A date value</summary>
105105
[EnumMember(Value = "date")] Date,
106106

107+
/// <summary>A date nanos value</summary>
108+
[EnumMember(Value = "date_nanos")] DateNanos,
109+
107110
/// <summary>An IP value</summary>
108111
[EnumMember(Value = "ip")] Ip,
109112

src/Nest/Mapping/DynamicTemplate/SingleMapping.cs

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ public IProperty Completion(Func<CompletionPropertyDescriptor<T>, ICompletionPro
1818
public IProperty Date(Func<DatePropertyDescriptor<T>, IDateProperty> selector) =>
1919
selector?.Invoke(new DatePropertyDescriptor<T>());
2020

21+
public IProperty DateNanos(Func<DateNanosPropertyDescriptor<T>, IDateNanosProperty> selector) =>
22+
selector?.Invoke(new DateNanosPropertyDescriptor<T>());
23+
2124
public IProperty DateRange(Func<DateRangePropertyDescriptor<T>, IDateRangeProperty> selector) =>
2225
selector?.Invoke(new DateRangePropertyDescriptor<T>());
2326

@@ -247,6 +250,30 @@ public IProperty Scalar(Expression<Func<T, IEnumerable<DateTimeOffset?>>> field,
247250
) =>
248251
selector.InvokeOrDefault(new DatePropertyDescriptor<T>().Name(field));
249252

253+
public IProperty ScalarNanos(Expression<Func<T, DateTime>> field, Func<DateNanosPropertyDescriptor<T>, IDateNanosProperty> selector = null) =>
254+
selector.InvokeOrDefault(new DateNanosPropertyDescriptor<T>().Name(field));
255+
256+
public IProperty ScalarNanos(Expression<Func<T, DateTime?>> field, Func<DateNanosPropertyDescriptor<T>, IDateNanosProperty> selector = null) =>
257+
selector.InvokeOrDefault(new DateNanosPropertyDescriptor<T>().Name(field));
258+
259+
public IProperty ScalarNanos(Expression<Func<T, IEnumerable<DateTime>>> field, Func<DateNanosPropertyDescriptor<T>, IDateNanosProperty> selector = null) =>
260+
selector.InvokeOrDefault(new DateNanosPropertyDescriptor<T>().Name(field));
261+
262+
public IProperty ScalarNanos(Expression<Func<T, IEnumerable<DateTime?>>> field, Func<DateNanosPropertyDescriptor<T>, IDateNanosProperty> selector = null) =>
263+
selector.InvokeOrDefault(new DateNanosPropertyDescriptor<T>().Name(field));
264+
265+
public IProperty ScalarNanos(Expression<Func<T,DateTimeOffset>> field, Func<DateNanosPropertyDescriptor<T>, IDateNanosProperty> selector = null) =>
266+
selector.InvokeOrDefault(new DateNanosPropertyDescriptor<T>().Name(field));
267+
268+
public IProperty ScalarNanos(Expression<Func<T, DateTimeOffset?>> field, Func<DateNanosPropertyDescriptor<T>, IDateNanosProperty> selector = null) =>
269+
selector.InvokeOrDefault(new DateNanosPropertyDescriptor<T>().Name(field));
270+
271+
public IProperty ScalarNanos(Expression<Func<T, IEnumerable<DateTimeOffset>>> field, Func<DateNanosPropertyDescriptor<T>, IDateNanosProperty> selector = null
272+
) => selector.InvokeOrDefault(new DateNanosPropertyDescriptor<T>().Name(field));
273+
274+
public IProperty ScalarNanos(Expression<Func<T, IEnumerable<DateTimeOffset?>>> field, Func<DateNanosPropertyDescriptor<T>, IDateNanosProperty> selector = null
275+
) => selector.InvokeOrDefault(new DateNanosPropertyDescriptor<T>().Name(field));
276+
250277
public IProperty Scalar(Expression<Func<T, bool>> field, Func<BooleanPropertyDescriptor<T>, IBooleanProperty> selector = null) =>
251278
selector.InvokeOrDefault(new BooleanPropertyDescriptor<T>().Name(field));
252279

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
using System;
2+
3+
namespace Nest
4+
{
5+
public class DateNanosAttribute : ElasticsearchDocValuesPropertyAttributeBase, IDateNanosProperty
6+
{
7+
public DateNanosAttribute() : base(FieldType.DateNanos) { }
8+
9+
public double Boost
10+
{
11+
get => Self.Boost.GetValueOrDefault();
12+
set => Self.Boost = value;
13+
}
14+
15+
public string Format
16+
{
17+
get => Self.Format;
18+
set => Self.Format = value;
19+
}
20+
21+
public bool IgnoreMalformed
22+
{
23+
get => Self.IgnoreMalformed.GetValueOrDefault();
24+
set => Self.IgnoreMalformed = value;
25+
}
26+
27+
public bool Index
28+
{
29+
get => Self.Index.GetValueOrDefault();
30+
set => Self.Index = value;
31+
}
32+
33+
public DateTime NullValue
34+
{
35+
get => Self.NullValue.GetValueOrDefault();
36+
set => Self.NullValue = value;
37+
}
38+
39+
double? IDateNanosProperty.Boost { get; set; }
40+
string IDateNanosProperty.Format { get; set; }
41+
bool? IDateNanosProperty.IgnoreMalformed { get; set; }
42+
43+
bool? IDateNanosProperty.Index { get; set; }
44+
DateTime? IDateNanosProperty.NullValue { get; set; }
45+
private IDateNanosProperty Self => this;
46+
}
47+
}
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
using System;
2+
using System.Diagnostics;
3+
using System.Runtime.Serialization;
4+
using Elasticsearch.Net.Utf8Json;
5+
6+
namespace Nest
7+
{
8+
[InterfaceDataContract]
9+
public interface IDateNanosProperty : IDocValuesProperty
10+
{
11+
/// <summary>
12+
/// Mapping field-level query time boosting. Accepts a floating point number, defaults to 1.0.
13+
/// </summary>
14+
[DataMember(Name = "boost")]
15+
double? Boost { get; set; }
16+
17+
/// <summary>
18+
/// The date format(s) that can be parsed. Defaults to strict_date_optional_time||epoch_millis.
19+
/// <see cref="DateFormat" />
20+
/// </summary>
21+
[DataMember(Name = "format")]
22+
string Format { get; set; }
23+
24+
/// <summary>
25+
/// If true, malformed numbers are ignored. If false (default), malformed numbers throw an exception
26+
/// and reject the whole document.
27+
/// </summary>
28+
[DataMember(Name = "ignore_malformed")]
29+
bool? IgnoreMalformed { get; set; }
30+
31+
/// <summary>
32+
/// Should the field be searchable? Accepts true (default) and false.
33+
/// </summary>
34+
[DataMember(Name = "index")]
35+
bool? Index { get; set; }
36+
37+
/// <summary>
38+
/// Accepts a date value in one of the configured format's
39+
/// as the field which is substituted for any explicit null values. Defaults to null,
40+
/// which means the field is treated as missing.
41+
/// </summary>
42+
[DataMember(Name = "null_value")]
43+
DateTime? NullValue { get; set; }
44+
}
45+
46+
[DebuggerDisplay("{DebugDisplay}")]
47+
public class DateNanosProperty : DocValuesPropertyBase, IDateNanosProperty
48+
{
49+
public DateNanosProperty() : base(FieldType.DateNanos) { }
50+
51+
/// <inheritdoc />
52+
public double? Boost { get; set; }
53+
54+
/// <inheritdoc />
55+
public string Format { get; set; }
56+
57+
/// <inheritdoc />
58+
public bool? IgnoreMalformed { get; set; }
59+
60+
/// <inheritdoc />
61+
public bool? Index { get; set; }
62+
63+
/// <inheritdoc />
64+
public DateTime? NullValue { get; set; }
65+
66+
/// <inheritdoc />
67+
public int? PrecisionStep { get; set; }
68+
}
69+
70+
[DebuggerDisplay("{DebugDisplay}")]
71+
public class DateNanosPropertyDescriptor<T>
72+
: DocValuesPropertyDescriptorBase<DateNanosPropertyDescriptor<T>, IDateNanosProperty, T>, IDateNanosProperty
73+
where T : class
74+
{
75+
public DateNanosPropertyDescriptor() : base(FieldType.DateNanos) { }
76+
77+
double? IDateNanosProperty.Boost { get; set; }
78+
79+
string IDateNanosProperty.Format { get; set; }
80+
81+
bool? IDateNanosProperty.IgnoreMalformed { get; set; }
82+
83+
bool? IDateNanosProperty.Index { get; set; }
84+
85+
DateTime? IDateNanosProperty.NullValue { get; set; }
86+
87+
/// <inheritdoc cref="IDateNanosProperty.Index"/>
88+
public DateNanosPropertyDescriptor<T> Index(bool? index = true) => Assign(index, (a, v) => a.Index = v);
89+
90+
/// <inheritdoc cref="IDateNanosProperty.Boost"/>
91+
public DateNanosPropertyDescriptor<T> Boost(double? boost) => Assign(boost, (a, v) => a.Boost = v);
92+
93+
/// <inheritdoc cref="IDateNanosProperty.NullValue"/>
94+
public DateNanosPropertyDescriptor<T> NullValue(DateTime? nullValue) => Assign(nullValue, (a, v) => a.NullValue = v);
95+
96+
/// <inheritdoc cref="IDateNanosProperty.IgnoreMalformed"/>
97+
public DateNanosPropertyDescriptor<T> IgnoreMalformed(bool? ignoreMalformed = true) => Assign(ignoreMalformed, (a, v) => a.IgnoreMalformed = v);
98+
99+
/// <inheritdoc cref="IDateNanosProperty.Format"/>
100+
public DateNanosPropertyDescriptor<T> Format(string format) => Assign(format, (a, v) => a.Format = v);
101+
}
102+
}

src/Nest/Mapping/Types/FieldType.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ public enum FieldType
4343
[EnumMember(Value = "date")]
4444
Date,
4545

46+
[EnumMember(Value = "date_nanos")]
47+
DateNanos,
48+
4649
[EnumMember(Value = "boolean")]
4750
Boolean,
4851

src/Nest/Mapping/Types/Properties-Scalar.cs

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,22 @@ public partial interface IPropertiesDescriptor<T, out TReturnType>
115115

116116
TReturnType Scalar(Expression<Func<T, IEnumerable<DateTimeOffset?>>> field, Func<DatePropertyDescriptor<T>, IDateProperty> selector = null);
117117

118+
TReturnType ScalarNanos(Expression<Func<T, DateTime>> field, Func<DateNanosPropertyDescriptor<T>, IDateNanosProperty> selector = null);
119+
120+
TReturnType ScalarNanos(Expression<Func<T, DateTime?>> field, Func<DateNanosPropertyDescriptor<T>, IDateNanosProperty> selector = null);
121+
122+
TReturnType ScalarNanos(Expression<Func<T, IEnumerable<DateTime>>> field, Func<DateNanosPropertyDescriptor<T>, IDateNanosProperty> selector = null);
123+
124+
TReturnType ScalarNanos(Expression<Func<T, IEnumerable<DateTime?>>> field, Func<DateNanosPropertyDescriptor<T>, IDateNanosProperty> selector = null);
125+
126+
TReturnType ScalarNanos(Expression<Func<T, DateTimeOffset>> field, Func<DateNanosPropertyDescriptor<T>, IDateNanosProperty> selector = null);
127+
128+
TReturnType ScalarNanos(Expression<Func<T, DateTimeOffset?>> field, Func<DateNanosPropertyDescriptor<T>, IDateNanosProperty> selector = null);
129+
130+
TReturnType ScalarNanos(Expression<Func<T, IEnumerable<DateTimeOffset>>> field, Func<DateNanosPropertyDescriptor<T>, IDateNanosProperty> selector = null);
131+
132+
TReturnType ScalarNanos(Expression<Func<T, IEnumerable<DateTimeOffset?>>> field, Func<DateNanosPropertyDescriptor<T>, IDateNanosProperty> selector = null);
133+
118134
TReturnType Scalar(Expression<Func<T, bool>> field, Func<BooleanPropertyDescriptor<T>, IBooleanProperty> selector = null);
119135

120136
TReturnType Scalar(Expression<Func<T, bool?>> field, Func<BooleanPropertyDescriptor<T>, IBooleanProperty> selector = null);
@@ -388,6 +404,42 @@ public PropertiesDescriptor<T> Scalar(Expression<Func<T, IEnumerable<DateTimeOff
388404
) =>
389405
SetProperty(selector.InvokeOrDefault(new DatePropertyDescriptor<T>().Name(field)));
390406

407+
public PropertiesDescriptor<T> ScalarNanos(Expression<Func<T, DateTime>> field, Func<DateNanosPropertyDescriptor<T>, IDateNanosProperty> selector = null) =>
408+
SetProperty(selector.InvokeOrDefault(new DateNanosPropertyDescriptor<T>().Name(field)));
409+
410+
public PropertiesDescriptor<T> ScalarNanos(Expression<Func<T, DateTime?>> field, Func<DateNanosPropertyDescriptor<T>, IDateNanosProperty> selector = null) =>
411+
SetProperty(selector.InvokeOrDefault(new DateNanosPropertyDescriptor<T>().Name(field)));
412+
413+
public PropertiesDescriptor<T> ScalarNanos(Expression<Func<T, IEnumerable<DateTime>>> field,
414+
Func<DateNanosPropertyDescriptor<T>, IDateNanosProperty> selector = null
415+
) =>
416+
SetProperty(selector.InvokeOrDefault(new DateNanosPropertyDescriptor<T>().Name(field)));
417+
418+
public PropertiesDescriptor<T> ScalarNanos(Expression<Func<T, IEnumerable<DateTime?>>> field,
419+
Func<DateNanosPropertyDescriptor<T>, IDateNanosProperty> selector = null
420+
) =>
421+
SetProperty(selector.InvokeOrDefault(new DateNanosPropertyDescriptor<T>().Name(field)));
422+
423+
public PropertiesDescriptor<T> ScalarNanos(Expression<Func<T, DateTimeOffset>> field,
424+
Func<DateNanosPropertyDescriptor<T>, IDateNanosProperty> selector = null
425+
) =>
426+
SetProperty(selector.InvokeOrDefault(new DateNanosPropertyDescriptor<T>().Name(field)));
427+
428+
public PropertiesDescriptor<T> ScalarNanos(Expression<Func<T, DateTimeOffset?>> field,
429+
Func<DateNanosPropertyDescriptor<T>, IDateNanosProperty> selector = null
430+
) =>
431+
SetProperty(selector.InvokeOrDefault(new DateNanosPropertyDescriptor<T>().Name(field)));
432+
433+
public PropertiesDescriptor<T> ScalarNanos(Expression<Func<T, IEnumerable<DateTimeOffset>>> field,
434+
Func<DateNanosPropertyDescriptor<T>, IDateNanosProperty> selector = null
435+
) =>
436+
SetProperty(selector.InvokeOrDefault(new DateNanosPropertyDescriptor<T>().Name(field)));
437+
438+
public PropertiesDescriptor<T> ScalarNanos(Expression<Func<T, IEnumerable<DateTimeOffset?>>> field,
439+
Func<DateNanosPropertyDescriptor<T>, IDateNanosProperty> selector = null
440+
) =>
441+
SetProperty(selector.InvokeOrDefault(new DateNanosPropertyDescriptor<T>().Name(field)));
442+
391443
public PropertiesDescriptor<T> Scalar(Expression<Func<T, bool>> field, Func<BooleanPropertyDescriptor<T>, IBooleanProperty> selector = null
392444
) =>
393445
SetProperty(selector.InvokeOrDefault(new BooleanPropertyDescriptor<T>().Name(field)));

src/Nest/Mapping/Types/Properties.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ public partial interface IPropertiesDescriptor<T, out TReturnType>
5858

5959
TReturnType Date(Func<DatePropertyDescriptor<T>, IDateProperty> selector);
6060

61+
TReturnType DateNanos(Func<DateNanosPropertyDescriptor<T>, IDateNanosProperty> selector);
62+
6163
TReturnType Boolean(Func<BooleanPropertyDescriptor<T>, IBooleanProperty> selector);
6264

6365
TReturnType Binary(Func<BinaryPropertyDescriptor<T>, IBinaryProperty> selector);
@@ -109,6 +111,8 @@ public PropertiesDescriptor() : base(new Properties<T>()) { }
109111

110112
public PropertiesDescriptor<T> Date(Func<DatePropertyDescriptor<T>, IDateProperty> selector) => SetProperty(selector);
111113

114+
public PropertiesDescriptor<T> DateNanos(Func<DateNanosPropertyDescriptor<T>, IDateNanosProperty> selector) => SetProperty(selector);
115+
112116
public PropertiesDescriptor<T> DateRange(Func<DateRangePropertyDescriptor<T>, IDateRangeProperty> selector) => SetProperty(selector);
113117

114118
public PropertiesDescriptor<T> DoubleRange(Func<DoubleRangePropertyDescriptor<T>, IDoubleRangeProperty> selector) => SetProperty(selector);

src/Nest/Mapping/Types/PropertyFormatter.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ public IProperty Deserialize(ref JsonReader reader, IJsonFormatterResolver forma
6868
((IProperty)numberProperty).Type = typeString;
6969
return numberProperty;
7070
case FieldType.Date: return Deserialize<DateProperty>(ref segmentReader, formatterResolver);
71+
case FieldType.DateNanos: return Deserialize<DateNanosProperty>(ref segmentReader, formatterResolver);
7172
case FieldType.Boolean: return Deserialize<BooleanProperty>(ref segmentReader, formatterResolver);
7273
case FieldType.Binary: return Deserialize<BinaryProperty>(ref segmentReader, formatterResolver);
7374
case FieldType.Object: return Deserialize<ObjectProperty>(ref segmentReader, formatterResolver);
@@ -124,6 +125,9 @@ public void Serialize(ref JsonWriter writer, IProperty value, IJsonFormatterReso
124125
case "date":
125126
Serialize<IDateProperty>(ref writer, value, formatterResolver);
126127
break;
128+
case "date_nanos":
129+
Serialize<IDateNanosProperty>(ref writer, value, formatterResolver);
130+
break;
127131
case "boolean":
128132
Serialize<IBooleanProperty>(ref writer, value, formatterResolver);
129133
break;

src/Nest/Mapping/Visitor/IMappingVisitor.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ public interface IMappingVisitor
1212

1313
void Visit(IDateProperty property);
1414

15+
void Visit(IDateNanosProperty property);
16+
1517
void Visit(IBooleanProperty property);
1618

1719
void Visit(IBinaryProperty property);
@@ -63,6 +65,8 @@ public virtual void Visit(IKeywordProperty property) { }
6365

6466
public virtual void Visit(IDateProperty property) { }
6567

68+
public virtual void Visit(IDateNanosProperty property) { }
69+
6670
public virtual void Visit(IBooleanProperty property) { }
6771

6872
public virtual void Visit(IBinaryProperty property) { }

src/Nest/Mapping/Visitor/IPropertyVisitor.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ public interface IPropertyVisitor
1414

1515
void Visit(IDateProperty type, PropertyInfo propertyInfo, ElasticsearchPropertyAttributeBase attribute);
1616

17+
void Visit(IDateNanosProperty type, PropertyInfo propertyInfo, ElasticsearchPropertyAttributeBase attribute);
18+
1719
void Visit(IBinaryProperty type, PropertyInfo propertyInfo, ElasticsearchPropertyAttributeBase attribute);
1820

1921
void Visit(INestedProperty type, PropertyInfo propertyInfo, ElasticsearchPropertyAttributeBase attribute);

src/Nest/Mapping/Visitor/MappingWalker.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,13 @@ public void Accept(IProperties properties)
8787
Accept(t.Fields);
8888
});
8989
break;
90+
case FieldType.DateNanos:
91+
Visit<IDateNanosProperty>(field, t =>
92+
{
93+
_visitor.Visit(t);
94+
Accept(t.Fields);
95+
});
96+
break;
9097
case FieldType.Boolean:
9198
Visit<IBooleanProperty>(field, t =>
9299
{

src/Nest/Mapping/Visitor/NoopPropertyVisitor.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ public virtual void Visit(INestedProperty type, PropertyInfo propertyInfo, Elast
4444

4545
public virtual void Visit(IDateProperty type, PropertyInfo propertyInfo, ElasticsearchPropertyAttributeBase attribute) { }
4646

47+
public virtual void Visit(IDateNanosProperty type, PropertyInfo propertyInfo, ElasticsearchPropertyAttributeBase attribute) { }
48+
4749
public virtual void Visit(INumberProperty type, PropertyInfo propertyInfo, ElasticsearchPropertyAttributeBase attribute) { }
4850

4951
public virtual void Visit(ITextProperty type, PropertyInfo propertyInfo, ElasticsearchPropertyAttributeBase attribute) { }
@@ -71,6 +73,9 @@ public void Visit(IProperty type, PropertyInfo propertyInfo, ElasticsearchProper
7173
case IDateProperty dateType:
7274
Visit(dateType, propertyInfo, attribute);
7375
break;
76+
case IDateNanosProperty dateNanosType:
77+
Visit(dateNanosType, propertyInfo, attribute);
78+
break;
7479
case INumberProperty numberType:
7580
Visit(numberType, propertyInfo, attribute);
7681
break;

src/Nest/Search/FieldCapabilities/FieldCapabilitiesResponse.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ public class FieldTypes : IsADictionaryBase<string, FieldCapabilities>
3333
public FieldCapabilities Byte => BackingDictionary.TryGetValue("byte", out var f) ? f : null;
3434
public FieldCapabilities Completion => BackingDictionary.TryGetValue("completion", out var f) ? f : null;
3535
public FieldCapabilities Date => BackingDictionary.TryGetValue("date", out var f) ? f : null;
36+
public FieldCapabilities DateNanos => BackingDictionary.TryGetValue("date_nanos", out var f) ? f : null;
3637
public FieldCapabilities DateRange => BackingDictionary.TryGetValue("date_range", out var f) ? f : null;
3738
public FieldCapabilities Double => BackingDictionary.TryGetValue("double", out var f) ? f : null;
3839
public FieldCapabilities DoubleRange => BackingDictionary.TryGetValue("double_range", out var f) ? f : null;

src/Tests/Tests/Indices/MappingManagement/GetMapping/GetMappingApiTest.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,8 @@ internal class TestVisitor : IMappingVisitor
147147

148148
public void Visit(IDateProperty mapping) => Increment("date");
149149

150+
public void Visit(IDateNanosProperty mapping) => Increment("date_nanos");
151+
150152
public void Visit(IBinaryProperty mapping) => Increment("binary");
151153

152154
public void Visit(INestedProperty mapping) => Increment("nested");

0 commit comments

Comments
 (0)