Skip to content

Conversation

@pdet
Copy link
Collaborator

@pdet pdet commented Feb 12, 2024

Fix: #9201

@pdet pdet requested a review from Tishj February 12, 2024 15:05
Copy link
Collaborator

@Mytherin Mytherin left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! LGTM - minor comments:

@github-actions github-actions bot marked this pull request as draft February 12, 2024 17:36
@pdet pdet marked this pull request as ready for review February 13, 2024 16:21
// Find the positions of the commas
size_t pos1 = parameters.find(','); // Position of the first comma
size_t pos2 = parameters.find(',', pos1 + 1); // Position of the second comma

Copy link
Contributor

@Tishj Tishj Feb 13, 2024

Choose a reason for hiding this comment

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

D_ASSERT(pos1 != std::string::npos)

Copy link
Contributor

@Tishj Tishj left a comment

Choose a reason for hiding this comment

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

Looks good!

@pdet
Copy link
Collaborator Author

pdet commented Feb 19, 2024

@Mytherin I think the errors are related to secrets, maybe we can restart the CI?

} else if (format == "g") {
return make_uniq<ArrowType>(LogicalType::DOUBLE);
} else if (format[0] == 'd') { //! this can be either decimal128 or decimal 256 (e.g., d:38,0)
std::string parameters = format.substr(format.find(':'));
Copy link
Collaborator

Choose a reason for hiding this comment

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

These format strings come to us from an external source, so I think it would make sense to be defensive here. We never know if some library could produce just d as a schema. Could we check that format.find(':') and parameters.find(',') return valid positions and throw if they do not?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Perhaps using StringUtil::Split is easier to use in a defensive way since then you don't need to do all this arithmetic on string positions which is somewhat error prone

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Excellent idea

@Mytherin
Copy link
Collaborator

Mytherin commented Feb 19, 2024

@Mytherin I think the errors are related to secrets, maybe we can restart the CI?

Restarting won't fix the CI since these issues are present in the main branch at the time when this PR was opened - restarting only reruns the CI jobs it doesn't re-merge with the latest main

@github-actions github-actions bot marked this pull request as draft February 19, 2024 12:36
@Mytherin Mytherin marked this pull request as ready for review February 19, 2024 13:30
@Mytherin Mytherin merged commit 52363bb into duckdb:main Feb 20, 2024
@Mytherin
Copy link
Collaborator

Thanks!

github-actions bot pushed a commit to duckdb/duckdb-r that referenced this pull request Mar 15, 2024
Merge pull request duckdb/duckdb#10601 from pdet/throw_256
Merge pull request duckdb/duckdb#10768 from Tishj/pandas_analyze_overflow
@pdet pdet deleted the throw_256 branch June 25, 2024 09:34
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.

pyarrow decimal256 values are being lost

3 participants