none
C++ compiler error when inserting SQL.MAP

    Question

  • Hello all,

    I'm trying to execute this U-SQL script but receiving a C++ runtime error:

    USE DATABASE master;
    DROP TABLE IF EXISTS Dummy;
    CREATE TABLE IF NOT EXISTS Dummy
    (
        [Id] int,
        [ColumnA] string,
        [ColumnB] string,
        [ColumnMap] SQL.MAP<string, string>,
        INDEX tableIndex CLUSTERED(Id ASC) DISTRIBUTED BY HASH(Id)
    );

    INSERT INTO Dummy
    VALUES
    (
        102,
        "DDD",
        "EEE",
        new SQL.MAP<string, string>{{"string1", "string2"}}
    );

    ---------------

    The error:

    <label class="msportalfx-text-label" data-bind="text: descriptionLabel" style="font-family:az_ea_font, wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif;line-height:normal;text-transform:uppercase;color:#2d3239;">DESCRIPTION</label>
    A build error has occurred when C++ compiler or linker tried to build generated native code.
    <label class="msportalfx-text-label" data-bind="text: resolutionLabel" style="font-family:az_ea_font, wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif;line-height:normal;text-transform:uppercase;color:#2d3239;">RESOLUTION</label>
    Please contact support.
    <label class="msportalfx-text-label" data-bind="text: detailsLabel" style="font-family:az_ea_font, wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif;line-height:normal;text-transform:uppercase;color:#2d3239;">DETAILS</label>
    
    <label class="msportalfx-text-label" data-bind="text: titleLabel" style="font-family:az_ea_font, wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif;line-height:normal;text-transform:uppercase;color:#2d3239;">ERROR</label>
    
    E_RUNTIME_SYSTEM_GENERATEDCPPCODEFAILEDTOCOMPILE
    <label class="msportalfx-text-label" data-bind="text: messageLabel" style="font-family:az_ea_font, wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif;line-height:normal;text-transform:uppercase;color:#2d3239;">MESSAGE</label>
    Error compiling C++ code: exit code 2 ------ Command: D:\data\CPPSDK\VS14RTM\VC\bin\cl.exe /nologo /c /bigobj /Bt+ /DWIN32_LEAN_AND_MEAN /MD /W4 /WX /Zi /O2 /Bd /d2cgsummary /EHa /DCOMPILE_NATIVE /wd4125 /wd4627 /wd4800 /wd4702 /DUSE_SSE4_2 /ID:\data\CPPSDK\VS14RTM\VC\include /ID:\data\CPPSDK\VS14RTM\SDK\include /ID:\data\CPPSDK\VS14RTM\SDK\include\um /ID:\data\CPPSDK\VS14RTM\SDK\include\shared /ID:\data\CPPSDK\VS14RTM\SDK\include\ucrt /ID:\data\CCS\jobs\3f09b77c-6252-4ffa-9850-4d4b76ef6a60_v0\ /ID:\data\CCS\jobs\3f09b77c-6252-4ffa-9850-4d4b76ef6a60_v0 /DCOMPILE_ALL_VERTICES /DCOMPILE_INIT_SHUTDOWN __ScopeCodeGenEngine__.dll.cpp /Fo__ScopeCodeGenEngine__.dllNative.obj /Yu /Fp__ScopeCodeGenEngine__.dllNative_pch.pch /Fd__ScopeCodeGenEngine__.dllNative_pch.pdb ------ __ScopeCodeGenEngine__.dll.cpp ENC_CWD=D:\data\CCS\jobs\3f09b77c-6252-4ffa-9850-4d4b76ef6a60_v0 ENC_CL=D:\data\CPPSDK\VS14RTM\VC\bin\cl.exe ENC_SRC=__ScopeCodeGenEngine__.dll.cpp ENC_PDB=D:\data\CCS\jobs\3f09b77c-6252-4ffa-9850-4d4b76ef6a60_v0\__ScopeCodeGenEngine__.dllNative_pch.pdb ENC_CMD=-nologo -c -bigobj -Bt+ -DWIN32_LEAN_AND_MEAN -MD -W4 -WX -Zi -O2 -Bd -d2cgsummary -EHa -DCOMPILE_NATIVE -wd4125 -wd4627 -wd4800 -wd4702 -DUSE_SSE4_2 -ID:\data\CPPSDK\VS14RTM\VC\include -ID:\data\CPPSDK\VS14RTM\SDK\include -ID:\data\CPPSDK\VS14RTM\SDK\include\um -ID:\data\CPPSDK\VS14RTM\SDK\include\shared -ID:\data\CPPSDK\VS14RTM\SDK\include\ucrt -ID:\data\CCS\jobs\3f09b77c-6252-4ffa-9850-4d4b76ef6a60_v0\ -ID:\data\CCS\jobs\3f09b77c-6252-4ffa-9850-4d4b76ef6a60_v0 -DCOMPILE_ALL_VERTICES -DCOMPILE_INIT_SHUTDOWN -Yu -FpD:\data\CCS\jobs\3f09b77c-6252-4ffa-9850-4d4b76ef6a60_v0\__ScopeCodeGenEngine__.dllNative_pch.pch -TP -X `D:\data\CPPSDK\VS14RTM\VC\bin\c1xx.dll -zm0x00007FF74C605570 -allChunksReserved -il D:\data\Temp\_CL_9a1fe024 -typedil -f __ScopeCodeGenEngine__.dll.cpp -Ze -D_MSC_EXTENSIONS -Zp16 -ZB64 -D_INTEGRAL_MAX_BITS=64 -pc \:/ -D_MSC_VER=1900 -D_MSC_FULL_VER=190023506 -D_MSC_BUILD=0 -D_M_AMD64=100 -ZILP448 -D_M_X64=100 -D_WIN64 -D_WIN32 -GS -GR -D_CPPRTTI -Zc:forScope -Zc:wchar_t -nologo -DWIN32_LEAN_AND_MEAN -D_MT -D_DLL -W 4 -WX -Zi -GF -Og -Oi -Ot -Oy -Bd -EHa -D_CPPUNWIND -DCOMPILE_NATIVE -wd 4125 -wd 4627 -wd 4800 -wd 4702 -DUSE_SSE4_2 -I D:\data\CPPSDK\VS14RTM\VC\include -I D:\data\CPPSDK\VS14RTM\SDK\include -I D:\data\CPPSDK\VS14RTM\SDK\include\um -I D:\data\CPPSDK\VS14RTM\SDK\include\shared -I D:\data\CPPSDK\VS14RTM\SDK\include\ucrt -I D:\data\CCS\jobs\3f09b77c-6252-4ffa-9850-4d4b76ef6a60_v0\ -I D:\data\CCS\jobs\3f09b77c-6252-4ffa-9850-4d4b76ef6a60_v0 -DCOMPILE_ALL_VERTICES -DCOMPILE_INIT_SHUTDOWN -Fo__ScopeCodeGenEngine__.dllNative.obj -Yu -Fp__ScopeCodeGenEngine__.dllNative_pch.pch -Fd__ScopeCodeGenEngine__.dllNative_pch.pdb' __ScopeCodeGenEngine__.dll.cpp(912): error C2065: 'tmp_map_0': undeclared identifier time(D:\data\CPPSDK\VS14RTM\VC\bin\c1xx.dll)=0.19246s < 561358563651 - 561359013676 > BB [D:\data\CCS\jobs\3f09b77c-6252-4ffa-9850-4d4b76ef6a60_v0\__ScopeCodeGenEngine__.dll.cpp]

    It also throws the same error when using SQL.ARRAY.
    CREATE TABLE works fine and INSERT of basic data types also works fine.
    Can someone explain to me what happened and what can be done?

    Thanks.

    Tuesday, January 17, 2017 10:42 AM

All replies