[
https://issues.apache.org/jira/browse/BEAM-7554?focusedWorklogId=429392&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-429392
]
ASF GitHub Bot logged work on BEAM-7554:
----------------------------------------
Author: ASF GitHub Bot
Created on: 01/May/20 07:15
Start Date: 01/May/20 07:15
Worklog Time Spent: 10m
Work Description: reuvenlax commented on a change in pull request #11456:
URL: https://github.com/apache/beam/pull/11456#discussion_r418443258
##########
File path:
sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/rel/BeamAggregationRel.java
##########
@@ -257,10 +257,8 @@ private Transform(
// Combining over a single field, so extract just that field.
combined =
(combined == null)
- ? byFields.aggregateFieldBaseValue(
- inputs.get(0), combineFn, fieldAggregation.outputField)
- : combined.aggregateFieldBaseValue(
- inputs.get(0), combineFn, fieldAggregation.outputField);
+ ? byFields.aggregateField(inputs.get(0), combineFn,
fieldAggregation.outputField)
+ : combined.aggregateField(inputs.get(0), combineFn,
fieldAggregation.outputField);
Review comment:
I'm not sure I agree with this change. I think it's important that SQL
work over user logical types by interpreting it as the base value. The user
writing the SQL statement usually understands the base type of their logical
type, and can write the SQL statement appropriately. This will break that.
##########
File path:
sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/rel/BeamCalcRel.java
##########
@@ -416,36 +417,33 @@ private static Expression value(
Expression value =
Expressions.convert_(
- Expressions.call(
- expression,
- "getBaseValue",
- Expressions.constant(index),
- Expressions.constant(convertTo)),
- convertTo);
+ Expressions.call(expression, "getValue",
Expressions.constant(index)), convertTo);
Review comment:
I have the same concern with this change.
##########
File path: sdks/java/core/src/main/java/org/apache/beam/sdk/schemas/Schema.java
##########
@@ -419,7 +420,6 @@ public int hashCode() {
FLOAT,
DOUBLE,
STRING, // String.
- DATETIME, // Date and time.
Review comment:
I'm a little worried about this. Empirically many users are using
schemas. Maybe we should start off by leaving DATETIME around and remove it
later in another PR?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 429392)
Time Spent: 0.5h (was: 20m)
> datetime and decimal should be logical types
> --------------------------------------------
>
> Key: BEAM-7554
> URL: https://issues.apache.org/jira/browse/BEAM-7554
> Project: Beam
> Issue Type: Improvement
> Components: dsl-sql, sdk-java-core
> Reporter: Brian Hulette
> Priority: Major
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> Currently datetime and decimal are implemented as primitive types in the Java
> SDK. They should be logical types as documented in
> https://s.apache.org/beam-schemas
--
This message was sent by Atlassian Jira
(v8.3.4#803005)