Skip to content

Conversation

tiankonghewo
Copy link

No description provided.

@@ -203,7 +203,7 @@ Although there are some other MySQL rivers for Elasticsearch, like [elasticsearc
## Todo

+ MySQL 8
+ ES 6
+ ES 6 (After verification (version 6.4.2), it is now supported. Delete and update are supported)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Em, are you sure we can support ES 6 directly? Seem ES 6 has already removed doc Type?

if col.Type == schema.TYPE_STRING {
col.Type = schema.TYPE_DATETIME
v := r.makeReqColumnData(col, value)
str, _ := v.(string)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

switch v.(type) {
    case string:
    case []byte:
    default:
}

I think you can check string and []byte here.

river/sync.go Outdated
@@ -514,6 +514,15 @@ func (r *River) getFieldValue(col *schema.TableColumn, fieldType string, value i
case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
fieldValue = r.makeReqColumnData(col, time.Unix(v.Int(), 0).Format(mysql.TimeFormat))
}
} else {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use else if col.Type == schema.TYPE_STRING

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants