{"record":{"id":"277e0169a13ddb2b","repo":"dotnet/machinelearning","slug":"fieldtype-name","errorCode":null,"errorMessage":"{fieldType.Name}","messagePattern":"\\{fieldType\\.Name\\}","errorType":"exception","errorClass":"NotImplementedException","httpStatus":null,"severity":"error","filePath":"src/Microsoft.Data.Analysis/DataFrame.Arrow.cs","lineNumber":141,"sourceCode":"                        dataFrameColumn = dataTimeDataFrameColumn;\n                    }\n                    break;\n                case ArrowTypeId.Decimal128:\n                case ArrowTypeId.Decimal256:\n                case ArrowTypeId.Binary:\n                case ArrowTypeId.Date32:\n                case ArrowTypeId.Dictionary:\n                case ArrowTypeId.FixedSizedBinary:\n                case ArrowTypeId.HalfFloat:\n                case ArrowTypeId.Interval:\n                case ArrowTypeId.List:\n                case ArrowTypeId.Map:\n                case ArrowTypeId.Null:\n                case ArrowTypeId.Time32:\n                case ArrowTypeId.Time64:\n\n                default:\n                    throw new NotImplementedException($\"{fieldType.Name}\");\n            }\n\n            if (dataFrameColumn != null)\n            {\n                ret.Columns.Insert(ret.Columns.Count, dataFrameColumn);\n            }\n        }\n\n        /// <summary>\n        /// Wraps a <see cref=\"DataFrame\"/> around an Arrow <see cref=\"RecordBatch\"/> without copying data\n        /// </summary>\n        /// <param name=\"recordBatch\"></param>\n        /// <returns><see cref=\"DataFrame\"/></returns>\n        public static DataFrame FromArrowRecordBatch(RecordBatch recordBatch)\n        {\n            DataFrame ret = new DataFrame();\n            Apache.Arrow.Schema arrowSchema = recordBatch.Schema;\n            int fieldIndex = 0;","sourceCodeStart":123,"sourceCodeEnd":159,"githubUrl":"https://github.com/dotnet/machinelearning/blob/7b76e69cf964daeca3f1377af6bc5543284d56c6/src/Microsoft.Data.Analysis/DataFrame.Arrow.cs#L123-L159","documentation":"FromArrowRecordBatch / AppendDataFrameColumnFromArrowArray throw NotImplementedException when an Arrow record batch contains a field whose ArrowTypeId has no mapping to a DataFrameColumn. Unsupported type ids include Map, Null, Time32, Time64 and others that hit the switch's default branch.","triggerScenarios":"Calling DataFrame.FromArrowRecordBatch on a record batch whose schema contains Arrow columns of type Map, Null, Time32, Time64, or any other type not handled by the switch in AppendDataFrameColumnFromArrowArray.","commonSituations":"Reading Arrow data produced by systems that emit time32/time64 or map columns (Spark, Polars, Pandas exports); schema changes upstream introducing new field types; round-tripping data types that DataFrame does not model.","solutions":["Preprocess the Arrow data upstream so unsupported fields (Map, Null, Time32, Time64) are converted to supported types (e.g. cast Time32/Time64 to Timestamp or Int64, Map to List/Struct).","Filter unsupported columns out of the Arrow schema before calling FromArrowRecordBatch.","Convert the batch to IPC/records yourself and build columns manually with DataFrameColumn.Create for unsupported types.","Check the Apache.Arrow version to see if newer mappings were added, and upgrade the package."],"exampleFix":"// before\nvar df = DataFrame.FromArrowRecordBatch(batch); // batch has Time32 column -> NotImplementedException\n// after\nvar supportedSchema = batch.Schema.RemoveField(batch.Schema.GetFieldIndex(\"myTime\"));\nvar df = DataFrame.FromArrowRecordBatch(new Apache.Arrow.RecordBatch(supportedSchema, /* supported arrays only */));","handlingStrategy":"validation","validationCode":"var unsupported = batch.Schema.Fields\n    .Where(f => f.DataType.Type is ArrowTypeId.Map or ArrowTypeId.Null or ArrowTypeId.Time32 or ArrowTypeId.Time64)\n    .Select(f => f.Name)\n    .ToList();\nif (unsupported.Count > 0) throw new InvalidOperationException($\"Unsupported Arrow columns: {string.Join(',', unsupported)}\");","typeGuard":"static bool IsArrowTypeSupported(ArrowTypeId t) =>\n    t is not (ArrowTypeId.Map or ArrowTypeId.Null or ArrowTypeId.Time32 or ArrowTypeId.Time64);","tryCatchPattern":"try\n{\n    var df = DataFrame.FromArrowRecordBatch(batch);\n}\ncatch (NotImplementedException ex)\n{\n    // ex.Message contains the Arrow field type name; convert/filter that column and retry\n}","preventionTips":["Inspect the Arrow schema before importing and pre-cast Time32/Time64/Map/Null fields","Upgrade Microsoft.Data.Analysis / Apache.Arrow packages for newer type mappings","Keep upstream writers emitting only types the DataFrame importer supports","Test Arrow round-trips against your producers' schemas in CI"],"tags":["arrow","dataframe","not-implemented"],"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"}