Skip to content

Commit cbf8d1d

Browse files
committed
Modified mapping compiler to write the sample rate to the TimeWindowExpression property of field mappings.
1 parent c58e7a5 commit cbf8d1d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Source/Libraries/ECAClientUtilities/MappingCompiler.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -787,17 +787,20 @@ private void ParseSampleRate(FieldMapping fieldMapping)
787787

788788
// Parse the next token as the sample rate
789789
fieldMapping.SampleRate = ParseNumber();
790+
fieldMapping.TimeWindowExpression += " @ " + fieldMapping.SampleRate;
790791
SkipWhitespace();
791792

792793
// Parse the "per" keyword
793794
identifier = ParseIdentifier();
795+
fieldMapping.TimeWindowExpression += " " + identifier;
794796
SkipWhitespace();
795797

796798
if (identifier != "per")
797799
RaiseCompileError($"Unexpected identifier: {identifier}. Expected 'per' keyword.");
798800

799801
// Parse the time unit
800802
identifier = ParseIdentifier();
803+
fieldMapping.TimeWindowExpression += " " + identifier;
801804
fieldMapping.SampleUnit = ToTimeUnit(identifier);
802805

803806
if (fieldMapping.SampleUnit == TimeSpan.Zero)

0 commit comments

Comments
 (0)