JuliaData / NamedTuples.jl

[DEPRECATED] NamedTuples.jl
Other
30 stars 17 forks source link

Is there a length limit on type names or the number of type parameters? #25

Closed davidanthoff closed 7 years ago

davidanthoff commented 7 years ago

I'm trying to create a somewhat large NamedTuple, and I get an error

ERROR: type too large
 in create_tuple(::Array{Symbol,1}) at C:\Users\anthoff\.julia\v0.5\NamedTuples\src\NamedTuples.jl:124
 in make_tuple(::Array{Expr,1}) at C:\Users\anthoff\.julia\v0.5\NamedTuples\src\NamedTuples.jl:165
 in getiterator(::DataFrames.DataFrame) at C:\Users\anthoff\.julia\v0.5\IterableTables\src\integrations\dataframes.jl:28

on julia 0.5.1.

The type I'm trying to create is this:

immutable _NT_API_FileNo_OriginalOperator_OriginalWellName_CurrentOperator_CurrentWellName_FieldName_CountyName_Township_Range_Section_QQ_Footages_Hole__Type_LATITUDE_LONGITUDE_FirstSpudDate_MeasuredTD_KBElev_DFElev_GRElev_GLElev_TY__BCHR_TY__BCHN_K__P_K__PJRS_K__PES_K__NB_K__GH_K__M_K__N_K__IK_J__S_J__R_T__S_PM__MK_PM__OP_PM__EBA_PM__BC_PN__T_M__EBS_M__BS_M__KL_M__MDUN_M__MD_M__MDR_M__MDLS_M__MDFA_M__MDFY_M__MDSA_M__MDTI_M__MDLP_MD__B_D__DV_D__TF_D__BB_D__DP_D__SR_D__DB_D__PE_D__W_S__I_S__CL_O__G_O__ST_O__RR_O__WR_O__WI_O__BI_CO__D_PC_LogsOnFile{T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45,T46,T47,T48,T49,T50,T51,T52,T53,T54,T55,T56,T57,T58,T59,T60,T61,T62,T63,T64,T65,T66,T67,T68,T69,T70,T71,T72} <: NamedTuple
    API::T1
    FileNo::T2
    OriginalOperator::T3
    OriginalWellName::T4
    CurrentOperator::T5
    CurrentWellName::T6
    FieldName::T7
    CountyName::T8
    Township::T9
    Range::T10
    Section::T11
    QQ::T12
    Footages::T13
    Hole_Type::T14
    LATITUDE::T15
    LONGITUDE::T16
    FirstSpudDate::T17
    MeasuredTD::T18
    KBElev::T19
    DFElev::T20
    GRElev::T21
    GLElev::T22
    TY_BCHR::T23
    TY_BCHN::T24
    K_P::T25
    K_PJRS::T26
    K_PES::T27
    K_NB::T28
    K_GH::T29
    K_M::T30
    K_N::T31
    K_IK::T32
    J_S::T33
    J_R::T34
    T_S::T35
    PM_MK::T36
    PM_OP::T37
    PM_EBA::T38
    PM_BC::T39
    PN_T::T40
    M_EBS::T41
    M_BS::T42
    M_KL::T43
    M_MDUN::T44
    M_MD::T45
    M_MDR::T46
    M_MDLS::T47
    M_MDFA::T48
    M_MDFY::T49
    M_MDSA::T50
    M_MDTI::T51
    M_MDLP::T52
    MD_B::T53
    D_DV::T54
    D_TF::T55
    D_BB::T56
    D_DP::T57
    D_SR::T58
    D_DB::T59
    D_PE::T60
    D_W::T61
    S_I::T62
    S_CL::T63
    O_G::T64
    O_ST::T65
    O_RR::T66
    O_WR::T67
    O_WI::T68
    O_BI::T69
    CO_D::T70
    PC::T71
    LogsOnFile::T72
end

The crash occurs in this line.

@JeffBezanson any thoughts? This is a bit of an issue for my whole IterableTables and Query project, because I represent the row of any tabular data as a NamedTuple, and obviously I need to be able to represent more or less arbitrary number of columns, and certainly more than 72 :)

JeffBezanson commented 7 years ago

Is it possible to try with 0.6? This error no longer exists in the updated type system.

davidanthoff commented 7 years ago

Ha, this works on julia 0.6! That is good enough for me. Thanks.