-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[CALCITE-6690] Arrow adapter support DECIMAL with precision and scale #4092
Conversation
81e9176
to
89d1317
Compare
|
||
ArrowFieldType(Class<?> clazz) { | ||
this.clazz = clazz; | ||
private ArrowFieldType() { |
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.
this looks like a factory, so the name of the class is probably not appropriate.
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.
Do you need me to optimize it?
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.
you don't need to optimize anything, just use a name that is appropriate. This is not a type, it is a class which creates types, so it is a factory.
@@ -237,35 +239,38 @@ public void writeArrowDataType(File file) throws IOException { | |||
vectorSchemaRoot.setRowCount(numRows); | |||
for (Field field : vectorSchemaRoot.getSchema().getFields()) { | |||
FieldVector vector = vectorSchemaRoot.getVector(field.getName()); | |||
switch (vector.getMinorType()) { | |||
case TINYINT: | |||
switch (field.getName()) { |
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.
why change these?
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.
Sorry for taking so long to reply.
This is because I set two fields for decimal type, one with scale 2 and one with scale 3. Since there are two decimal types, it is no longer appropriate to distinguish based on data type.
I chose the field name to distinguish
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.
So, this is just test code. Can you change the file name to ArrowTestData?
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.
@mihaibudiu thanks, done
ce2e5c5
to
7c22892
Compare
…brary in SqlOperatorTest
…ameter is Boolean, String, Date, Time and Timestamp types
… is too narrow Signed-off-by: Mihai Budiu <mbudiu@feldera.com>
Signed-off-by: Mihai Budiu <mbudiu@feldera.com>
Signed-off-by: Mihai Budiu <mbudiu@feldera.com>
Signed-off-by: Mihai Budiu <mbudiu@feldera.com>
…y is affected by the order of hosts Update ElasticsearchSchemaFactory.java Add unit test add unit test Modify code implementation and unit test Reformat code Test unit is compatible with Java8 Reformat code Reformat code Reformat code Add jira link
…s, maps without regard to element types Signed-off-by: Mihai Budiu <mbudiu@feldera.com>
For certain query patterns RelMdUniqueKeys handler generates an exponentially large number of unique keys that results into crashes and OOM errors. The limit guards against the combinatorial explosion that may appear for such use-cases and provides the users of a way to tune further the upper bound if needed. Close apache#4089
…hich are arguments of unused aggregate functions
Signed-off-by: Mihai Budiu <mbudiu@feldera.com>
I'm sorry I messed up the branches, I'll make a new PR |
Quality Gate passedIssues Measures |
No description provided.