You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Get a Null Reference Exception inside DeltaKustoLib.KustoModel.MappingModel.MappingElement.Equals method when other.DataType is Null.
delta-kusto 0.10.2
Activating Client...
Client Activated
Newer clients available: 0.10.2.109
Loading parameters at 'XXX\rev-engineer-parameters.yaml'
2 jobs
Job 'download-dev':
Compute Delta...
829 commands in delta
Processing delta commands...
Delta processed / Job completed
Job 'delta-dev':
Compute Delta...
Exception registered with Session ID '142c3da0-d32f-4040-8f2f-ca94eef05edd'
Exception encountered: System.NullReferenceException ; Object reference not set to an instance of an object.
Stack trace: at DeltaKustoLib.KustoModel.MappingModel.MappingElement.Equals(Object obj) in C:\repos\delta-kusto\code\DeltaKustoLib\KustoModel\MappingModel.cs:line 79
at System.Linq.Enumerable.SequenceEqual[TSource](IEnumerable`1 first, IEnumerable`1 second, IEqualityComparer`1 comparer)
at System.Linq.Enumerable.SequenceEqual[TSource](IEnumerable`1 first, IEnumerable`1 second)
at DeltaKustoLib.KustoModel.MappingModel.MappingAsJsonEquals(QuotedText otherMappingAsJson) in C:\repos\delta-kusto\code\DeltaKustoLib\KustoModel\MappingModel.cs:line 180
at DeltaKustoLib.KustoModel.MappingModel.Equals(Object obj) in C:\repos\delta-kusto\code\DeltaKustoLib\KustoModel\MappingModel.cs:line 120
at DeltaKustoLib.DeltaHelper.GetUpdated[M,K](IEnumerable`1 currents, IEnumerable`1 targets, Func`2 keyExtractor)+MoveNext() in C:\repos\delta-kusto\code\DeltaKustoLib\DeltaHelper.cs:line 50
at System.Linq.Enumerable.SelectEnumerableIterator`2.MoveNext()
at System.Linq.Enumerable.ConcatIterator`1.MoveNext()
at System.Linq.Enumerable.SelectEnumerableIterator`2.MoveNext()
at System.Linq.Enumerable.ConcatIterator`1.MoveNext()
at DeltaKustoLib.KustoModel.TableModel.ComputeDelta(TableModel targetModel)+MoveNext() in C:\repos\delta-kusto\code\DeltaKustoLib\KustoModel\TableModel.cs:line 334
at System.Linq.Enumerable.SelectManySingleSelectorIterator`2.MoveNext()
at System.Linq.Enumerable.ConcatIterator`1.MoveNext()
at System.Collections.Generic.LargeArrayBuilder`1.AddRange(IEnumerable`1 items)
at System.Collections.Generic.SparseArrayBuilder`1.ReserveOrAdd(IEnumerable`1 items)
at System.Linq.Enumerable.ConcatNIterator`1.LazyToArray()
at System.Linq.Enumerable.ConcatNIterator`1.ToArray()
at System.Collections.Immutable.ImmutableArray.CreateRange[T](IEnumerable`1 items)
at DeltaKustoLib.KustoModel.DatabaseModel.ComputeDelta(DatabaseModel targetModel) in C:\repos\delta-kusto\code\DeltaKustoLib\KustoModel\DatabaseModel.cs:line 191
at delta_kusto.DeltaOrchestration.ProcessJobAsync(MainParameterization parameters, IKustoManagementGatewayFactory kustoGatewayFactory, IFileGateway localFileGateway, String jobName, JobParameterization job) in C:\repos\delta-kusto\code\delta-kusto\DeltaOrchestration.cs:line 143
at delta_kusto.DeltaOrchestration.ComputeDeltaAsync(String parameterFilePath, IEnumerable`1 pathOverrides) in C:\repos\delta-kusto\code\delta-kusto\DeltaOrchestration.cs:line 82
at delta_kusto.DeltaOrchestration.ComputeDeltaAsync(String parameterFilePath, IEnumerable`1 pathOverrides) in C:\repos\delta-kusto\code\delta-kusto\DeltaOrchestration.cs:line 106
at delta_kusto.DeltaOrchestration.ComputeDeltaAsync(String parameterFilePath, IEnumerable`1 pathOverrides) in C:\repos\delta-kusto\code\delta-kusto\DeltaOrchestration.cs:line 110
at delta_kusto.Program.RunOptionsAsync(CommandLineOptions options) in C:\repos\delta-kusto\code\delta-kusto\Program.cs:line 120
at CommandLine.ParserResultExtensions.WithParsedAsync[T](ParserResult`1 result, Func`2 action)
at delta_kusto.Program.Main(String[] args) in C:\repos\delta-kusto\code\delta-kusto\Program.cs:line 51
Was able to work around it with this "fix":
public override bool Equals(object? obj)
{
var other = obj as MappingElement;
var result = other != null
&& other.Column.Equals(Column)
&& other.DataType != null && other.DataType.Equals(DataType)
&& other.Properties.Equals(Properties);
return result;
}
The text was updated successfully, but these errors were encountered:
sebbrochet
added a commit
to sebbrochet/delta-kusto
that referenced
this issue
Jun 21, 2022
Get a Null Reference Exception inside
DeltaKustoLib.KustoModel.MappingModel.MappingElement.Equals
method whenother.DataType
isNull
.Was able to work around it with this "fix":
The text was updated successfully, but these errors were encountered: