[
https://issues.apache.org/jira/browse/HIVE-21090?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16736893#comment-16736893
]
hunshenshi commented on HIVE-21090:
-----------------------------------
[~jcamachorodriguez]
Error log is simple, can't see more info.
The error log
{code:java}
2019-01-05T15:18:55,723 ERROR [9cdc213c-9332-4ef6-bbc0-d390b7f1b1c7 main]
calcite.RelOptHiveTable: No Stats for db@table, Columns: columName
2019-01-05T15:18:55,724 ERROR [9cdc213c-9332-4ef6-bbc0-d390b7f1b1c7 main]
parse.CalcitePlanner: CBO failed due to missing column stats (see previous
errors), skipping CBO
{code}
If log level is debug, log like this
{code:java}
2019-01-05T15:18:55,617 DEBUG [9cdc213c-9332-4ef6-bbc0-d390b7f1b1c7 main]
parse.CalcitePlanner: CBO Planning details:
2019-01-05T15:18:55,617 DEBUG [9cdc213c-9332-4ef6-bbc0-d390b7f1b1c7 main]
parse.CalcitePlanner: Original Plan:
HiveSortLimit(offset=[0], fetch=[100])
HiveProject(label=[$0])
HiveFilter(condition=[AND(=($10, _UTF-16LE'2018-12-31'), =($1,
_UTF-16LE'0443E82E71D9D278BB'), =($3, _UTF-16LE'10790074'), =($4, 1546223802))])
HiveTableScan(table=[[db.table]], table:alias=[table])
2019-01-05T15:18:55,618 DEBUG [9cdc213c-9332-4ef6-bbc0-d390b7f1b1c7 main]
parse.CalcitePlanner: Plan After PPD, PartPruning, ColumnPruning:
HiveSortLimit(fetch=[100])
HiveProject(label=[$0])
HiveProject(label=[$0],
token=[CAST(_UTF-16LE'0443E82E71D9D278BB'):VARCHAR(2147483647) CHARACTER SET
"UTF-16LE" COLLATE "ISO-8859-1$en_US$primary"],
info_id=[CAST(_UTF-16LE'10790074'):VARCHAR(2147483647) CHARACTER SET "UTF-16LE"
COLLATE "ISO-8859-1$en_US$primary"], timestamp=[CAST(1546223802):BIGINT],
dt=[CAST(_UTF-16LE'2018-12-31'):VARCHAR(2147483647) CHARACTER SET "UTF-16LE"
COLLATE "ISO-8859-1$en_US$primary"])
HiveFilter(condition=[AND(=($10, _UTF-16LE'2018-12-31'), =($1,
_UTF-16LE'0443E82E71D9D278BB'), =($3, _UTF-16LE'10790074'), =($4, 1546223802))])
HiveTableScan(table=[[db.table]], table:alias=[table])
{code}
only this log missing
{code:java}
LOG.debug("Plan After Join Reordering:\n"
+ RelOptUtil.toString(calciteOptimizedPlan, SqlExplainLevel.ALL_ATTRIBUTES));
{code}
Is it helpful?
> If log level is debug, CBO will fail
> ------------------------------------
>
> Key: HIVE-21090
> URL: https://issues.apache.org/jira/browse/HIVE-21090
> Project: Hive
> Issue Type: Bug
> Components: CBO
> Affects Versions: 2.3.2, 2.3.4
> Reporter: hunshenshi
> Assignee: hunshenshi
> Priority: Major
>
> If log level is debug, sql like
> {code:java}
> select * from table where partition='xx' and condition='xx'{code}
> the CBO will fail.
>
> I find it case by
> {code:java}
> LOG.debug("Plan After Join Reordering:\n"
> + RelOptUtil.toString(calciteOptimizedPlan, SqlExplainLevel.ALL_ATTRIBUTES));
> {code}
> in CalcitePlanner.java
>
> delete
> {code:java}
> SqlExplainLevel.ALL_ATTRIBUTES {code}
> , will be all rigth.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)