[
https://issues.apache.org/jira/browse/BEAM-7545?focusedWorklogId=278421&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-278421
]
ASF GitHub Bot logged work on BEAM-7545:
----------------------------------------
Author: ASF GitHub Bot
Created on: 17/Jul/19 19:16
Start Date: 17/Jul/19 19:16
Worklog Time Spent: 10m
Work Description: riazela commented on pull request #9040: [BEAM-7545]
Reordering Beam Joins
URL: https://github.com/apache/beam/pull/9040#discussion_r304599607
##########
File path:
sdks/java/extensions/sql/src/test/java/org/apache/beam/sdk/extensions/sql/impl/rule/JoinReorderingTest.java
##########
@@ -0,0 +1,156 @@
+/*
+ * 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.rule;
+
+import java.math.BigInteger;
+import org.apache.beam.sdk.extensions.sql.impl.BeamSqlEnv;
+import org.apache.beam.sdk.extensions.sql.impl.rel.BeamIOSourceRel;
+import org.apache.beam.sdk.extensions.sql.impl.rel.BeamRelNode;
+import org.apache.beam.sdk.extensions.sql.meta.provider.test.TestTableProvider;
+import org.apache.beam.sdk.values.Row;
+import org.apache.calcite.rel.RelNode;
+import org.apache.calcite.rel.core.Join;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * This test ensures that we are reordering joins and get a plan similar to
Join(large,Join(small,
Review comment:
I added two more types of tests. One is testing if each of the rules alone
acts correctly (by once converting a query without that and once converting it
with the rule) and the other tests if the entire system without reordering
rules does not reorder joins.
However, I still do not think it is a good idea to test the entire system
without the join reordering rules to check if they are not producing optimal
join order. (testSystemNotReorderingWithoutRules())
We expect the system to reorder the joins. But I am not sure why it should
be an expected behavior of the system not to reorder joins without these
specific rules. (We are not checking this for many other rules and features in
the system. For instance we are not checking if the filter will be pushed down
of the join in case of removal of FilterJoinRule. And I think this can also be
applied to many "subsets of rules" that do some sort of behavior when applied
together.)
Furthermore, this test will break if someone adds a rule that reorder some
certain types of joins or reorder all joins in some other way and I am not sure
why we should prevent them from doing that as long as the system is still
producing our expected optimized order.
----------------------------------------------------------------
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: 278421)
Time Spent: 9h (was: 8h 50m)
> Row Count Estimation for CSV TextTable
> --------------------------------------
>
> Key: BEAM-7545
> URL: https://issues.apache.org/jira/browse/BEAM-7545
> Project: Beam
> Issue Type: New Feature
> Components: dsl-sql
> Reporter: Alireza Samadianzakaria
> Assignee: Alireza Samadianzakaria
> Priority: Major
> Fix For: Not applicable
>
> Time Spent: 9h
> Remaining Estimate: 0h
>
> Implementing Row Count Estimation for CSV Tables by reading the first few
> lines of the file and estimating the number of records based on the length of
> these lines and the total length of the file.
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)