-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[enhance](hive) Add regression-test cases for hive text ddl and hive text insert and fix reading null string bug #42200
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
[enhance](hive) Add regression-test cases for hive text ddl and hive text insert and fix reading null string bug #42200
Conversation
|
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
morningman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
|
run buildall |
|
run external |
92b7ecb to
74df02b
Compare
|
run buildall |
|
run buildall |
|
clang-tidy review says "All clean, LGTM! 👍" |
morningman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
PR approved by at least one committer and no changes requested. |
…text insert and fix reading null string bug (apache#42200) ## Proposed changes Add regression-test cases for hive text table properties: | **Property** | **Description** | **Example Value** | **Supported in Doris** | |------------------------------|---------------------------------------------------------------------|-------------------|----------------------| | `field.delim` | Defines the delimiter between columns in each row. | `\1` | Yes | | `collection.delim` | Defines the delimiter for items in an array (collection type). | `\2` | Yes | | `mapkey.delim` | Defines the delimiter between keys and values in a map. | `\3` | Yes | | `serialization.null.format` | Defines how `NULL` values are represented in the text file. | `\\N` | Yes | | `escape.delim` | Specifies the escape character used for escaping special characters.| `\\` | Yes | | `line.delim` | Defines the delimiter between rows or lines in the file. | `\n` | Yes | ### Explanation: - **`field.delim`**: This property is used to specify how columns are separated in a row. For example, `\1` indicates the delimiter is a non-printable character. - **`collection.delim`**: Used to define how elements in an array or collection are separated. In this case, `\2` is used as a separator. - **`mapkey.delim`**: This property defines how keys and values in a map are separated. For instance, `\3` is used to separate map keys and values. - **`serialization.null.format`**: This setting specifies the format for `NULL` values in the data. `\\N` is commonly used to represent `NULL`. - **`escape.delim`**: Defines the escape character used in the text file for escaping special characters, such as the delimiter itself. Here, `\\` is used as the escape character. - **`line.delim`**: This property is used to specify the delimiter between lines or rows. Typically, `\n` (newline) is used as the line delimiter. **Note**: Unlike the other delimiters, `line.delim` is not escaped. If the content in the table contains the same character as the line delimiter, it may cause query errors. However, the other delimiters (`field.delim`, `collection.delim`, `mapkey.delim`) are escaped, so they will not cause issues.
…text insert and fix reading null string bug (apache#42200) ## Proposed changes Add regression-test cases for hive text table properties: | **Property** | **Description** | **Example Value** | **Supported in Doris** | |------------------------------|---------------------------------------------------------------------|-------------------|----------------------| | `field.delim` | Defines the delimiter between columns in each row. | `\1` | Yes | | `collection.delim` | Defines the delimiter for items in an array (collection type). | `\2` | Yes | | `mapkey.delim` | Defines the delimiter between keys and values in a map. | `\3` | Yes | | `serialization.null.format` | Defines how `NULL` values are represented in the text file. | `\\N` | Yes | | `escape.delim` | Specifies the escape character used for escaping special characters.| `\\` | Yes | | `line.delim` | Defines the delimiter between rows or lines in the file. | `\n` | Yes | ### Explanation: - **`field.delim`**: This property is used to specify how columns are separated in a row. For example, `\1` indicates the delimiter is a non-printable character. - **`collection.delim`**: Used to define how elements in an array or collection are separated. In this case, `\2` is used as a separator. - **`mapkey.delim`**: This property defines how keys and values in a map are separated. For instance, `\3` is used to separate map keys and values. - **`serialization.null.format`**: This setting specifies the format for `NULL` values in the data. `\\N` is commonly used to represent `NULL`. - **`escape.delim`**: Defines the escape character used in the text file for escaping special characters, such as the delimiter itself. Here, `\\` is used as the escape character. - **`line.delim`**: This property is used to specify the delimiter between lines or rows. Typically, `\n` (newline) is used as the line delimiter. **Note**: Unlike the other delimiters, `line.delim` is not escaped. If the content in the table contains the same character as the line delimiter, it may cause query errors. However, the other delimiters (`field.delim`, `collection.delim`, `mapkey.delim`) are escaped, so they will not cause issues.
## Proposed changes fellow #42200 Null values in text tables are now correctly recognized now.
## Proposed changes fellow apache#42200 Null values in text tables are now correctly recognized now.
## Proposed changes fellow apache#42200 Null values in text tables are now correctly recognized now.
## Proposed changes fellow #42200 Null values in text tables are now correctly recognized now.
Proposed changes
Add regression-test cases for hive text table properties:
field.delim\1collection.delim\2mapkey.delim\3serialization.null.formatNULLvalues are represented in the text file.\\Nescape.delim\\line.delim\nExplanation:
field.delim: This property is used to specify how columns are separated in a row. For example,\1indicates the delimiter is a non-printable character.collection.delim: Used to define how elements in an array or collection are separated. In this case,\2is used as a separator.mapkey.delim: This property defines how keys and values in a map are separated. For instance,\3is used to separate map keys and values.serialization.null.format: This setting specifies the format forNULLvalues in the data.\\Nis commonly used to representNULL.escape.delim: Defines the escape character used in the text file for escaping special characters, such as the delimiter itself. Here,\\is used as the escape character.line.delim: This property is used to specify the delimiter between lines or rows. Typically,\n(newline) is used as the line delimiter.Note: Unlike the other delimiters,
line.delimis not escaped. If the content in the table contains the same character as the line delimiter, it may cause query errors. However, the other delimiters (field.delim,collection.delim,mapkey.delim) are escaped, so they will not cause issues.