Skip to content

interface conversion: expression.Expression is *expression.ScalarFunction, not *expression.Column #29401

@ChenPeng2013

Description

@ChenPeng2013

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

use test;
drop table if exists t;
CREATE TABLE `t` (
  `id` int(11) NOT NULL,
  `a` bigint(20) DEFAULT NULL,
  `b` char(20) DEFAULT NULL,
  `c` datetime DEFAULT NULL,
  `d` double DEFAULT NULL,
  `e` json DEFAULT NULL,
  `f` decimal(40,6) DEFAULT NULL,
  PRIMARY KEY (`id`) /*T![clustered_index] CLUSTERED */,
  KEY `a` (`a`),
  KEY `b` (`b`),
  KEY `c` (`c`),
  KEY `d` (`d`),
  KEY `f` (`f`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
explain select /*+ inl_hash_join(t1) */ * from t t1 join t t2 on t1.b=t2.e;

2. What did you expect to see? (Required)

3. What did you see instead (Required)

mysql> explain select /*+ inl_hash_join(t1) */ * from t t1 join t t2 on t1.b=t2.e;
ERROR 1105 (HY000): interface conversion: expression.Expression is *expression.ScalarFunction, not *expression.Column

4. What is your TiDB version? (Required)

Release Version: v5.3.0-alpha-1311-gb561dface
Edition: Community
Git Commit Hash: b561dface8b0b6408bc067189cf0bcbfd5c6d617
Git Branch: master
UTC Build Time: 2021-11-03 07:33:21
GoVersion: go1.17.2
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false

Metadata

Metadata

Assignees

Labels

affects-5.0This bug affects 5.0.x versions.affects-5.1This bug affects 5.1.x versions.affects-5.2This bug affects 5.2.x versions.affects-5.3This bug affects 5.3.x versions.severity/majorsig/plannerSIG: Plannertype/bugThe issue is confirmed as a bug.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions