[
https://issues.apache.org/jira/browse/KYLIN-4495?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17134736#comment-17134736
]
ASF GitHub Bot commented on KYLIN-4495:
---------------------------------------
RupengWang edited a comment on pull request #1226:
URL: https://github.com/apache/kylin/pull/1226#issuecomment-643605367
## Design test cases
### Prepare test env
#### source table
Create hive table using local csv file
1. create local csv file
id,name,dt
1,wang,2019/01/01
2,zhang,2019/01/02
3,Lee,2019/01/03
4,Liu,2019/01/04
2. create table in hive
```sql
CREATE TABLE wangrupeng.self_define_date(id int, name string, dt date) row
format serde 'org.apache.hadoop.hive.serde2.OpenCSVSerde' WITH SERDEPROPERTIES
("separatorChar"=",") STORED AS TEXTFILE;
```
3. local csv into hive table
```sql
load data local inpath '/root/wangrupeng/kylin-3.1.0/test.csv' overwrite
into table self_define_date;
```
#### Create a new model and cube
1. model
```json
{
"uuid": "ce9eaaeb-974d-1ae2-fb51-7333a6d7aab4",
"last_modified": 1592045287556,
"version": "3.0.0.20500",
"name": "test_selfdefine_date",
"owner": "ADMIN",
"is_draft": false,
"description": "",
"fact_table": "WANGRUPENG.SELF_DEFINE_DATE",
"lookups": [],
"dimensions": [
{
"table": "SELF_DEFINE_DATE",
"columns": [
"ID"
]
}
],
"metrics": [
"SELF_DEFINE_DATE.NAME"
],
"filter_condition": "",
"partition_desc": {
"partition_date_column": "SELF_DEFINE_DATE.DT",
"partition_time_column": null,
"partition_date_start": 0,
"partition_date_format": "yyyy/MM/dd",
"partition_time_format": "HH:mm:ss",
"partition_type": "APPEND",
"partition_condition_builder":
"org.apache.kylin.metadata.model.PartitionDesc$DefaultPartitionConditionBuilder"
},
"capacity": "MEDIUM",
"projectName": "learn_kylin"
}
```
2. cube
```json
{
"uuid": "96fc0227-ad30-49ca-316b-b23df48dff5e",
"last_modified": 1592045402854,
"version": "3.0.0.20500",
"name": "test_selfdefine_cube",
"is_draft": false,
"model_name": "test_selfdefine_date",
"description": "",
"null_string": null,
"dimensions": [
{
"name": "ID",
"table": "SELF_DEFINE_DATE",
"column": "ID",
"derived": null
}
],
"measures": [
{
"name": "_COUNT_",
"function": {
"expression": "COUNT",
"parameter": {
"type": "constant",
"value": "1"
},
"returntype": "bigint"
}
}
],
"dictionaries": [],
"rowkey": {
"rowkey_columns": [
{
"column": "SELF_DEFINE_DATE.ID",
"encoding": "dict",
"encoding_version": 1,
"isShardBy": false
}
]
},
"hbase_mapping": {
"column_family": [
{
"name": "F1",
"columns": [
{
"qualifier": "M",
"measure_refs": [
"_COUNT_"
]
}
]
}
]
},
"aggregation_groups": [
{
"includes": [
"SELF_DEFINE_DATE.ID"
],
"select_rule": {
"hierarchy_dims": [],
"mandatory_dims": [],
"joint_dims": []
}
}
],
"signature": "ZIYGtYJLdlaTYyih6VMUyQ==",
"notify_list": [],
"status_need_notify": [
"ERROR",
"DISCARDED",
"SUCCEED"
],
"partition_date_start": 0,
"partition_date_end": 3153600000000,
"auto_merge_time_ranges": [],
"volatile_range": 0,
"retention_range": 0,
"engine_type": 2,
"storage_type": 2,
"override_kylin_properties": {},
"cuboid_black_list": [],
"parent_forward": 3,
"mandatory_dimension_set_list": [],
"snapshot_table_desc_list": []
}
```
### Case-1
```sql
```
----------------------------------------------------------------
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:
[email protected]
> Support custom date formats for partition date column
> -----------------------------------------------------
>
> Key: KYLIN-4495
> URL: https://issues.apache.org/jira/browse/KYLIN-4495
> Project: Kylin
> Issue Type: Improvement
> Components: Job Engine
> Reporter: Zhichao Zhang
> Assignee: Zhichao Zhang
> Priority: Minor
> Fix For: v3.1.0
>
>
> Support custom date formats for partition date column.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)