{"record":{"id":"5a7eef7846ab8558","repo":"dotnet/machinelearning","slug":"the-method-or-operation-is-not-implemented","errorCode":null,"errorMessage":"The method or operation is not implemented.","messagePattern":"The method or operation is not implemented\\.","errorType":"exception","errorClass":"NotImplementedException","httpStatus":null,"severity":"error","filePath":"src/Microsoft.Data.Analysis/DataFrameColumn.BinaryOperations.cs","lineNumber":20,"sourceCode":"// Licensed to the .NET Foundation under one or more agreements.\n// The .NET Foundation licenses this file to you under the MIT license.\n// See the LICENSE file in the project root for more information.\n\n// Generated from DataFrameColumn.BinaryOperations.tt. Do not modify directly\n\nusing System;\nusing System.Collections.Generic;\n\nnamespace Microsoft.Data.Analysis\n{\n    public abstract partial class DataFrameColumn\n    {\n        /// <summary>\n        /// Performs element-wise addition\n        /// </summary>\n        public virtual DataFrameColumn Add(DataFrameColumn column, bool inPlace = false)\n        {\n            throw new NotImplementedException();\n        }\n\n        /// <summary>\n        /// Performs an element-wise addition on each value in the column\n        /// </summary>\n        public virtual DataFrameColumn Add<T>(T value, bool inPlace = false)\n        {\n            throw new NotImplementedException();\n        }\n\n        /// <summary>\n        /// Performs a reversed element-wise addition on each value in the column\n        /// </summary>\n        public virtual DataFrameColumn ReverseAdd<T>(T value, bool inPlace = false)\n        {\n            throw new NotImplementedException();\n        }\n","sourceCodeStart":2,"sourceCodeEnd":38,"githubUrl":"https://github.com/dotnet/machinelearning/blob/7b76e69cf964daeca3f1377af6bc5543284d56c6/src/Microsoft.Data.Analysis/DataFrameColumn.BinaryOperations.cs#L2-L38","documentation":"The base DataFrameColumn.Add(DataFrameColumn, bool) virtual has no implementation in the abstract base class; it exists so derived primitive columns can override it. Calling it on a base-typed column that lacks an override throws NotImplementedException.","triggerScenarios":"Invoking columnA.Add(columnB) where the runtime column type does not override Add, e.g. performing element-wise addition on unsupported column types (strings mixed with primitives) through a DataFrameColumn reference.","commonSituations":"Polymorphic column math on heterogeneous frames; custom column subclasses that forgot to override Add; older runtime versions lacking overrides for a specific primitive type.","solutions":["Cast columns to their concrete primitive types (e.g. PrimitiveDataFrameColumn<int>) which override Add","Use the DataFrame-level arithmetic API that dispatches on column kinds","In custom column subclasses, implement the Add override"],"exampleFix":"// before\nDataFrameColumn result = colA.Add(colB);\n// after\nvar result = ((PrimitiveDataFrameColumn<int>)colA).Add((PrimitiveDataFrameColumn<int>)colB);","handlingStrategy":"type-guard","validationCode":"if (column is not PrimitiveDataFrameColumn<int>) throw new NotSupportedException(\"Add is only supported on primitive columns.\");","typeGuard":"bool SupportsBinaryOp(DataFrameColumn c) => c is PrimitiveDataFrameColumn<sbyte> or PrimitiveDataFrameColumn<int> or PrimitiveDataFrameColumn<long> or PrimitiveDataFrameColumn<float> or PrimitiveDataFrameColumn<double>;","tryCatchPattern":"try { result = colA.Add(colB); }\ncatch (NotImplementedException) { /* fall back to concrete-type dispatch or manual loop */ }","preventionTips":["Check the concrete column type before polymorphic arithmetic","Keep DataFrame column operations within implemented primitive types","In custom columns, always override the binary-operation virtuals"],"tags":["dotnet","dataframe","not-implemented","binary-operation"],"backgroundTag":"method-not-implemented","analyzedSha":"7b76e69cf964daeca3f1377af6bc5543284d56c6","analyzedAt":"2026-09-11T12:35:38.930Z","contentChangedAt":"2026-09-11T12:35:38.930Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}