calcite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject [19/50] [abbrv] calcite-avatica git commit: [CALCITE-1684] Change default precision of VARCHAR and VARBINARY from 1 to "unspecified" (Kevin Liew)
Date Thu, 30 Mar 2017 21:38:09 GMT
[CALCITE-1684] Change default precision of VARCHAR and VARBINARY from 1 to "unspecified" (Kevin
Liew)

If you concatenate two strings and the sum of their precisions is
greater than the maximum precision (65,536 by default on Calcite, but
can be overriden in RelDataTypeSystem) the result precision will be
unspecified.

When casting from unspecified precision to a particular precision,
may need to truncate values.

Some unrelated USING tests, and fix typos in method names.

Close apache/calcite#394


Project: http://git-wip-us.apache.org/repos/asf/calcite-avatica/repo
Commit: http://git-wip-us.apache.org/repos/asf/calcite-avatica/commit/0d996daf
Tree: http://git-wip-us.apache.org/repos/asf/calcite-avatica/tree/0d996daf
Diff: http://git-wip-us.apache.org/repos/asf/calcite-avatica/diff/0d996daf

Branch: refs/heads/master
Commit: 0d996daf5df17fb9b05d62fb143f3478bbaa3c80
Parents: 46672b4
Author: kliewkliew <kliewkliew@users.noreply.github.com>
Authored: Wed Mar 8 17:14:43 2017 -0800
Committer: Julian Hyde <jhyde@apache.org>
Committed: Mon Mar 13 15:27:13 2017 -0700

----------------------------------------------------------------------
 .../adapter/enumerable/RexToLixTranslator.java  | 12 ++++++----
 .../calcite/rel/type/RelDataTypeSystemImpl.java |  3 ++-
 .../apache/calcite/sql/type/ReturnTypes.java    | 25 ++++++++++----------
 .../calcite/sql/type/SqlTypeFactoryImpl.java    | 12 ++++++----
 .../calcite/sql/parser/SqlParserTest.java       |  7 ++++++
 .../calcite/sql/test/SqlOperatorBaseTest.java   | 23 +++++++++++++++++-
 .../org/apache/calcite/sql/test/SqlTests.java   | 14 +++++++----
 .../apache/calcite/test/SqlValidatorTest.java   | 18 ++++++++++++--
 core/src/test/resources/sql/misc.iq             |  4 ++--
 .../apache/calcite/adapter/pig/PigFilter.java   | 15 ++++++++++--
 .../org/apache/calcite/test/PigAdapterTest.java |  4 ++--
 .../calcite/test/PigRelBuilderStyleTest.java    |  2 +-
 12 files changed, 101 insertions(+), 38 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/calcite-avatica/blob/0d996daf/core/src/main/java/org/apache/calcite/adapter/enumerable/RexToLixTranslator.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/adapter/enumerable/RexToLixTranslator.java
b/core/src/main/java/org/apache/calcite/adapter/enumerable/RexToLixTranslator.java
index 80127b1..ef7f120 100644
--- a/core/src/main/java/org/apache/calcite/adapter/enumerable/RexToLixTranslator.java
+++ b/core/src/main/java/org/apache/calcite/adapter/enumerable/RexToLixTranslator.java
@@ -385,15 +385,17 @@ public class RexToLixTranslator {
         case VARBINARY:
           // If this is a widening cast, no need to truncate.
           final int sourcePrecision = sourceType.getPrecision();
-          if (sourcePrecision < 0
-              || sourcePrecision >= 0
-              && sourcePrecision <= targetPrecision) {
+          if (sourcePrecision >= 0
+              && (sourcePrecision <= targetPrecision
+                  || targetPrecision
+                      == RelDataType.PRECISION_NOT_SPECIFIED)) {
             truncate = false;
           }
           // If this is a widening cast, no need to pad.
-          if (sourcePrecision < 0
+          if (sourcePrecision == RelDataType.PRECISION_NOT_SPECIFIED
               || sourcePrecision >= 0
-              && sourcePrecision >= targetPrecision) {
+              && sourcePrecision >= targetPrecision
+              && targetPrecision != RelDataType.PRECISION_NOT_SPECIFIED) {
             pad = false;
           }
           // fall through

http://git-wip-us.apache.org/repos/asf/calcite-avatica/blob/0d996daf/core/src/main/java/org/apache/calcite/rel/type/RelDataTypeSystemImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/rel/type/RelDataTypeSystemImpl.java b/core/src/main/java/org/apache/calcite/rel/type/RelDataTypeSystemImpl.java
index 677173f..5382649 100644
--- a/core/src/main/java/org/apache/calcite/rel/type/RelDataTypeSystemImpl.java
+++ b/core/src/main/java/org/apache/calcite/rel/type/RelDataTypeSystemImpl.java
@@ -61,9 +61,10 @@ public abstract class RelDataTypeSystemImpl implements RelDataTypeSystem
{
     switch (typeName) {
     case CHAR:
     case BINARY:
+      return 1;
     case VARCHAR:
     case VARBINARY:
-      return 1;
+      return RelDataType.PRECISION_NOT_SPECIFIED;
     case DECIMAL:
       return getMaxNumericPrecision();
     case INTERVAL_YEAR:

http://git-wip-us.apache.org/repos/asf/calcite-avatica/blob/0d996daf/core/src/main/java/org/apache/calcite/sql/type/ReturnTypes.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/sql/type/ReturnTypes.java b/core/src/main/java/org/apache/calcite/sql/type/ReturnTypes.java
index e1c028f..f3ab09e 100644
--- a/core/src/main/java/org/apache/calcite/sql/type/ReturnTypes.java
+++ b/core/src/main/java/org/apache/calcite/sql/type/ReturnTypes.java
@@ -612,18 +612,19 @@ public abstract class ReturnTypes {
 
           RelDataType ret;
           int typePrecision;
-          if (argType0.getPrecision()
-              == RelDataType.PRECISION_NOT_SPECIFIED
-                  && argType1.getPrecision()
-                      == RelDataType.PRECISION_NOT_SPECIFIED) {
+          final long x =
+              (long) argType0.getPrecision() + (long) argType1.getPrecision();
+          final RelDataTypeFactory typeFactory = opBinding.getTypeFactory();
+          final RelDataTypeSystem typeSystem = typeFactory.getTypeSystem();
+          if (argType0.getPrecision() == RelDataType.PRECISION_NOT_SPECIFIED
+              || argType1.getPrecision() == RelDataType.PRECISION_NOT_SPECIFIED
+              || x > typeSystem.getMaxPrecision(typeName)) {
             typePrecision = RelDataType.PRECISION_NOT_SPECIFIED;
           } else {
-            typePrecision =
-                argType0.getPrecision() + argType1.getPrecision();
+            typePrecision = (int) x;
           }
 
-          ret = opBinding.getTypeFactory()
-              .createSqlType(typeName, typePrecision);
+          ret = typeFactory.createSqlType(typeName, typePrecision);
           if (null != pickedCollation) {
             RelDataType pickedType;
             if (argType0.getCollation().equals(pickedCollation)) {
@@ -634,15 +635,13 @@ public abstract class ReturnTypes {
               throw new AssertionError("should never come here");
             }
             ret =
-                opBinding.getTypeFactory()
-                    .createTypeWithCharsetAndCollation(
-                        ret,
-                        pickedType.getCharset(),
-                        pickedType.getCollation());
+                typeFactory.createTypeWithCharsetAndCollation(ret,
+                    pickedType.getCharset(), pickedType.getCollation());
           }
           return ret;
         }
       };
+
   /**
    * Same as {@link #DYADIC_STRING_SUM_PRECISION} and using
    * {@link org.apache.calcite.sql.type.SqlTypeTransforms#TO_NULLABLE},

http://git-wip-us.apache.org/repos/asf/calcite-avatica/blob/0d996daf/core/src/main/java/org/apache/calcite/sql/type/SqlTypeFactoryImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/sql/type/SqlTypeFactoryImpl.java b/core/src/main/java/org/apache/calcite/sql/type/SqlTypeFactoryImpl.java
index e1f8ab2..d2532f0 100644
--- a/core/src/main/java/org/apache/calcite/sql/type/SqlTypeFactoryImpl.java
+++ b/core/src/main/java/org/apache/calcite/sql/type/SqlTypeFactoryImpl.java
@@ -290,10 +290,8 @@ public class SqlTypeFactoryImpl extends RelDataTypeFactoryImpl {
         SqlCollation collation2 = resultType.getCollation();
 
         // TODO:  refine collation combination rules
-        int precision =
-            Math.max(
-                resultType.getPrecision(),
-                type.getPrecision());
+        final int precision = maxPrecision(resultType.getPrecision(),
+            type.getPrecision());
 
         // If either type is LOB, then result is LOB with no precision.
         // Otherwise, if either is variable width, result is variable
@@ -486,6 +484,12 @@ public class SqlTypeFactoryImpl extends RelDataTypeFactoryImpl {
     return resultType;
   }
 
+  /** Returns the larger of two precisions, treating
+   * {@link RelDataType#PRECISION_NOT_SPECIFIED} as infinity. */
+  private int maxPrecision(int p0, int p1) {
+    return (p0 == RelDataType.PRECISION_NOT_SPECIFIED || p0 >= p1) ? p0 : p1;
+  }
+
   /**
    * Controls behavior discussed <a
    * href="http://sf.net/mailarchive/message.php?msg_id=13337379">here</a>.

http://git-wip-us.apache.org/repos/asf/calcite-avatica/blob/0d996daf/core/src/test/java/org/apache/calcite/sql/parser/SqlParserTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/calcite/sql/parser/SqlParserTest.java b/core/src/test/java/org/apache/calcite/sql/parser/SqlParserTest.java
index b3fa2fc..b0e5465 100644
--- a/core/src/test/java/org/apache/calcite/sql/parser/SqlParserTest.java
+++ b/core/src/test/java/org/apache/calcite/sql/parser/SqlParserTest.java
@@ -6577,6 +6577,13 @@ public class SqlParserTest {
         "CAST(INTERVAL '3-2' YEAR TO MONTH AS CHAR(5))");
   }
 
+  @Test public void testCastToVarchar() {
+    checkExp("cast(x as varchar(5))", "CAST(`X` AS VARCHAR(5))");
+    checkExp("cast(x as varchar)", "CAST(`X` AS VARCHAR)");
+    checkExp("cast(x as varBINARY(5))", "CAST(`X` AS VARBINARY(5))");
+    checkExp("cast(x as varbinary)", "CAST(`X` AS VARBINARY)");
+  }
+
   @Test public void testTimestampAddAndDiff() {
     Map<String, List<String>> tsi = ImmutableMap.<String, List<String>>builder()
         .put("MICROSECOND",

http://git-wip-us.apache.org/repos/asf/calcite-avatica/blob/0d996daf/core/src/test/java/org/apache/calcite/sql/test/SqlOperatorBaseTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/calcite/sql/test/SqlOperatorBaseTest.java b/core/src/test/java/org/apache/calcite/sql/test/SqlOperatorBaseTest.java
index f8efa3e..3e8cbd2 100644
--- a/core/src/test/java/org/apache/calcite/sql/test/SqlOperatorBaseTest.java
+++ b/core/src/test/java/org/apache/calcite/sql/test/SqlOperatorBaseTest.java
@@ -1905,6 +1905,19 @@ public abstract class SqlOperatorBaseTest {
         " x'fe'||x'df' ",
         "fedf",
         "BINARY(2) NOT NULL");
+    tester.checkString(
+        " cast('fe' as char(2)) || cast('df' as varchar)",
+        "fedf",
+        "VARCHAR NOT NULL");
+    // Precision is larger than VARCHAR allows, so result is unbounded
+    tester.checkString(
+        " cast('fe' as char(2)) || cast('df' as varchar(65535))",
+        "fedf",
+        "VARCHAR NOT NULL");
+    tester.checkString(
+        " cast('fe' as char(2)) || cast('df' as varchar(33333))",
+        "fedf",
+        "VARCHAR(33335) NOT NULL");
     tester.checkNull("x'ff' || cast(null as varbinary)");
     tester.checkNull(" cast(null as ANY) || cast(null as ANY) ");
   }
@@ -3655,7 +3668,7 @@ public abstract class SqlOperatorBaseTest {
 
     tester.checkScalar(
         "position(cast('a' as char) in cast('bca' as varchar))",
-        0,
+        3,
         "INTEGER NOT NULL");
   }
 
@@ -6391,10 +6404,18 @@ public abstract class SqlOperatorBaseTest {
     tester.checkScalar("CAST('ABCD' AS CHAR(2))", "AB", "CHAR(2) NOT NULL");
     tester.checkScalar("CAST('ABCD' AS VARCHAR(2))", "AB",
         "VARCHAR(2) NOT NULL");
+    tester.checkScalar("CAST('ABCD' AS VARCHAR)", "ABCD", "VARCHAR NOT NULL");
+    tester.checkScalar("CAST(CAST('ABCD' AS VARCHAR) AS VARCHAR(3))", "ABC",
+        "VARCHAR(3) NOT NULL");
+
     tester.checkScalar("CAST(x'ABCDEF12' AS BINARY(2))", "abcd",
         "BINARY(2) NOT NULL");
     tester.checkScalar("CAST(x'ABCDEF12' AS VARBINARY(2))", "abcd",
         "VARBINARY(2) NOT NULL");
+    tester.checkScalar("CAST(x'ABCDEF12' AS VARBINARY)", "abcdef12",
+        "VARBINARY NOT NULL");
+    tester.checkScalar("CAST(CAST(x'ABCDEF12' AS VARBINARY) AS VARBINARY(3))",
+        "abcdef", "VARBINARY(3) NOT NULL");
 
     if (!enable) {
       return;

http://git-wip-us.apache.org/repos/asf/calcite-avatica/blob/0d996daf/core/src/test/java/org/apache/calcite/sql/test/SqlTests.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/calcite/sql/test/SqlTests.java b/core/src/test/java/org/apache/calcite/sql/test/SqlTests.java
index 0349c35..d2162de 100644
--- a/core/src/test/java/org/apache/calcite/sql/test/SqlTests.java
+++ b/core/src/test/java/org/apache/calcite/sql/test/SqlTests.java
@@ -77,13 +77,17 @@ public abstract class SqlTests {
   public static String getTypeString(RelDataType sqlType) {
     switch (sqlType.getSqlTypeName()) {
     case VARCHAR:
-      String actual = "VARCHAR(" + sqlType.getPrecision() + ")";
-      return sqlType.isNullable() ? actual : (actual + " NOT NULL");
     case CHAR:
-      actual = "CHAR(" + sqlType.getPrecision() + ")";
-      return sqlType.isNullable() ? actual : (actual + " NOT NULL");
-    default:
+      String actual = sqlType.getSqlTypeName().name();
+      if (sqlType.getPrecision() != RelDataType.PRECISION_NOT_SPECIFIED) {
+        actual = actual + "(" + sqlType.getPrecision() + ")";
+      }
+      if (!sqlType.isNullable()) {
+        actual += " NOT NULL";
+      }
+      return actual;
 
+    default:
       // Get rid of the verbose charset/collation stuff.
       // TODO: There's probably a better way to do this.
       final String s = sqlType.getFullTypeString();

http://git-wip-us.apache.org/repos/asf/calcite-avatica/blob/0d996daf/core/src/test/java/org/apache/calcite/test/SqlValidatorTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/calcite/test/SqlValidatorTest.java b/core/src/test/java/org/apache/calcite/test/SqlValidatorTest.java
index 45d8bf3..3ed8f22 100644
--- a/core/src/test/java/org/apache/calcite/test/SqlValidatorTest.java
+++ b/core/src/test/java/org/apache/calcite/test/SqlValidatorTest.java
@@ -916,9 +916,9 @@ public class SqlValidatorTest extends SqlValidatorTestCase {
 
   @Test public void testCastTypeToType() {
     checkExpType("cast(123 as char)", "CHAR(1) NOT NULL");
-    checkExpType("cast(123 as varchar)", "VARCHAR(1) NOT NULL");
+    checkExpType("cast(123 as varchar)", "VARCHAR NOT NULL");
     checkExpType("cast(x'1234' as binary)", "BINARY(1) NOT NULL");
-    checkExpType("cast(x'1234' as varbinary)", "VARBINARY(1) NOT NULL");
+    checkExpType("cast(x'1234' as varbinary)", "VARBINARY NOT NULL");
     checkExpType("cast(123 as varchar(3))", "VARCHAR(3) NOT NULL");
     checkExpType("cast(123 as char(3))", "CHAR(3) NOT NULL");
     checkExpType("cast('123' as integer)", "INTEGER NOT NULL");
@@ -5319,6 +5319,20 @@ public class SqlValidatorTest extends SqlValidatorTestCase {
         "select * from emp join dept using (deptno, ^comm^)",
         "Column 'COMM' not found in any table");
 
+    checkFails("select * from emp join dept using (^empno^)",
+        "Column 'EMPNO' not found in any table");
+
+    checkFails("select * from dept join emp using (^empno^)",
+        "Column 'EMPNO' not found in any table");
+
+    // not on either side
+    checkFails("select * from dept join emp using (^abc^)",
+        "Column 'ABC' not found in any table");
+
+    // column exists, but wrong case
+    checkFails("select * from dept join emp using (^\"deptno\"^)",
+        "Column 'deptno' not found in any table");
+
     // ok to repeat (ok in Oracle10g too)
     check("select * from emp join dept using (deptno, deptno)");
 

http://git-wip-us.apache.org/repos/asf/calcite-avatica/blob/0d996daf/core/src/test/resources/sql/misc.iq
----------------------------------------------------------------------
diff --git a/core/src/test/resources/sql/misc.iq b/core/src/test/resources/sql/misc.iq
index 2f1f959..956fa10 100644
--- a/core/src/test/resources/sql/misc.iq
+++ b/core/src/test/resources/sql/misc.iq
@@ -290,7 +290,7 @@ and e."name" <> d."name";
 (3 rows)
 
 !ok
-EnumerableCalc(expr#0..4=[{inputs}], expr#5=[CAST($t2):VARCHAR(1) CHARACTER SET "ISO-8859-1"
COLLATE "ISO-8859-1$en_US$primary"], expr#6=[CAST($t4):VARCHAR(1) CHARACTER SET "ISO-8859-1"
COLLATE "ISO-8859-1$en_US$primary"], expr#7=[<>($t5, $t6)], empid=[$t0], name=[$t4],
name0=[$t2], $condition=[$t7])
+EnumerableCalc(expr#0..4=[{inputs}], expr#5=[CAST($t2):VARCHAR CHARACTER SET "ISO-8859-1"
COLLATE "ISO-8859-1$en_US$primary"], expr#6=[CAST($t4):VARCHAR CHARACTER SET "ISO-8859-1"
COLLATE "ISO-8859-1$en_US$primary"], expr#7=[<>($t5, $t6)], empid=[$t0], name=[$t4],
name0=[$t2], $condition=[$t7])
   EnumerableJoin(condition=[=($1, $3)], joinType=[inner])
     EnumerableCalc(expr#0..4=[{inputs}], proj#0..2=[{exprs}])
       EnumerableTableScan(table=[[hr, emps]])
@@ -314,7 +314,7 @@ and e."name" <> d."name";
 (3 rows)
 
 !ok
-EnumerableCalc(expr#0..4=[{inputs}], expr#5=[CAST($t2):VARCHAR(1) CHARACTER SET "ISO-8859-1"
COLLATE "ISO-8859-1$en_US$primary"], expr#6=[CAST($t4):VARCHAR(1) CHARACTER SET "ISO-8859-1"
COLLATE "ISO-8859-1$en_US$primary"], expr#7=[<>($t5, $t6)], empid=[$t0], name=[$t4],
name0=[$t2], $condition=[$t7])
+EnumerableCalc(expr#0..4=[{inputs}], expr#5=[CAST($t2):VARCHAR CHARACTER SET "ISO-8859-1"
COLLATE "ISO-8859-1$en_US$primary"], expr#6=[CAST($t4):VARCHAR CHARACTER SET "ISO-8859-1"
COLLATE "ISO-8859-1$en_US$primary"], expr#7=[<>($t5, $t6)], empid=[$t0], name=[$t4],
name0=[$t2], $condition=[$t7])
   EnumerableJoin(condition=[=($1, $3)], joinType=[inner])
     EnumerableCalc(expr#0..4=[{inputs}], proj#0..2=[{exprs}])
       EnumerableTableScan(table=[[hr, emps]])

http://git-wip-us.apache.org/repos/asf/calcite-avatica/blob/0d996daf/pig/src/main/java/org/apache/calcite/adapter/pig/PigFilter.java
----------------------------------------------------------------------
diff --git a/pig/src/main/java/org/apache/calcite/adapter/pig/PigFilter.java b/pig/src/main/java/org/apache/calcite/adapter/pig/PigFilter.java
index 63cc1ea..339f761 100644
--- a/pig/src/main/java/org/apache/calcite/adapter/pig/PigFilter.java
+++ b/pig/src/main/java/org/apache/calcite/adapter/pig/PigFilter.java
@@ -101,8 +101,8 @@ public class PigFilter extends Filter implements PigRel {
   private String getSingleFilterCondition(Implementor implementor, String op, RexCall call)
{
     final String fieldName;
     final String literal;
-    final RexNode left = call.operands.get(0);
-    final RexNode right = call.operands.get(1);
+    final RexNode left = strip(call.operands.get(0));
+    final RexNode right = strip(call.operands.get(1));
     if (left.getKind() == LITERAL) {
       if (right.getKind() != INPUT_REF) {
         throw new IllegalArgumentException(
@@ -127,6 +127,17 @@ public class PigFilter extends Filter implements PigRel {
     return '(' + fieldName + ' ' + op + ' ' + literal + ')';
   }
 
+  private RexNode strip(RexNode e) {
+    switch (e.getKind()) {
+    case CAST:
+      final RexNode e2 = ((RexCall) e).operands.get(0);
+      if (e2.getKind() == LITERAL) {
+        return e2;
+      }
+    }
+    return e;
+  }
+
   private boolean containsOnlyConjunctions(RexNode condition) {
     return RelOptUtil.disjunctions(condition).size() == 1;
   }

http://git-wip-us.apache.org/repos/asf/calcite-avatica/blob/0d996daf/pig/src/test/java/org/apache/calcite/test/PigAdapterTest.java
----------------------------------------------------------------------
diff --git a/pig/src/test/java/org/apache/calcite/test/PigAdapterTest.java b/pig/src/test/java/org/apache/calcite/test/PigAdapterTest.java
index 16e44f1..084f1cb 100644
--- a/pig/src/test/java/org/apache/calcite/test/PigAdapterTest.java
+++ b/pig/src/test/java/org/apache/calcite/test/PigAdapterTest.java
@@ -52,13 +52,13 @@ public class PigAdapterTest extends AbstractPigTest {
   }
 
   @Test
-  public void testImplWithMltipleFilters() {
+  public void testImplWithMultipleFilters() {
     CalciteAssert.that()
       .with(MODEL)
       .query("select * from \"t\" where \"tc0\" > 'abc' and \"tc1\" = '3'")
       .explainContains(
           "PigToEnumerableConverter\n"
-            + "  PigFilter(condition=[AND(>($0, 'abc'), =($1, '3'))])\n"
+            + "  PigFilter(condition=[AND(>($0, 'abc'), =($1, CAST('3'):VARCHAR CHARACTER
SET \"ISO-8859-1\" COLLATE \"ISO-8859-1$en_US$primary\" NOT NULL))])\n"
             + "    PigTableScan(table=[[PIG, t]])")
       .runs()
       .queryContains(

http://git-wip-us.apache.org/repos/asf/calcite-avatica/blob/0d996daf/pig/src/test/java/org/apache/calcite/test/PigRelBuilderStyleTest.java
----------------------------------------------------------------------
diff --git a/pig/src/test/java/org/apache/calcite/test/PigRelBuilderStyleTest.java b/pig/src/test/java/org/apache/calcite/test/PigRelBuilderStyleTest.java
index abd5ebf..b974b13 100644
--- a/pig/src/test/java/org/apache/calcite/test/PigRelBuilderStyleTest.java
+++ b/pig/src/test/java/org/apache/calcite/test/PigRelBuilderStyleTest.java
@@ -69,7 +69,7 @@ public class PigRelBuilderStyleTest extends AbstractPigTest {
   }
 
   @Test
-  public void testImplWithMltipleFilters() {
+  public void testImplWithMultipleFilters() {
     final SchemaPlus schema = createTestSchema();
     final RelBuilder builder = createRelBuilder(schema);
     final RelNode node = builder.scan("t")


Mime
View raw message