Description
The front-end exports TDS files, and will verify various duplicate names through this interface /kylin/api/models/validate_export.
Before verification, all the columns of the model table will be obtained and stored in a map such as Map<String, Column Def> model Cols Map. The Column Def in this map will have an is Hidden attribute, which is true by default, which means to hide the column in TDS.
However, when verifying the duplicate names of metrics, table columns, and dimension names, the model Cols Map will be obtained to get the columns from it and perform column Def.is Hidden() filtering. Obviously all columns will be filtered out. Caused the mistake to avoid the duplicate name check. Therefore, an error will be reported when importing tableau.
Fix Design
When verifying duplicate names, remove the filtering of the model Cols Map.
前端导出TDS文件,会通过此接口/kylin/api/models/validate_export校验各种重名问题。
在校验前会获取到模型表的所有列,存储在Map<String, ColumnDef> modelColsMap这样一个map中。这个map中的ColumnDef会有一个isHidden属性,默认为true,含义就是在TDS中隐藏该列。
但是后续在进行度量与表列以及维度名重名校验时,会获取到modelColsMap这个map从中拿到列,进行columnDef.isHidden()过滤。显然所有列都会被过滤掉。导致错误的避开了重名校验。因此,在导入tableau时会报错。
Fix Design
重名校验时,去掉对modelColsMap 的过滤。