hpcc-systems/HPCC-Platform — Issue #1647: #SET Compiler Error
Author: bobf2000
Created: 2012-02-22 13:21:20+00:00
State: open

#SET compiler error

The #GETDATATYPE example in the Language Reference uses a #SET statement to set a symbol to a string that identifies a field name in a dataset. That symbol is then used in a #GETDATATYPE statement.

In the latest community edition (6.0.4.3.682), this statement produces the following error:

LOADXML('');
ds := DATASET([{1234},{5678}], {UNSIGNED4 id});
#DECLARE(fieldtype);
#DECLARE(field);

#SET(field, 'ds.id'); //Error: Unknown identifier "ds" (1, 4), 2167,

#SET(fieldtype, #GETDATATYPE(%field%));

This same code compiles OK in the Legacy Enterprise Edition 5.7.3.2.682 (Build 689_44), although I get an "Unknown_type" when viewing the fieldtype in the output.