You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2018/11/19 08:23:32 UTC

[GitHub] zentol closed pull request #4672: [Flink-7621] [table] Fix Inconsistency of CaseSensitive Configuration

zentol closed pull request #4672: [Flink-7621] [table] Fix Inconsistency of CaseSensitive Configuration
URL: https://github.com/apache/flink/pull/4672
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/flink-libraries/flink-table/src/main/scala/org/apache/flink/table/plan/logical/LogicalNode.scala b/flink-libraries/flink-table/src/main/scala/org/apache/flink/table/plan/logical/LogicalNode.scala
index 6fe888ab6b2..ca97d7c682f 100644
--- a/flink-libraries/flink-table/src/main/scala/org/apache/flink/table/plan/logical/LogicalNode.scala
+++ b/flink-libraries/flink-table/src/main/scala/org/apache/flink/table/plan/logical/LogicalNode.scala
@@ -99,7 +99,11 @@ abstract class LogicalNode extends TreeNode[LogicalNode] {
   def resolveReference(tableEnv: TableEnvironment, name: String): Option[NamedExpression] = {
     // try to resolve a field
     val childrenOutput = children.flatMap(_.output)
-    val fieldCandidates = childrenOutput.filter(_.name.equalsIgnoreCase(name))
+    val fieldCandidates = if (tableEnv.getFrameworkConfig.getParserConfig.caseSensitive()) {
+      childrenOutput.filter(_.name.equals(name))
+    } else {
+      childrenOutput.filter(_.name.equalsIgnoreCase(name))
+    }
     if (fieldCandidates.length > 1) {
       failValidation(s"Reference $name is ambiguous.")
     } else if (fieldCandidates.nonEmpty) {


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services