You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2019/10/28 14:43:01 UTC

[GitHub] [incubator-doris] imay commented on a change in pull request #2083: Support sql mode

imay commented on a change in pull request #2083: Support sql mode
URL: https://github.com/apache/incubator-doris/pull/2083#discussion_r339602192
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/qe/SqlModeHelper.java
 ##########
 @@ -0,0 +1,136 @@
+// 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.doris.qe;
+
+
+import com.google.common.base.Joiner;
+import com.google.common.base.Splitter;
+import com.google.common.collect.ImmutableMap;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+public class SqlModeHelper {
+    private static final Logger LOG = LogManager.getLogger(SqlModeHelper.class);
+
+    /* Bits for different SQL MODE modes, you can add custom SQL MODE here */
+    public static final Long MODE_REAL_AS_FLOAT = 1L;
+    public static final Long MODE_PIPES_AS_CONCAT = 2L;
+    public static final Long MODE_ANSI_QUOTES = 4L;
+    public static final Long MODE_IGNORE_SPACE = 8L;
+    public static final Long MODE_NOT_USED = 16L;
+    public static final Long MODE_ONLY_FULL_GROUP_BY = 32L;
+    public static final Long MODE_NO_UNSIGNED_SUBTRACTION = 64L;
+    public static final Long MODE_NO_DIR_IN_CREATE = 128L;
+    public static final Long MODE_ANSI = 1L << 18;
+    public static final Long MODE_NO_AUTO_VALUE_ON_ZERO = 1L << 19;
+    public static final Long MODE_NO_BACKSLASH_ESCAPES = 1L << 20;
+    public static final Long MODE_STRICT_TRANS_TABLES = 1L << 21;
+    public static final Long MODE_STRICT_ALL_TABLES = 1L << 22;
+
+
+    public final static Long MODE_DEFAULT = 1L << 32; //4294967296L;
 
 Review comment:
   And do we really need a default mode?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org