Skip to content

Conversation

@tustvold
Copy link
Contributor

Which issue does this PR close?

Closes #.

Rationale for this change

Arrow 37 has some non-trivial breaking changes to schema handling, lets get ahead of this

What changes are included in this PR?

Are these changes tested?

Are there any user-facing changes?

@github-actions github-actions bot added core Core DataFusion crate logical-expr Logical plan and expressions optimizer Optimizer rules physical-expr Changes to the physical-expr crates labels Mar 29, 2023
@github-actions github-actions bot added the sql SQL Planner label Apr 7, 2023
})
.collect();
.collect::<Vec<_>>();
let arrays = arrays.iter().collect();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is temporary - see #5894

.map(|b| b.column(i).data())
.map(|b| b.column(i).to_data())
.collect::<Vec<_>>();
let arrays = arrays.iter().collect();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is temporary - see #5851

@github-actions github-actions bot added the sqllogictest SQL Logic Tests (.slt) label Apr 7, 2023
statement ok
create table foo as select
arrow_cast(100, 'Decimal128(3,2)') as col_d128
arrow_cast(100, 'Decimal128(5,2)') as col_d128
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This results from - apache/arrow-rs#3996

Which now complains (correctly) that 100 cannot be represented in an decimal with scale 2 and precision 3

Copy link
Contributor

Choose a reason for hiding this comment

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

cc @viirya

@tustvold tustvold marked this pull request as ready for review April 10, 2023 16:35
@github-actions github-actions bot added the substrait Changes to the substrait crate label Apr 10, 2023
Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

This looks good to me -- I haven't quite made it through this PR yet but what I have seen so far is good.

I plan to run the planning benchmark against this PR later today to see if it improves things

statement ok
create table foo as select
arrow_cast(100, 'Decimal128(3,2)') as col_d128
arrow_cast(100, 'Decimal128(5,2)') as col_d128
Copy link
Contributor

Choose a reason for hiding this comment

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

cc @viirya

df_schema.fields.into_iter().map(|f| f.field).collect(),
df_schema.metadata,
)
let fields: Fields = df_schema.fields.into_iter().map(|f| f.field).collect();
Copy link
Contributor

Choose a reason for hiding this comment

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

🤮 at least this should be cheaper at runtime

@alamb
Copy link
Contributor

alamb commented Apr 11, 2023

I took the liberty of merging up from main to resolve a conflict

Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

I think it looks great. Thank you @tustvold

I also ran the sql_planning benchmark, and sadly this branch doesn't show any improvements.

Given that this is a non trivial change that will take time to percolate through the ecosystem I plan to merge this shortly

@tustvold tustvold merged commit 6e819d6 into apache:main Apr 11, 2023
korowa pushed a commit to korowa/arrow-datafusion that referenced this pull request Apr 13, 2023
* Update arrow 37

* Fix avro

* Fix sql_planner benchmark

* Update arrow pin

* Format

* Fix test

* Remove pin

* Update version

* Fix logical merge conflicts

* Pyarrow clippy

* More clippy

* fixup

---------

Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Core DataFusion crate logical-expr Logical plan and expressions optimizer Optimizer rules physical-expr Changes to the physical-expr crates sql SQL Planner sqllogictest SQL Logic Tests (.slt) substrait Changes to the substrait crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants