Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【1.1.15】Fix Datatype Decimal Error #265

Merged
merged 2 commits into from
Sep 3, 2023

Conversation

v-kkhuang
Copy link

@v-kkhuang v-kkhuang commented Aug 31, 2023

What is the purpose of the change

When trino queries a table containing a decimal field, the metadata of that field is converted to a string

Reason:
The column type returned by trino is decimal (10, 8), containing spaces. Regular matching converted to DecimalType does not support spaces, so the default conversion is to string.

Related issues/PRs

Related issues: apache#4892

Brief change log

  • Define the core abstraction and interfaces of the EngineConn Factory;
  • Define the core abstraction and interfaces of Executor Manager.

Checklist

  • I have read the Contributing Guidelines on pull requests.
  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible (If not, please discuss on the Linkis mailing list first)
  • If this is a code change: I have written unit tests to fully verify the new behavior.

@@ -62,7 +63,7 @@ object DataType extends Logging {
case "date" => DateType
case "timestamp" => TimestampType
case "binary" => BinaryType
case "decimal" | DECIMAL_REGEX() => DecimalType
case "decimal" | DECIMAL_REGEX() | DECIMAL_REGEX_BLANK() => DecimalType
case ARRAY_REGEX() => ArrayType

Choose a reason for hiding this comment

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

补充 单元测试

Choose a reason for hiding this comment

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

^decimal\\(\\d*\\,\\d*\\)
^decimal\\(\\s*\\d*\\s*,\\s*\\d*\\s*\\)

Copy link
Author

Choose a reason for hiding this comment

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

done

@casionone casionone merged commit 8357064 into dev-1.1.15-webank Sep 3, 2023
8 of 18 checks passed
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.

None yet

2 participants