kangkaisen commented on issue #2932: TupleIsNullPredicate lead BE core URL: https://github.com/apache/incubator-doris/issues/2932#issuecomment-588043016 The logic chain is following: 1. `date_format(if(, NULL, `dt`), '%Y%m%d')` as HASH_PARTITIONED exprs,which is not right, we should use Agg intermediate materialized slot 2. we don't use Agg intermediate materialized slot as HASH_PARTITIONED exprs, becasue ``` // the parent fragment is partitioned on the grouping exprs; // substitute grouping exprs to reference the *output* of the agg, not the input partitionExprs = Expr.substituteList(partitionExprs, node.getAggInfo().getIntermediateSmap(), ctx_.getRootAnalyzer(), false); parentPartition = DataPartition.hashPartitioned(partitionExprs); ``` the partitionExprs substitute failed。 3. partitionExprs substitute failed because partitionExprs has a casttodate child,but agg info getIntermediateSmap has a cast in datetime child. 4. The cast to date or cast to datetime child exist because `TupleIsNullPredicate` insert a `if` Expr. we don't have `if date` fn, so Doris use `if int` Expr. 5. the `date` in the `catstodate` depend on slot dt date type. the `datetime` in the `catstodatetime` depend on datetime arg type in `date_format` function.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org