[
https://issues.apache.org/jira/browse/HIVE-25969?focusedWorklogId=764956&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-764956
]
ASF GitHub Bot logged work on HIVE-25969:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 02/May/22 13:47
Start Date: 02/May/22 13:47
Worklog Time Spent: 10m
Work Description: kasakrisz opened a new pull request, #3045:
URL: https://github.com/apache/hive/pull/3045
### What changes were proposed in this pull request?
Introduce parser token and rule for `default` keyword.
Use the Token in SemanticAnalyzers when replacing `default` keyword with
default constraint values.
### Why are the changes needed?
Prior this patch
* the `default` keyword was treated as an identifier.
* and the lookup in the sql text was done by exact match of the string
`default` in some cases.
### Does this PR introduce _any_ user-facing change?
Yes, see jira for example.
### How was this patch tested?
```
mvn test -Dtest.output.overwrite -DskipSparkTests
-Dtest=TestMiniLlapLocalCliDriver
-Dqfile=insert_into_default_keyword.q,insert_into_default_keyword_2.q -pl
itests/qtest -Pitests
mvn test -Dtest=TestParseDefault -pl parser
```
Issue Time Tracking
-------------------
Worklog Id: (was: 764956)
Time Spent: 40m (was: 0.5h)
> Unable to reference table column named default
> ----------------------------------------------
>
> Key: HIVE-25969
> URL: https://issues.apache.org/jira/browse/HIVE-25969
> Project: Hive
> Issue Type: Bug
> Components: Parser
> Reporter: Krisztian Kasa
> Assignee: Krisztian Kasa
> Priority: Major
> Labels: pull-request-available
> Time Spent: 40m
> Remaining Estimate: 0h
>
> {code}
> CREATE TABLE t1 (a int, `default` int) stored as orc TBLPROPERTIES
> ('transactional'='true');
> insert into t1 values (1, 2), (10, 11);
> update t1 set a = `default`;
> select * from t1;
> {code}
> result is
> {code}
> NULL NULL
> NULL NULL
> {code}
> but it should be
> {code}
> 11 11
> 2 2
> {code}
--
This message was sent by Atlassian Jira
(v8.20.7#820007)