[ https://issues.apache.org/jira/browse/BEAM-7844?focusedWorklogId=286100&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-286100 ]
ASF GitHub Bot logged work on BEAM-7844: ---------------------------------------- Author: ASF GitHub Bot Created on: 31/Jul/19 17:56 Start Date: 31/Jul/19 17:56 Worklog Time Spent: 10m Work Description: akedin commented on pull request #9185: [BEAM-7844] Custom MetadataHandler for RowRateWindow URL: https://github.com/apache/beam/pull/9185#discussion_r309354365 ########## File path: sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/planner/RowRateWindow.java ########## @@ -0,0 +1,51 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.beam.sdk.extensions.sql.impl.planner; + +/** This is a utility class to represent rowCount, rate and window. */ +public class RowRateWindow { + private final double window; + private final double rate; + private final double rowCount; + + public static final RowRateWindow UNKNOWN = + new RowRateWindow( + Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY); + + public RowRateWindow(double rowCount, double rate, double window) { Review comment: when `rate` and `window` are zero it's not clear what it means. I recommend adding a factory method like `RowRateWindow.rowCount(relNode)` or `RowRateWindow.rowCount(count)` and add a comment there describing that the other values are zero and what it means for cost estimation ---------------------------------------------------------------- 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: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 286100) Time Spent: 1h 40m (was: 1.5h) > Custom MetadataHandler for RowRateWindow > ---------------------------------------- > > Key: BEAM-7844 > URL: https://issues.apache.org/jira/browse/BEAM-7844 > Project: Beam > Issue Type: New Feature > Components: dsl-sql > Reporter: Alireza Samadianzakaria > Assignee: Alireza Samadianzakaria > Priority: Major > Time Spent: 1h 40m > Remaining Estimate: 0h > > Calcite has a getRowCount method and a handler for that. However, we need > rate and window as well. This is a requirement for Beam-7777 -- This message was sent by Atlassian JIRA (v7.6.14#76016)