[improvement](stream load)(cherry-pick) support hll_from_base64 for stream load column mapping (#36819)
picked from https://github.com/apache/doris/pull/35923
This commit is contained in:
@ -178,6 +178,7 @@ public class FunctionSet<T> {
|
||||
public static final String HLL_UNION_AGG = "hll_union_agg";
|
||||
public static final String HLL_RAW_AGG = "hll_raw_agg";
|
||||
public static final String HLL_CARDINALITY = "hll_cardinality";
|
||||
public static final String HLL_FROM_BASE64 = "hll_from_base64";
|
||||
|
||||
public static final String TO_BITMAP = "to_bitmap";
|
||||
public static final String TO_BITMAP_WITH_CHECK = "to_bitmap_with_check";
|
||||
|
||||
@ -280,9 +280,11 @@ public class FileLoadScanNode extends FileScanNode {
|
||||
}
|
||||
FunctionCallExpr fn = (FunctionCallExpr) expr;
|
||||
if (!fn.getFnName().getFunction().equalsIgnoreCase(FunctionSet.HLL_HASH) && !fn.getFnName()
|
||||
.getFunction().equalsIgnoreCase("hll_empty")) {
|
||||
.getFunction().equalsIgnoreCase("hll_empty")
|
||||
&& !fn.getFnName().getFunction().equalsIgnoreCase(FunctionSet.HLL_FROM_BASE64)) {
|
||||
throw new AnalysisException("HLL column must use " + FunctionSet.HLL_HASH + " function, like "
|
||||
+ destSlotDesc.getColumn().getName() + "=" + FunctionSet.HLL_HASH + "(xxx) or "
|
||||
+ destSlotDesc.getColumn().getName() + "=" + FunctionSet.HLL_FROM_BASE64 + "(xxx) or "
|
||||
+ destSlotDesc.getColumn().getName() + "=hll_empty()");
|
||||
}
|
||||
expr.setType(org.apache.doris.catalog.Type.HLL);
|
||||
|
||||
Reference in New Issue
Block a user